Guides
Agriculture
Access crop production, yields, irrigation, land use, and livestock data across African countries with historical series and latest values.
African Agriculture Data API
Query crop production, yields, irrigation, land use, and livestock observations from FAOSTAT. Available countries and years vary by metric.
Migrating queries from api.dataafrica.io? See the DataAfrica migration guide for endpoint mappings and coverage differences.
Endpoints
Agriculture data is exposed through shared indicator, data, and country-profile endpoints.
GET /v1/indicators?category=agricultureGET /v1/data?category=agricultureGET /v1/countries/{country_code}/profileGET /v1/sources/faostat_agriculture
Choose a query
- Check metric names and coverage with
/v1/indicators?category=agriculture&has_data=true. - Fetch the latest available values with
/v1/data?category=agriculture&latest=true. - Select a country, metric, and year range in
/v1/datafor a time series. - Use country profiles for selected agriculture, economic, and infrastructure indicators.
Useful Metrics
agricultural_land_1000haarable_land_1000haforest_land_1000haland_equipped_for_irrigation_1000hamaize_production_tonneswheat_production_tonnesrice_production_tonnesmaize_yield_kg_per_hawheat_yield_kg_per_harice_yield_kg_per_hacattle_stock_headchicken_stock_1000_head
Example: Compare Crop Production Across Countries
curl "https://api.africa-api.com/v1/data?country_codes=ng,et,za&metric_key=maize_production_tonnes&year=2024" \
-H "Authorization: Bearer $AFRICA_API_KEY"Example: Discover Agriculture Metrics And Coverage
curl "https://api.africa-api.com/v1/indicators?category=agriculture&has_data=true" \
-H "Authorization: Bearer $AFRICA_API_KEY"Example: Get The Latest Agriculture Snapshot For A Country
curl "https://api.africa-api.com/v1/data?country_code=ke&category=agriculture&latest=true" \
-H "Authorization: Bearer $AFRICA_API_KEY"Coverage And Source Notes
The listed series use faostat_agriculture and have annual frequency. Check each indicator's coverage for available countries and years before building a report around it. The latest available year can differ between metrics.