Food and Agriculture Organization
The FAO provides authoritative global statistics on agriculture, food production, nutrition, forestry, and fisheries. Essential resource for understanding global food systems, agricultural trends, and food security challenges
import requests
url = "https://fenixservices.fao.org/faostat/api/v1/en/data/QCL"
params = {
"area": "231", # United States
"element": "5510", # Production quantity
"item": "56", # Maize
"year": "2020,2021,2022",
"output_type": "objects"
}
r = requests.get(url, params=params)
for row in r.json()["data"][:5]:
print(row["Year"], row["Value"], row["Unit"]) Cost
Free
Access type
open
Signup required
No
Update alerts
Not offered
Coverage
global
Update frequency
monthly
Source Documentation
What You're Getting
FAO (FAOSTAT) is the primary global source for agricultural statistics — crop production by commodity and country, food supply/demand balances, trade in agricultural commodities, land use, fertilizer consumption, food prices, and food security indicators. Covers 245 countries/territories × 200+ commodity codes × 1961–present. Also includes AQUASTAT (water), FishStat (fisheries), and Forestry data in separate portals.
Ingestion Strategy
Use the FAOSTAT API for targeted queries or download bulk ZIP files for full dataset loads. The bulk ZIP approach is more reliable for initial loads — each domain (e.g. "Production", "Trade") is a separate ZIP containing a CSV of all data + metadata files.
import requests, zipfile, io, pandas as pd
# Bulk download of Production dataset
url = "https://bulks-faostat.fao.org/production/Production_Crops_Livestock_E_All_Data.zip"
r = requests.get(url, stream=True)
z = zipfile.ZipFile(io.BytesIO(r.content))
df = pd.read_csv(z.open("Production_Crops_Livestock_E_All_Data_NOFLAG.csv"), encoding="latin-1")
Rate Limits & API Details
- No authentication required for API or bulk downloads
- API endpoint:
fenixservices.fao.org/faostat/api/v1/en/data/{domain_code} - Bulk ZIP downloads:
bulks-faostat.fao.org/production/— updated after each annual release - Domain codes: QCL (crops), TP (trade), FBSH (food balance), FBS (food balance new), ASTI (R&D)
Schema Stability
FAO commodity codes (FCL codes) are stable but FAO is migrating to CPC 2.1 classification — some series have methodology breaks around 2010. Item codes and element codes are documented in the metadata CSV inside each ZIP. Country codes follow M49 standard (numeric) — map to ISO 3166 in your geography dimension.
Data Quality Gotchas
- Flags column: FAO embeds data quality flags (A = official figure, E = estimated, I = imputed, M = missing) — always store and filter on this
- Two food balance series: FBS (2010+) and FBSH (pre-2010) use different methodology — joining them requires adjustment factors
- Encoding: bulk CSVs use Latin-1 encoding, not UTF-8 — specify
encoding="latin-1"in your parser - Crop year vs calendar year: production data uses crop years that don't align with calendar years for all countries
Tool Compatibility
- Python:
faostatPyPI package; or direct bulk ZIP download + pandas - R:
FAOSTATCRAN package - dbt: works well after initial load; build a commodity dimension from the metadata CSVs
- Airbyte: no official connector; bulk ZIP + cloud storage is the standard pattern
Benchmarking Approach
Global wheat production should be ~780M tonnes for 2022. Total country rows in Production_Crops_Livestock: expect ~3M+ rows. After annual release (typically Q4), verify new year data is present for top-10 wheat producers. Track flag distribution — if estimated/imputed flags exceed 30% for a country, flag as low-quality coverage. Spot-check against USDA PSD for major crops.
Notable Datasets
1 total- ▸ FAOSTAT\nAgricultural Production Database\nFood Security Indicators\nFishery Statistics
Access
- Cost
- Free
- Access type
- Open
- Update alerts
- Not offered
Data Profile
- Coverage
- Global
- Frequency
- Monthly
- History from
- 1965
- Source updated
- Jan 2025
Data Formats
How to Access
- 🌐 Browser/UI
- 📦 Bulk Export
Index entry
Added: Apr 30, 2026
Last indexed: May 2, 2026
~ Community-sourced entry