FAO FAOSTAT · Schema

FAOSTAT Data Record

A single statistical observation from the FAOSTAT database. Each record represents one measurement of an element (e.g. area harvested, production quantity) for a specific area, item, and year combination.

agriculturefood securitystatisticstradeland useenvironmentUNopen data

Properties

Name Type Description
Area Code integer FAO numeric area code identifying the country or region
Area Code (M49) string UN M49 numeric area code
Area Code (ISO2) string ISO 3166-1 alpha-2 country code
Area Code (ISO3) string ISO 3166-1 alpha-3 country code
Area string Human-readable area name
Item Code integer FAO numeric item (commodity) code
Item Code (CPC) string Central Product Classification (CPC) item code
Item string Human-readable item (commodity) name
Element Code integer Numeric element code identifying the statistical measure
Element string Human-readable element (statistical measure) name
Year Code integer Numeric year code (typically equal to Year for single-year data)
Year integer Reference year for the observation
Unit string Unit of measurement for the value
Value numbernull Observed statistical value, or null if missing/unreported
Flag string Data quality or source flag code
Flag Description string Human-readable description of the flag meaning
Note stringnull Additional context or notes for this observation
View JSON Schema on GitHub

JSON Schema

data-record.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/unfao/main/json-schema/data-record.json",
  "title": "FAOSTAT Data Record",
  "description": "A single statistical observation from the FAOSTAT database. Each record represents one measurement of an element (e.g. area harvested, production quantity) for a specific area, item, and year combination.",
  "type": "object",
  "properties": {
    "Area Code": {
      "type": "integer",
      "description": "FAO numeric area code identifying the country or region",
      "examples": [5, 106, 231]
    },
    "Area Code (M49)": {
      "type": "string",
      "description": "UN M49 numeric area code",
      "pattern": "^[0-9]{3}$",
      "examples": ["156", "840", "356"]
    },
    "Area Code (ISO2)": {
      "type": "string",
      "description": "ISO 3166-1 alpha-2 country code",
      "pattern": "^[A-Z]{2}$",
      "examples": ["CN", "US", "IN"]
    },
    "Area Code (ISO3)": {
      "type": "string",
      "description": "ISO 3166-1 alpha-3 country code",
      "pattern": "^[A-Z]{3}$",
      "examples": ["CHN", "USA", "IND"]
    },
    "Area": {
      "type": "string",
      "description": "Human-readable area name",
      "examples": ["China", "United States of America", "India"]
    },
    "Item Code": {
      "type": "integer",
      "description": "FAO numeric item (commodity) code",
      "examples": [15, 27, 56]
    },
    "Item Code (CPC)": {
      "type": "string",
      "description": "Central Product Classification (CPC) item code",
      "examples": ["0111", "0112", "0113"]
    },
    "Item": {
      "type": "string",
      "description": "Human-readable item (commodity) name",
      "examples": ["Wheat", "Maize (corn)", "Rice"]
    },
    "Element Code": {
      "type": "integer",
      "description": "Numeric element code identifying the statistical measure",
      "examples": [5510, 5312, 5525]
    },
    "Element": {
      "type": "string",
      "description": "Human-readable element (statistical measure) name",
      "examples": ["Area harvested", "Production", "Yield"]
    },
    "Year Code": {
      "type": "integer",
      "description": "Numeric year code (typically equal to Year for single-year data)",
      "minimum": 1961,
      "examples": [2020, 2021, 2022]
    },
    "Year": {
      "type": "integer",
      "description": "Reference year for the observation",
      "minimum": 1961,
      "examples": [2020, 2021, 2022]
    },
    "Unit": {
      "type": "string",
      "description": "Unit of measurement for the value",
      "examples": ["ha", "tonnes", "hg/ha", "1000 US$", "Head"]
    },
    "Value": {
      "type": ["number", "null"],
      "description": "Observed statistical value, or null if missing/unreported",
      "examples": [23400000, 134250000, 57.3]
    },
    "Flag": {
      "type": "string",
      "description": "Data quality or source flag code",
      "examples": ["A", "E", "F", "Im", "M", "T"]
    },
    "Flag Description": {
      "type": "string",
      "description": "Human-readable description of the flag meaning",
      "examples": [
        "Official figure",
        "FAO estimate",
        "FAO data based on imputation methodology",
        "Country data made official by FAO",
        "Missing value",
        "Unofficial figure"
      ]
    },
    "Note": {
      "type": ["string", "null"],
      "description": "Additional context or notes for this observation"
    }
  },
  "required": ["Area Code", "Area", "Item Code", "Item", "Element Code", "Element", "Year", "Unit"],
  "additionalProperties": true
}