Reference
Countries
Get reference records for 54 African countries, country profiles, and selected latest observations. Data coverage and reporting periods vary by metric and source.
African Countries API
Query country reference records, selected indicators, and the latest available observations. The reference catalog contains 54 African countries; metric and source coverage varies.
Choosing The Country Routes
- Use
/v1/countriesfor country discovery and reference records. - Use
/v1/countries/{country_code}for the full country detail record. - Use
/v1/countries/{country_code}/profilefor selected indicators, trade data, and government records. - Use
/v1/countries/{country_code}/signalsfor selected latest observations and alerts.
List Countries
/v1/countriesReturns country metadata for Africa.
Authentication required.
paginatebooleanpageintegerper_pageintegerregionstringsortstringname, area, or region; prefix with - for descendingcurl "https://api.africa-api.com/v1/countries" \
-G \
-d "paginate=true" \
-d "page=1" \
-d "per_page=5" \
-d "region=west" \
-d "sort=name" \
-H "Authorization: Bearer $AFRICA_API_KEY"{
"data": [
{
"id": "gh",
"name": "Ghana",
"official_name": "Republic of Ghana",
"capital": "Accra",
"region": "West Africa",
"subregion": "Western Africa",
"area_km2": 238533,
"currencies": ["GHS"],
"languages": ["eng"],
"flag": "GH"
}
],
"meta": {
"total": 16,
"page": 1,
"per_page": 5,
"total_pages": 4
}
}Get Country By Code
/v1/countries/{country_code}Returns a detailed country record by ISO 3166-1 alpha-2 code.
country_codestringrequiredng, ke, zacurl "https://api.africa-api.com/v1/countries/ng" \
-H "Authorization: Bearer $AFRICA_API_KEY"{
"data": {
"id": "ng",
"name": "Nigeria",
"official_name": "Federal Republic of Nigeria",
"capital": "Abuja",
"region": "West Africa",
"subregion": "Western Africa",
"area_km2": 923768,
"iso3": "NGA",
"timezone": "Africa/Lagos",
"calling_code": "+234",
"flag": "NG",
"coordinates": {
"latitude": 9.082,
"longitude": 8.6753
},
"borders": ["bj", "cm", "ne", "td"],
"currencies": [
{
"code": "NGN",
"name": "Nigerian naira",
"symbol": "NGN"
}
],
"languages": [
{
"code": "eng",
"name": "English"
}
]
}
}Get Country Profile
/v1/countries/{country_code}/profileReturns selected indicators, trade highlights, government records, and transport data for one country. Government fields include current leaders, cabinet members, and the latest election when available.
Use /v1/data or the individual domain endpoints, such as /v1/trade/overview/{country_code}, for detailed queries.
curl "https://api.africa-api.com/v1/countries/ke/profile" \
-H "Authorization: Bearer $AFRICA_API_KEY"The following example illustrates the response structure. Its values are examples, not current country statistics or government records.
{
"data": {
"country": {
"code": "ke",
"name": "Kenya",
"capital": "Nairobi",
"region": "East Africa"
},
"highlights": {
"population_total": {
"value": 55100586,
"year": 2024,
"source": "world_bank_wdi",
"unit": "persons"
},
"median_age_years": {
"value": 20.4,
"year": 2024,
"source": "un_wpp",
"unit": "years"
},
"unemployment_pct": {
"value": 5.7,
"year": 2024,
"source": "ilo_ilostat",
"unit": "percent"
},
"agricultural_land_1000ha": {
"value": 30350,
"year": 2023,
"source": "faostat_agriculture",
"unit": "thousand_hectares"
},
"access_to_clean_fuels_pct": {
"value": 30.8,
"year": 2023,
"source": "world_bank_wdi",
"unit": "percent"
},
"mobile_subscriptions_per_100": {
"value": 118.6,
"year": 2024,
"source": "world_bank_wdi",
"unit": "subscriptions_per_100_people"
},
"paved_roads_pct": {
"value": 14.2,
"year": 2022,
"source": "world_bank_wdi",
"unit": "percent"
},
"pm25_air_pollution_ug_per_m3": {
"value": 18.4,
"year": 2023,
"source": "world_bank_wdi",
"unit": "micrograms_per_cubic_meter"
},
"government_effectiveness_estimate": {
"value": -0.41,
"year": 2024,
"source": "world_bank_wdi",
"unit": "estimate"
}
},
"trade": {
"latest_year": 2024,
"granular_latest_year": 2024,
"granular_years": [2023, 2024],
"latest_snapshot": {
"year": 2024,
"exports_goods_services_usd": 15420000000,
"imports_goods_services_usd": 18610000000,
"trade_balance_usd": -3190000000,
"exports_goods_services_pct_gdp": 12.1,
"imports_goods_services_pct_gdp": 14.6,
"current_account_balance_pct_gdp": -3.4,
"sources": {
"exports_goods_services_usd": "world_bank_wdi",
"imports_goods_services_usd": "world_bank_wdi",
"trade_balance_usd": "world_bank_wdi"
}
},
"top_export_partners": [
{
"partner_country_code": "ug",
"partner_country_name": "Uganda",
"flow_type": "export",
"total_value_usd": 1210000000
}
],
"top_import_partners": [
{
"partner_country_code": "cn",
"partner_country_name": "China",
"flow_type": "import",
"total_value_usd": 3180000000
}
],
"top_export_products": [
{
"product_code": "09",
"product_name": "Coffee, tea, mate and spices",
"classification": "HS",
"flow_type": "export",
"total_value_usd": 730000000
}
],
"top_import_products": [
{
"product_code": "84",
"product_name": "Machinery and mechanical appliances",
"classification": "HS",
"flow_type": "import",
"total_value_usd": 1110000000
}
]
},
"government": {
"current_head_of_state": {
"wikidata_id": "LEADER_WIKIDATA_ID",
"name": "William Ruto",
"office_name": "President of Kenya",
"role_type": "head_of_state",
"start_date": "2022-09-13",
"source": "wikidata_government_history"
},
"current_head_of_government": {
"wikidata_id": "LEADER_WIKIDATA_ID",
"name": "William Ruto",
"office_name": "President of Kenya",
"role_type": "head_of_government",
"start_date": "2022-09-13",
"source": "wikidata_government_history"
},
"cabinet_member_count": 2,
"current_cabinet_members": [
{
"wikidata_id": "CABINET_MEMBER_WIKIDATA_ID",
"name": "John Mbadi",
"office_name": "Cabinet Secretary for National Treasury",
"role_category": "minister",
"party_name": "ODM",
"start_date": "2024-08-08",
"source": "wikidata_current_governments"
}
],
"latest_election": {
"wikidata_id": "ELECTION_WIKIDATA_ID",
"name": "2022 Kenyan general election",
"election_scope": "general",
"election_date": "2022-08-09",
"office_name": "President of Kenya",
"election_status": "completed",
"successful_candidate_name": "William Ruto",
"source": "wikidata_elections"
},
"active_policy_count": 14,
"latest_policy": {
"wikidata_id": "POLICY_WIKIDATA_ID",
"title": "POLICY_TITLE",
"document_type": "law",
"policy_status": "active",
"published_at": "2016-05-27",
"source": "wikidata_policies"
},
"latest_policy_event": {
"event_key": "POLICY_WIKIDATA_ID:EVENT_TYPE:EVENT_DATE",
"policy_wikidata_id": "POLICY_WIKIDATA_ID",
"title": "POLICY_TITLE",
"document_type": "law",
"event_type": "implemented",
"event_date": "2016-06-01",
"summary": "Kenya Climate Change Act entered into force",
"source": "wikidata_policies"
}
}
}
}Get Country Signals
/v1/countries/{country_code}/signalsReturns selected latest observations for one country.
The response combines available:
- current macro and infrastructure observations
- FX rates
- exchange market snapshots
- trade summaries
- government records
Signals can describe different reporting periods. Check each observation's frequency and period; monthly/latest metrics expose as_of_period.
Use /v1/data for available history and additional filters.
curl "https://api.africa-api.com/v1/countries/ke/signals" \
-H "Authorization: Bearer $AFRICA_API_KEY"This example illustrates the signals response. Its dates and values are not a current country snapshot.
{
"data": {
"country": {
"code": "ke",
"name": "Kenya",
"capital": "Nairobi",
"region": "East Africa"
},
"observations": [
{
"metric_key": "inflation_cpi_latest_yoy_pct",
"value": 4.8,
"year": 2025,
"source": "world_bank_gem_signals",
"freshness": "current",
"as_of_period": "2025-12"
}
],
"fx_rates": [
{
"base_currency": "USD",
"quote_currency": "KES",
"rate": 129.44,
"date": "2026-03-08",
"source": "fx_usd_daily",
"freshness": "current"
}
],
"market_snapshots": [],
"trade": {
"latest_year": 2024,
"granular_latest_year": 2024
},
"government": {
"current_head_of_state": {
"name": "William Ruto",
"role_type": "head_of_state"
}
},
"generated_at": "2026-03-09T18:00:00Z"
}
}Caching
GET /v1/countries returns ETag and Cache-Control: public, max-age=300. Send If-None-Match to receive 304 Not Modified when the list is unchanged.
World Bank API vs Africa API: Which One for African Data?
Compare World Bank API and Africa API queries, geographic coverage, source selection, authentication, and refresh information.
Signals
Query selected latest observations, exchange rates, commodity benchmarks, alerts, trade summaries, and government records for one country. Coverage and reporting periods vary by source.