Use Cases
African Indicators and Time Series API
Query African indicators, latest values, rankings, and time series across countries and categories with Africa API.
Use this part of Africa API when your product needs historical data, latest values, indicator discovery, or country rankings.
This is the best fit for:
- dashboards and analytics products
- research workflows
- country comparisons
- scoring models and monitoring systems
- time-series visualizations
Start with /v1/indicators when you need discovery. Start with /v1/data when you already know the metric you want.
Start With These Endpoints
Discover indicators
Use /v1/indicators to browse available metrics and coverage.
Query observations
Use /v1/data for latest values and time series.
Metric detail
Use /v1/indicators/{metric_key} to inspect one indicator.
Country rankings
Use /v1/indicators/{metric_key}/rankings for ranked comparisons.
Example: Discover Climate Indicators
curl "https://api.africa-api.com/v1/indicators?category=climate&has_data=true" \
-H "Authorization: Bearer $AFRICA_API_KEY"This is a good first step when you know the topic area but not the exact metric keys yet.
Example: Compare GDP Across Countries
curl "https://api.africa-api.com/v1/data?country_codes=ng,ke,za&metric_key=gdp_current_usd&year=2024" \
-H "Authorization: Bearer $AFRICA_API_KEY"Use /v1/data for side-by-side comparisons when you already know the metric key and the slice you want.
Example: Get The Latest Value For One Metric
curl "https://api.africa-api.com/v1/data?country_code=ke&metric_key=population_total&latest=true" \
-H "Authorization: Bearer $AFRICA_API_KEY"This is the simplest pattern for “give me the most recent known value for this metric.”
Example: Rank Countries By One Indicator
curl "https://api.africa-api.com/v1/indicators/gdp_current_usd/rankings?year=2024&limit=10" \
-H "Authorization: Bearer $AFRICA_API_KEY"Rankings are useful when you need leaderboards, comparison tables, or shortlist screens.
When To Use data Vs indicators
- Use
/v1/indicatorsto discover what exists. - Use
/v1/indicators/{metric_key}to inspect one metric and its metadata. - Use
/v1/datato fetch observations for charts, tables, and analysis. - Use
/v1/indicators/{metric_key}/rankingswhen you need sorted country comparisons. - Use country
signalswhen you want a compact country snapshot instead of a metric-driven query.
Categories Currently Covered
Common categories include:
- demographics
- economy
- agriculture
- energy
- climate
- health
- education
- infrastructure
Related Docs
Data reference
Canonical observation queries across countries, years, categories, and sources.
Indicators reference
Discover metric definitions, coverage, and rankings.
Economy guide
Examples for macroeconomic indicator workflows.
Climate guide
Examples for climate-related discovery and time-series use cases.