Microproduct data guideintermediate

FAOSTAT Food and Agriculture

Country food, agriculture, and land-use statistics for building commodity and food-security comparison tools.

At a glance

Difficulty
Intermediate — some data preparation helps
Size
Medium · ≤1 GB
Formats
JSON, CSV, Excel
Access
API or Download
API key
Not required
Provider
Food and Agriculture Organization of the United Nations
Updates
Annual

From source to product signal

Test a product idea in four steps

FAOSTAT's JSON API returns one domain, item, and area at a time. Start with wheat production for one country. National questionnaires, modelled estimates, and unit changes all affect comparisons.

1

Check the setup

  • Python 3.10 or newer
  • A notebook environment such as Jupyter or Google Colab
  • An internet connection
2

Access the data

  1. 1.Open FAOSTAT Data and choose the Crops and livestock products domain.
  2. 2.Request one item, one area, and a short year list.
  3. 3.Cite FAO with the domain and access date.
Open official source
3

Run the Python example

Install the packages, then run the notebook cell.

python -m pip install pandas requests

import pandas as pd
import requests

response = requests.get(
    "https://fenixservices.fao.org/faostat/api/v1/en/data/QCL",
    params={
        "area": 231,
        "item": 15,
        "element": 5510,
        "year": "2018,2019,2020,2021,2022",
    },
    timeout=30,
)
response.raise_for_status()
crops = pd.DataFrame(response.json()["data"])
crops["retrieved_at_utc"] = pd.Timestamp.now(tz="UTC")
print(crops.head())
4

Test a useful signal

Track U.S. wheat production

Test whether one FAOSTAT series can power a bounded commodity sketch.

  1. 01Keep area, item, year, value, and unit from the extract.
  2. 02Plot production over the requested years and note missing years.
  3. 03Cite FAO and explain that questionnaire coverage and unit definitions can change across years.

Dataset details

Food and Agriculture Organization of the United Nations is an intergovernmental source. Last verified 2026-08-18. Temporal coverage: item- and country-specific FAOSTAT series.

Theme

Demographics & Development

Domains

AgricultureFood ScienceInternational Statistics

Data types

Time SeriesTabular

Tasks

Country ComparisonCommodity MonitoringFood Security Analysis

Geography

Global

Formats

JSONCSVExcel

Provider

Food and Agriculture Organization of the United Nations

Data terms

FAO terms and conditions