Get Subnational
Changed onSub-national income distribution data. Returns population counts and income bounds by income class for 49 African countries, at three levels: national (total, urban and rural rows), city (urban, 50,000+; functional cities, one row per class, region_code = the functional city ID) and locality. level = all | national | city | city_locality | locality; omitted, national + locality as before (admin_level 0 / 2 is the older alias). Each row carries level and urban_rural. National urban, city and locality figures are the same population at different levels, so do not add them together. Without include_forecasts, years after 2024 are left out. Income classes: marginalised, low, middle, upper_middle, high. Currencies: current USD, constant 2015 USD, PPP. income_lower_bound_ppp / income_upper_bound_ppp are the PPP class lines behind population_share_ppp: $4.20 / $6.50 / $18.18 / $115.73 a day x 365.25, per person per year in constant 2021 international $; household_income_ppp are the same lines x household_size. Local currency (v1.3.2): lcu_currency (ISO 4217), lcu_per_usd, lcu_rate_source, incomebound_lcu and household_income*_lcu are the current-USD bounds x the year's exchange rate (World Bank official rate where measured; IMF WEO implied rate otherwise, to 2031). Null where there is no rate: 2032-2035 and ER, LR, LY, SD, SO, SS, ZW (see lcu_notes). Shares and populations are unchanged. Paid plans: all 49 countries with sub-national data. Each call draws on the monthly data allowance at the standard per-cell rates (one cell = one income class for one place in one year; national $0.25, city $0.50, locality $0.15), like the dashboard download. currencies (usd, ppp, lcu; comma-separated): the datasets returned and charged. Omitted: usd,lcu (Current USD + local currency), at the cell rate. USD and PPP are separate datasets, each at the cell rate; asking for both charges 1.5x in US$, and the cells are counted once (cells_consumed). Local-currency fields are free with USD. The response carries only the fields of the currencies asked for. South Sudan has no PPP figures: USD only (ppp alone is refused).
Request
- Base URLhttps://panafricadata.com (the document declares no server; this is the origin it was published from)
- AuthAPI key in header X-API-Key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Query parameters
all, national, city, locality or city_locality (omitted: national + locality, as before)
older alias: 0 = national, 2 = locality
marginalised, low, middle, upper_middle, high
usd, ppp and/or lcu, comma-separated; omitted: usd,lcu (Current USD + local currency, at the cell rate). USD and PPP are separate datasets, each at the cell rate; both together = 1.5x the US$ charge (cells are counted once). lcu is free with usd. South Sudan: USD only.
Response
Successful Response
Changes
- info
added the new optional
queryrequest parametercurrencies
- info
- info
added the new optional
queryrequest parameterlevel
- info