FAO FAOSTAT Metadata API

Operations for retrieving dataset and indicator metadata

Operations 2

GET /{lang}/definitions/types/flag List all data quality flags #
GET /{lang}/metadata/{domain} Get metadata for a FAOSTAT domain #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/unfao-metadata-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

unfao-metadata-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: FAOSTAT Data Metadata API
  description: The Food and Agriculture Organization (FAO) of the United Nations FAOSTAT REST API provides programmatic access to the world's largest freely accessible database for food and agriculture statistics. FAOSTAT covers 180+ countries from 1961 to present across 70+ thematic domains including agricultural production, food security, trade flows, land use, environmental indicators, food balances, and prices. No authentication is required for public data access.
  version: 1.0.0
  contact:
    name: FAOSTAT Support
    email: faostat@fao.org
    url: https://www.fao.org/faostat/en/#developer-portal
  license:
    name: CC BY-NC-SA 3.0 IGO
    url: https://creativecommons.org/licenses/by-nc-sa/3.0/igo/
  termsOfService: https://www.fao.org/contact-us/terms/en/
servers:
- url: https://fenixservices.fao.org/faostat/api/v1
  description: FAOSTAT API v1 Production Server
tags:
- name: Metadata
  description: Operations for retrieving dataset and indicator metadata
paths:
  /{lang}/definitions/types/flag:
    get:
      tags:
      - Metadata
      operationId: getFlags
      summary: List all data quality flags
      description: Returns all FAOSTAT data quality and source flags with their descriptions. Flags indicate whether data is official, estimated, calculated, FAO projection, etc.
      parameters:
      - $ref: '#/components/parameters/lang'
      responses:
        '200':
          description: Successful response with flag definitions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlagListResponse'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /{lang}/metadata/{domain}:
    get:
      tags:
      - Metadata
      operationId: getDomainMetadata
      summary: Get metadata for a FAOSTAT domain
      description: Returns descriptive metadata for a FAOSTAT domain including methodology, coverage, concepts, and data sources.
      parameters:
      - $ref: '#/components/parameters/lang'
      - $ref: '#/components/parameters/domain'
      responses:
        '200':
          description: Successful response with domain metadata
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainMetadata'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    domain:
      name: domain
      in: path
      required: true
      description: FAOSTAT domain code (e.g. QCL for Crops and livestock products, TM for Trade, RL for Land Use)
      schema:
        type: string
      example: QCL
    lang:
      name: lang
      in: path
      required: true
      description: Response language code (en=English, es=Spanish, fr=French, ar=Arabic, zh=Chinese, ru=Russian)
      schema:
        type: string
        enum:
        - en
        - es
        - fr
        - ar
        - zh
        - ru
        default: en
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
        code:
          type: integer
          description: Error code
    DomainMetadata:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              Metadata Element:
                type: string
                description: Metadata element name
              Metadata:
                type: string
                description: Metadata content
    FlagListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Flag'
    Flag:
      type: object
      properties:
        Flag:
          type: string
          description: Flag code
          example: A
        Description:
          type: string
          description: Flag description
          example: Official figure
  responses:
    NotFound:
      description: Domain or resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
externalDocs:
  description: FAOSTAT Developer Portal
  url: https://www.fao.org/faostat/en/#developer-portal