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=agriculture
  • GET /v1/data?category=agriculture
  • GET /v1/countries/{country_code}/profile
  • GET /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/data for a time series.
  • Use country profiles for selected agriculture, economic, and infrastructure indicators.

Useful Metrics

  • agricultural_land_1000ha
  • arable_land_1000ha
  • forest_land_1000ha
  • land_equipped_for_irrigation_1000ha
  • maize_production_tonnes
  • wheat_production_tonnes
  • rice_production_tonnes
  • maize_yield_kg_per_ha
  • wheat_yield_kg_per_ha
  • rice_yield_kg_per_ha
  • cattle_stock_head
  • chicken_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.

On this page