{"openapi":"3.1.0","info":{"title":"Pan Africa Data API","description":"Demographic and macroeconomic data for 54 African countries 2000-2035. Visit panafricadata.com for full platform access.","version":"1.2.0"},"paths":{"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"head":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/home":{"get":{"summary":"Home Page","operationId":"home_page_home_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/pricing":{"get":{"summary":"Pricing Page","operationId":"pricing_page_pricing_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/methodology":{"get":{"summary":"Methodology Page","operationId":"methodology_page_methodology_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/terms":{"get":{"summary":"Terms Page","operationId":"terms_page_terms_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/privacy":{"get":{"summary":"Privacy Page","operationId":"privacy_page_privacy_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/refunds":{"get":{"summary":"Refunds Page","operationId":"refunds_page_refunds_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/ondemand":{"get":{"summary":"Ondemand Page","operationId":"ondemand_page_ondemand_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/ondemand/success":{"get":{"summary":"Ondemand Success","operationId":"ondemand_success_ondemand_success_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/download/{token}":{"get":{"summary":"Download File","description":"Signed download endpoint — delivers purchased file directly.\nToken is generated by webhook after successful payment and stored in\ndashboard_sessions with token_type='download'. Expires after 24 hours.","operationId":"download_file_download__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/download-token/{transaction_id}":{"get":{"summary":"Get Download Token","description":"Polled by success page — returns download token once webhook has fired and\nstored the file. Returns empty token if not ready yet.","operationId":"get_download_token_download_token__transaction_id__get","parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Transaction Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard":{"get":{"summary":"Dashboard Page","operationId":"dashboard_page_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/dashboard/login":{"get":{"summary":"Dashboard Login Page","operationId":"dashboard_login_page_dashboard_login_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin":{"get":{"summary":"Admin Page","operationId":"admin_page_admin_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}},"security":[{"HTTPBasic":[]}]}},"/sw.js":{"get":{"summary":"Service Worker","operationId":"service_worker_sw_js_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/favicon.ico":{"get":{"summary":"Favicon","operationId":"favicon_favicon_ico_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sitemap.xml":{"get":{"summary":"Sitemap","description":"Dynamically generated sitemap — avoids static file missing on Render.","operationId":"sitemap_sitemap_xml_get","responses":{"200":{"description":"Successful Response"}}}},"/sitemap":{"get":{"summary":"Sitemap Redirect","description":"Redirect /sitemap -> /sitemap.xml for Google Search Console.","operationId":"sitemap_redirect_sitemap_get","responses":{"200":{"description":"Successful Response"}}}},"/contact":{"get":{"summary":"Contact Redirect","operationId":"contact_redirect_contact_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/about":{"get":{"summary":"About Redirect","operationId":"about_redirect_about_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/impressum":{"get":{"summary":"Impressum Redirect","operationId":"impressum_redirect_impressum_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sample-download":{"post":{"summary":"Sample Download","description":"Free sample download — Lesotho subnational data 2021-2027.\nNo auth required. Logs email to sample_downloads table.\nFormat matches full dashboard download (Namibia reference format):\n- GDP / HCE columns included\n- Level shown as National/City (not 0/2)\n- Urban/Rural capitalised\n- Legend inline at bottom of data sheet (no separate sheet)","operationId":"sample_download_sample_download_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SampleDownloadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/robots.txt":{"get":{"summary":"Robots","operationId":"robots_robots_txt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/security.txt":{"get":{"summary":"Security Txt","description":"RFC 9116 security.txt — tells security researchers how to report a\nvulnerability responsibly. Added July 2026 after a site scan flagged\nits absence as the one gap a security-conscious evaluator would notice.\nExpires annually — remember to bump the date each year.","operationId":"security_txt__well_known_security_txt_get","responses":{"200":{"description":"Successful Response"}}}},"/rss.xml":{"get":{"summary":"Blog Feed","description":"RSS 2.0 feed of the blog - mounted at four common paths so\naggregators find it whichever convention they use. Content-Type\nexplicitly declares charset=utf-8 so browsers viewing the raw XML\ndo not fall back to Latin-1 and mangle any non-ASCII bytes.","operationId":"blog_feed_rss_xml_get","responses":{"200":{"description":"Successful Response"}}}},"/feed.xml":{"get":{"summary":"Blog Feed","description":"RSS 2.0 feed of the blog - mounted at four common paths so\naggregators find it whichever convention they use. Content-Type\nexplicitly declares charset=utf-8 so browsers viewing the raw XML\ndo not fall back to Latin-1 and mangle any non-ASCII bytes.","operationId":"blog_feed_feed_xml_get","responses":{"200":{"description":"Successful Response"}}}},"/blog/rss.xml":{"get":{"summary":"Blog Feed","description":"RSS 2.0 feed of the blog - mounted at four common paths so\naggregators find it whichever convention they use. Content-Type\nexplicitly declares charset=utf-8 so browsers viewing the raw XML\ndo not fall back to Latin-1 and mangle any non-ASCII bytes.","operationId":"blog_feed_blog_rss_xml_get","responses":{"200":{"description":"Successful Response"}}}},"/blog/feed.xml":{"get":{"summary":"Blog Feed","description":"RSS 2.0 feed of the blog - mounted at four common paths so\naggregators find it whichever convention they use. Content-Type\nexplicitly declares charset=utf-8 so browsers viewing the raw XML\ndo not fall back to Latin-1 and mangle any non-ASCII bytes.","operationId":"blog_feed_blog_feed_xml_get","responses":{"200":{"description":"Successful Response"}}}},"/blog":{"get":{"summary":"Blog Index","operationId":"blog_index_blog_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/blog/where-to-find-africa-gdp-data":{"get":{"summary":"Blog 1","operationId":"blog_1_blog_where_to_find_africa_gdp_data_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/blog/africa-income-distribution-by-province":{"get":{"summary":"Blog 2","operationId":"blog_2_blog_africa_income_distribution_by_province_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/blog/cost-of-sending-money-to-africa":{"get":{"summary":"Blog 3","operationId":"blog_3_blog_cost_of_sending_money_to_africa_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/blog/africa-forecast-methodology":{"get":{"summary":"Blog Forecast","operationId":"blog_forecast_blog_africa_forecast_methodology_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/blog/africa-city-income-lagos-kano":{"get":{"summary":"Blog Lagos Kano","operationId":"blog_lagos_kano_blog_africa_city_income_lagos_kano_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/blog/africa-current-vs-constant-vs-ppp":{"get":{"summary":"Blog Currency","operationId":"blog_currency_blog_africa_current_vs_constant_vs_ppp_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/blog/africa-income-classes-world-bank-methodology":{"get":{"summary":"Blog World Bank Methodology","operationId":"blog_world_bank_methodology_blog_africa_income_classes_world_bank_methodology_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/blog/southern-africa-dual-economy":{"get":{"summary":"Blog Southern Africa","operationId":"blog_southern_africa_blog_southern_africa_dual_economy_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/blog/zambia-growth-income-gap-2026":{"get":{"summary":"Blog Zambia","operationId":"blog_zambia_blog_zambia_growth_income_gap_2026_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/countries":{"get":{"summary":"List Countries","operationId":"list_countries_countries_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/indicators":{"get":{"summary":"List Indicators","operationId":"list_indicators_indicators_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/data/{country_code}":{"get":{"summary":"Get Country Data","operationId":"get_country_data_data__country_code__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"country_code","in":"path","required":true,"schema":{"type":"string","title":"Country Code"}},{"name":"indicator","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Indicator"}},{"name":"year_from","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year From"}},{"name":"year_to","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year To"}},{"name":"include_forecasts","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Forecasts"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compare":{"get":{"summary":"Compare Countries","operationId":"compare_countries_compare_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"countries","in":"query","required":true,"schema":{"type":"string","title":"Countries"}},{"name":"indicator","in":"query","required":true,"schema":{"type":"string","title":"Indicator"}},{"name":"year_from","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":2000,"title":"Year From"}},{"name":"year_to","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":2024,"title":"Year To"}},{"name":"include_forecasts","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Forecasts"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/forecast/{country_code}":{"get":{"summary":"Get Forecast","operationId":"get_forecast_forecast__country_code__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"country_code","in":"path","required":true,"schema":{"type":"string","title":"Country Code"}},{"name":"indicator","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Indicator"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/quality":{"get":{"summary":"Data Quality","operationId":"data_quality_quality_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/remittances":{"get":{"summary":"Get Remittance Corridors","operationId":"get_remittance_corridors_remittances_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"send_country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Send Country"}},{"name":"receive_country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receive Country"}},{"name":"corridor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Corridor"}},{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oda/{country_code}":{"get":{"summary":"Get Oda Data","operationId":"get_oda_data_oda__country_code__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"country_code","in":"path","required":true,"schema":{"type":"string","title":"Country Code"}},{"name":"year_from","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":2000,"title":"Year From"}},{"name":"year_to","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":2023,"title":"Year To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ondemand/quote":{"post":{"summary":"Ondemand Quote","operationId":"ondemand_quote_ondemand_quote_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnDemandQuoteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ondemand/quote-subnational":{"post":{"summary":"Ondemand Quote Subnational","description":"On-demand quote + checkout across the three geography layers:\n  national  -> subnational admin_level 0\n  city      -> functional_city_income (functional cities / economic sheds)\n  locality  -> subnational admin_level 2  (formerly labelled 'City')\nFlat $0.15/cell — all layers are fully modelled, matching the forecast rate.\nHonours the customer's layer, income-class and currency selections.","operationId":"ondemand_quote_subnational_ondemand_quote_subnational_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubnationalOnDemandQuoteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ondemand/quote-bundle":{"post":{"summary":"Ondemand Quote Bundle","description":"Calculate exact bundle price for one country — national + subnational,\n2020-2035, 15% discount. Creates Paddle checkout immediately.\nNo auth required — public pricing endpoint.","operationId":"ondemand_quote_bundle_ondemand_quote_bundle_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BundleQuoteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhook/paddle":{"post":{"summary":"Paddle Webhook","operationId":"paddle_webhook_webhook_paddle_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/account/balance":{"get":{"summary":"Account Balance","operationId":"account_balance_account_balance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/account/usage":{"get":{"summary":"Account Usage","operationId":"account_usage_account_usage_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/trial-signup":{"post":{"summary":"Trial Signup","operationId":"trial_signup_auth_trial_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialSignupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/beta-signup":{"post":{"summary":"Beta Signup","description":"Generate a beta API key for a participant.\nBeta access: RW, NA, TN, SN only, expires 21 June 2026.\n10,000 cell limit — enough for serious testing.","operationId":"beta_signup_auth_beta_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BetaSignupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ondemand/trial-download":{"post":{"summary":"Trial Download","description":"Lets trial users get a free Excel/CSV download of their trial data\nwithout needing to use the API directly. Enforces trial restrictions\nserver-side regardless of what is requested:\n  - countries must be a subset of FREE_COUNTRIES (LS, CV, SZ)\n  - indicators must be a subset of FREE_INDICATORS (10 indicators)\n  - years must be >= FREE_YEAR_LIMIT (2020) and <= 2024\n  - total cells must be <= 100, and within remaining trial allowance","operationId":"trial_download_api_ondemand_trial_download_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialDownloadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/magic-link":{"post":{"summary":"Request Magic Link","operationId":"request_magic_link_auth_magic_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/verify":{"get":{"summary":"Verify Magic Link","operationId":"verify_magic_link_auth_verify_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dashboard/overview":{"get":{"summary":"Dashboard Overview","operationId":"dashboard_overview_api_dashboard_overview_get","parameters":[{"name":"pad_session","in":"cookie","required":false,"schema":{"type":"string","title":"Pad Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/logout":{"post":{"summary":"Logout","operationId":"logout_auth_logout_post","parameters":[{"name":"pad_session","in":"cookie","required":false,"schema":{"type":"string","title":"Pad Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/overview":{"get":{"summary":"Admin Overview","operationId":"admin_overview_api_admin_overview_get","parameters":[{"name":"pwd","in":"query","required":false,"schema":{"type":"string","title":"Pwd"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/llms.txt":{"get":{"summary":"Llms Txt","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/dashboard/download":{"post":{"summary":"Dashboard Download","description":"Subscriber data download — deducts from monthly cell allowance, emails Excel + CSV.","operationId":"dashboard_download_api_dashboard_download_post","parameters":[{"name":"pad_session","in":"cookie","required":false,"schema":{"type":"string","title":"Pad Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardDownloadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dashboard/download-subnational":{"post":{"summary":"Dashboard Download Subnational","description":"Sub-national download — emails Excel + CSV of income distribution for one or more countries.\nWide format: one row per region/city/urban-rural-total split, income classes as columns,\nfixed household income bands per urban/rural split, legend at bottom of sheet.","operationId":"dashboard_download_subnational_api_dashboard_download_subnational_post","parameters":[{"name":"pad_session","in":"cookie","required":false,"schema":{"type":"string","title":"Pad Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubnationalDownloadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/subnational":{"get":{"summary":"List Subnational Countries","description":"List all countries with sub-national data, with city counts.","operationId":"list_subnational_countries_subnational_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/subnational/{country_code}":{"get":{"summary":"Get Subnational","description":"Sub-national income distribution data.\nReturns population counts and income bounds by income class at national\nand city level for all 54 African countries.\nIncome classes: marginalised, low, middle, upper_middle, high.\nCurrencies: current USD, constant 2015 USD, PPP.\nBeta access: RW, NA, TN, SN. Paid plans: all 54 countries.","operationId":"get_subnational_subnational__country_code__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"country_code","in":"path","required":true,"schema":{"type":"string","title":"Country Code"}},{"name":"admin_level","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"0=national, 2=city","title":"Admin Level"},"description":"0=national, 2=city"},{"name":"income_class","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"marginalised, low, middle, upper_middle, high","title":"Income Class"},"description":"marginalised, low, middle, upper_middle, high"},{"name":"year_from","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year From"}},{"name":"year_to","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year To"}},{"name":"include_forecasts","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Forecasts"}},{"name":"city_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"BetaSignupRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"BetaSignupRequest"},"BundleQuoteRequest":{"properties":{"country":{"type":"string","title":"Country"}},"type":"object","required":["country"],"title":"BundleQuoteRequest"},"DashboardDownloadRequest":{"properties":{"countries":{"items":{"type":"string"},"type":"array","title":"Countries"},"indicators":{"items":{"type":"string"},"type":"array","title":"Indicators"},"year_from":{"type":"integer","title":"Year From"},"year_to":{"type":"integer","title":"Year To"},"include_forecasts":{"type":"boolean","title":"Include Forecasts","default":false}},"type":"object","required":["countries","indicators","year_from","year_to"],"title":"DashboardDownloadRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"MagicLinkRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"MagicLinkRequest"},"OnDemandQuoteRequest":{"properties":{"countries":{"items":{"type":"string"},"type":"array","title":"Countries"},"indicators":{"items":{"type":"string"},"type":"array","title":"Indicators"},"year_from":{"type":"integer","title":"Year From"},"year_to":{"type":"integer","title":"Year To"},"include_forecasts":{"type":"boolean","title":"Include Forecasts","default":false}},"type":"object","required":["countries","indicators","year_from","year_to"],"title":"OnDemandQuoteRequest"},"SampleDownloadRequest":{"properties":{"email":{"type":"string","title":"Email"},"country":{"type":"string","title":"Country","default":"LS"},"year_from":{"type":"integer","title":"Year From","default":2021},"year_to":{"type":"integer","title":"Year To","default":2027}},"type":"object","required":["email"],"title":"SampleDownloadRequest"},"SubnationalDownloadRequest":{"properties":{"country_codes":{"items":{"type":"string"},"type":"array","title":"Country Codes"},"year_from":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year From","default":2000},"year_to":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year To","default":2035},"include_forecasts":{"type":"boolean","title":"Include Forecasts","default":false}},"type":"object","required":["country_codes"],"title":"SubnationalDownloadRequest"},"SubnationalOnDemandQuoteRequest":{"properties":{"countries":{"items":{"type":"string"},"type":"array","title":"Countries"},"year_from":{"type":"integer","title":"Year From","default":2000},"year_to":{"type":"integer","title":"Year To","default":2035},"layers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Layers"},"admin_levels":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Admin Levels"},"income_classes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Income Classes"},"currency":{"type":"string","title":"Currency","default":"usd"}},"type":"object","required":["countries"],"title":"SubnationalOnDemandQuoteRequest"},"TrialDownloadRequest":{"properties":{"api_key":{"type":"string","title":"Api Key"},"year_from":{"type":"integer","title":"Year From","default":2020},"year_to":{"type":"integer","title":"Year To","default":2024}},"type":"object","required":["api_key"],"title":"TrialDownloadRequest"},"TrialSignupRequest":{"properties":{"email":{"type":"string","title":"Email"},"turnstile_token":{"type":"string","title":"Turnstile Token","default":""}},"type":"object","required":["email"],"title":"TrialSignupRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBasic":{"type":"http","scheme":"basic"},"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}}}}