Faostat Dimensions
faostat_dimensionsThe valid codes for one dimension of one FAOSTAT domain, the country/area codes, element codes (production quantity, area harvested, yield, import value, ...), item codes (wheat, cattle, nitrogen fertiliser, ...) or years a domain actually carries. Call this BEFORE faostat_data: FAOSTAT codes are numeric and domain-specific, so guessing them returns nothing rather than an error. Example: domain "QCL" dimension "element" lists production quantity (5510), area harvested (5312) and yield (5412); domain "QCL" dimension "item" lists the crops and livestock products. Answers keylessly from a stored copy of FAO's bulk files for five domains (QCL crops and livestock production, FBS food balances 2010-, PP producer prices, RL land use, CP consumer price indices, monthly), with the data date in every answer; any other domain needs _apiKey for FAO's account-gated live API.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"dimension": "element",
"domain_code": "QCL"
},
"name": "faostat_dimensions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max codes to return (default 50, max 1000). | |
| search | No | Case-insensitive substring filter on the code label, e.g. "wheat". | |
| _apiKey | No | Optional. A FAOSTAT access token, or "email:password" for a FAOSTAT account: sends the call live to FAO's account-gated query API (any domain). Without it the call is answered from the stored copy of QCL, FBS, PP, RL and CP. | |
| dimension | Yes | Which dimension to list: "area" (countries and territories), "areagroup" (regional aggregates), "element" (the measured quantity), "item" (the commodity), "itemsgroup" (commodity aggregates), "year", "flag" (data-quality flags) or "unit". | |
| domain_code | Yes | FAOSTAT domain code from faostat_domains, e.g. "QCL". |