Use Cases
DataAfrica API (api.dataafrica.io): Migration Guide
Map selected api.dataafrica.io queries to Africa API, check differences in metrics and geography, and review endpoint checks recorded in June 2026.
If your code calls api.dataafrica.io, use this guide to compare its queries with Africa API. The mapping covers selected agriculture, climate and health data; it does not reproduce every DataAfrica metric or geography.
Africa API is independent of DataAfrica and Datawheel. This guide is a migration reference, not an announcement about DataAfrica's support or retirement status.
Endpoint checks recorded in June 2026
Earlier checks recorded the following results. They describe that point in time, not the service's current state. Recheck the exact URL and response before diagnosing a failed job.
| Checked item | Recorded result |
|---|---|
dataafrica.io website and docs | Unreachable during the check |
api.dataafrica.io/api/join (no trailing slash) | 308 Permanent Redirect to /api/join/ |
api.dataafrica.io/api/join/ (trailing slash) | Some queries returned observations from around 2015 |
Other paths (/, /api/data, profile routes) | 404 Not Found or inconsistent responses |
| Public API repository | The latest public commit recorded by the check was September 28, 2017 |
If your request receives a redirect, inspect the destination and whether your client follows it with the query parameters intact. If it succeeds, check the observation years before using the result as current data. Neither a failed request nor a public commit date establishes why a service is unavailable.
What the DataAfrica API was
DataAfrica exposed agriculture, climate, health and poverty datasets for African countries, including subnational geographies. An example of its join endpoint:
https://api.dataafrica.io/api/join/?show=year&geo=adm0_eth&required=harvested_areaExisting integrations may use api/join URLs and metric names such as rainfall_awa_mm, crop production values, or child nutrition rates. Match the definition and geographic level before replacing a query.
Map DataAfrica concepts to Africa API
The table identifies starting points for a migration. Check units, observation periods, source definitions and available countries before treating two metrics as equivalent.
| DataAfrica concept | Africa API option or coverage difference |
|---|---|
api/join single query endpoint | GET /v1/data, observation queries filtered by country_code, metric_key, category, year, and latest |
| Crops: production, yields, harvested area | GET /v1/data?category=agriculture includes selected crop production and yield metrics from FAOSTAT. Discover the available keys first; production or yield is not a substitute for harvested area |
| Land use and irrigation (rainfed vs irrigated) | agricultural_land_1000ha, arable_land_1000ha, land_equipped_for_irrigation_1000ha, forest_land_1000ha. These totals do not reproduce a rainfed/irrigated crop split |
| Livestock | cattle_stock_head, chicken_stock_1000_head |
Rainfall (rainfall_awa_mm) | Climate metrics include precipitation_7d_mm and precipitation_30d_mm. These recent windows are different measures; check the period and aggregation required by your analysis |
| Health outcomes | GET /v1/data?category=health, immunization coverage, maternal, neonatal, and under-five mortality, TB incidence (WHO GHO) |
| Child nutrition (stunted children) | stunting_under5_pct and wasting_under5_pct under category=child_welfare, from UNICEF. See the health guide |
| Child underweight (moderately underweight) | Underweight prevalence specifically is not exposed yet. Use UNICEF data or DHS directly |
| Poverty (PovcalNet-based splits) | Not exposed in this mapping. Check the World Bank's Poverty and Inequality Platform for the required measure |
Subnational geographies (adm0, adm1) | Africa API is country-level: GET /v1/geographies covers continent, region, subregion, and country |
| Country profile pages | GET /v1/countries/{country_code}/profile and /signals for a current snapshot |
Migration example
Old DataAfrica request (agriculture for Ethiopia):
GET https://api.dataafrica.io/api/join/?show=year&geo=adm0_eth&required=harvested_areaTo inspect available agriculture observations for Ethiopia:
curl "https://api.africa-api.com/v1/data?country_code=et&category=agriculture&latest=true" \
-H "Authorization: Bearer $AFRICA_API_KEY"This lists agriculture observations; it does not reproduce the old harvested_area query. For a specific measure, request its metric key. For example, maize production across countries:
curl "https://api.africa-api.com/v1/data?country_codes=et,ng,ke&metric_key=maize_production_tonnes" \
-H "Authorization: Bearer $AFRICA_API_KEY"Discover agriculture metrics with stored observations:
curl "https://api.africa-api.com/v1/indicators?category=agriculture&has_data=true" \
-H "Authorization: Bearer $AFRICA_API_KEY"Create an API key in the dashboard, then follow the quickstart for authentication and your first request.
Keep the original source when the metric does not match
For a dataset outside Africa API's coverage, query its original provider. The mapping above links to UNICEF, DHS and the World Bank Poverty and Inequality Platform for the specific gaps described there.
The DataAfrica GitHub organization is a starting point for finding the old API and site code. When reproducing an older analysis, retain its source version, observation years and geographic definitions.
Related docs
Quickstart
Create a key and make your first authenticated request.
Data reference
Query observations with explicit country, metric, year and source filters.
Agriculture guide
Crop production, yields, land use, irrigation, and livestock across Africa.
MCP server
Configure read-only Africa API tools in a compatible AI client.
African Market Data API
Query supported African exchanges, tickers, historical price observations, and source-specific FX rates.
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.