africaAPI

Start Here

Quickstart

Create an API key, make a first request, and move from country lookups to current signals and historical data.

Most /v1/* routes require an API key. Generate one in the dashboard before you start integrating.

Integration Strategy

Treat Africa API as one client with reusable transport concerns:

  • one base URL
  • one bearer-token strategy
  • one error handling path
  • feature modules on top (countries, signals, data, markets, trade, government)

The fastest way to get value from the platform is:

  1. check Coverage to see the live country and domain map
  2. start with /v1/countries/{country_code}/signals for a compact service-ready snapshot
  3. move to /v1/data when you need explicit metrics, time series, or comparisons

Create an API key

open "https://africa-api.com/dashboard"

Create an account or sign in, then generate an API key in the dashboard.

Export your API key

export AFRICA_API_KEY="your_api_key_here"

Fetch a current country snapshot

curl "https://api.africa-api.com/v1/countries/ng/signals" \
  -H "Authorization: Bearer $AFRICA_API_KEY"

Fetch a country record

curl "https://api.africa-api.com/v1/countries/ng" \
  -H "Authorization: Bearer $AFRICA_API_KEY"

Query historical or latest data

curl "https://api.africa-api.com/v1/data?country_code=ke&metric_key=population_total&latest=true" \
  -H "Authorization: Bearer $AFRICA_API_KEY"

Explore a domain route

curl "https://api.africa-api.com/v1/trade/overview/ng?top_limit=5" \
  -H "Authorization: Bearer $AFRICA_API_KEY"

Optional operational checks

Use these only when you need deployment or freshness context:

curl "https://api.africa-api.com/health"
curl "https://api.africa-api.com/v1/platform/version"

Next Steps

On this page