Pan Africa Data

Pan Africa Data API

Demographic and macroeconomic data for 54 African countries 2000-2035. Visit panafricadata.com for full platform access.

Data & analytics#open-data

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Demographic and macroeconomic data for 54 African countries 2000-2035. Visit panafricadata.com for full platform access.

Endpoints 35

Age bands

  • GETAge bands: national and city/age/:country_codeAge bands 0-14, 15-24, 25-34, 35-44, 45-54, 55-64 and 65+ for one country, as shares (0-1) and counts. national: UN World Population Prospects 2024. cities:…
  • GETDownload File/download/:tokenSigned download endpoint — delivers purchased file directly. Token is generated by webhook after successful payment and stored in dashboard_sessions with…
  • GETGet Download Token/download-token/:transaction_idPolled by success page — returns download token once webhook has fired and stored the file. Returns empty token if not ready yet. 28 Sept 2026: also returns…
  • POSTSample Download/sample-downloadFree sample download — Lesotho subnational data 2021-2027. No auth required. Logs email to sample_downloads table. Format matches full dashboard download…
  • GETList Countries/countries
  • GETList Indicators/indicators
  • GETGet Country Data/data/:country_code
  • GETCompare Countries/compare?countries=string&indicator=string
  • GETGet Forecast/forecast/:country_code
  • GETData Quality/quality
  • GETGet Remittance Corridors/remittances
  • GETGet Oda Data/oda/:country_code
  • POSTOndemand Price/ondemand/priceExact price of a macro (national indicators) order, as checkout would charge it. Read-only.
  • POSTOndemand Quote/ondemand/quote
  • POSTOndemand Price Subnational/ondemand/price-subnationalExact price of a sub-national order (income layers and/or age bands), as checkout would charge it. Read-only.
  • POSTOndemand Quote Subnational/ondemand/quote-subnationalOn-demand quote + checkout across the three geography layers: national -> subnational admin_level 0 city -> functional_city_income (functional cities /…
  • GETOndemand Pack Prices/ondemand/packs/:countryAll country-pack prices for one country (Macro outlook, City, City + localities x 5-year / 10-year), with cells per layer and availability. Read-only: no…
  • POSTOndemand Quote Pack/ondemand/quote-packExact price for one country pack and a Paddle checkout for it. No auth required — public pricing endpoint.
  • POSTPaddle Webhook/webhook/paddle
  • GETAccount Balance/account/balance
  • GETAccount Usage/account/usage
  • POSTTrial Signup/auth/trial-signup
  • POSTBeta Signup/auth/beta-signupRetired 31 Oct 2026 (Arshad): the beta ended on 21 June 2026. Returns 410 Gone for any request; no key is created or resent. The new-key code (an INSERT with…
  • POSTNewsletter Subscribe/api/newsletter/subscribeSubscribe an email to the Pan Africa Data newsletter. Sends no email. Bot defences (8 Nov 2026; api/newsletter_guard.py): honeypot field filled: the success…
  • POSTTrial Download/api/ondemand/trial-downloadLets trial users get a free Excel/CSV download of their trial data without needing to use the API directly. Enforces trial restrictions server-side regardless…
  • POSTRequest Magic Link/auth/magic-link
  • GETVerify Magic Link/auth/verify?token=string
  • GETDashboard Overview/api/dashboard/overview
  • POSTLogout/auth/logout
  • POSTDashboard Download/api/dashboard/downloadSubscriber data download — charged against the monthly allowance, emails Excel + CSV.
  • POSTDashboard Preview Subnational/api/dashboard/preview-subnationalSub-national tab preview (24 Oct 2026): ONLY what the tab displays, at most 8 rows, the record count for the selection and, for a single country, the national…
  • POSTDashboard Download Subnational/api/dashboard/download-subnationalSub-national download — emails Excel + CSV of income distribution for one or more countries. Wide format: one row per region/city/urban-rural-total split,…
  • POSTDashboard Download Age/api/dashboard/download-ageAge bands download (v1.3.1, Arshad 23-24 Oct 2026): a separate "Age bands" spreadsheet (Excel + CSV) per country, the same format and legend as the on-demand…
  • GETList Subnational Countries/subnationalList all countries with sub-national data, with city counts.
  • GETGet Subnational/subnational/:country_codeSub-national income distribution data. Returns population counts and income bounds by income class for 49 African countries, at three levels: national (total,…

API details

Authentication
An API key in the X-API-Key header
Operations
35 operations on 35 pathsGET 18POST 17
Main resources
Age bands 1
Response formats
application/json
Description format
OpenAPI 3.1.0, API version 1.2.0

How to test the Pan Africa Data API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Pan Africa Data API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses an API key in the X-API-Key header. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Age bands: national and city” (GET /age/:country_code), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Pan Africa Data API?

Demographic and macroeconomic data for 54 African countries 2000-2035. Visit panafricadata.com for full platform access. It is listed under Data & analytics and has 35 endpoints.

Who publishes the Pan Africa Data API?

It is listed from Pan Africa Data's public API description (an OpenAPI document), not published by Pan Africa Data on Swastik Codes. Anyone who controls panafricadata.com can claim the profile by adding a DNS TXT record.

How do I authenticate with the Pan Africa Data API?

With an API key in the X-API-Key header.

How many endpoints does the Pan Africa Data API have?

35 operations on 35 paths (18 GET, 17 POST). The largest groups are Age bands.

Is forking the Pan Africa Data API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.