Oecd Get Dimension Values
oecd_get_dimension_valuesFetch the valid codes and labels for one dimension of a dataflow, including each code's parent ID in hierarchical codelists. Use to resolve human-readable names (countries, measures) to SDMX codes before querying with oecd_query_dataset. Pass parent to list direct children of one parent code, or query to match a code or label by substring — codelists run to a thousand-plus entries, and the response is a page of at most limit codes either way. A codelist is shared across dataflows and can list codes this one holds no data for: pass available_only to list only the codes with data, or key to list the codes with data given the key's other segments — a structure read, never a data download.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"flow_ref": "<flow_ref>",
"dimension_id": "<dimension_id>"
},
"name": "oecd_get_dimension_values"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | Dot-delimited key in the oecd_query_dataset form, one segment per dimension in the order oecd_get_dataset_info gives — empty for a wildcard, "+" between codes, or "all". Lists the codes of this dimension that have data given the key's other segments, so pass the key you plan to query. Implies available_only. | |
| limit | No | Maximum codes to return. Default 50; a larger value returns at most 10,000 and says so. | |
| query | No | Case-insensitive substring matched against both the code and its label, so "PA" and "percent" each reach the code "PA" / "Percent per annum". Applied after available_only, key, and parent. Omit to page the full matching list. | |
| offset | No | Zero-based index of the first code to return within the matching list, applied before limit. Advance it to page; an offset past the last match returns an empty page. | |
| parent | No | Filter to codes whose parent code equals this value (exact case-sensitive code match, e.g. "FRA" for France's TL2 regions). Applied after available_only and key, and before query, offset, and limit. Omit to include codes at all hierarchy levels. | |
| version | No | Published dataflow edition, for example 1.1. Omit to use the latest edition. | |
| flow_ref | Yes | Full flow reference — e.g. "OECD.SDD.NAD,DSD_NAAG@DF_NAAG_I", or the bare "OECD.TAD.ARP,DF_AEI2024_DASHBOARD" form for a dataflow published without a datastructure prefix. Obtain from oecd_search_datasets. | |
| end_period | No | Inclusive upper SDMX period bound, e.g. "2024" or "2024-Q4". A nonblank value implies available_only. | |
| dimension_id | Yes | Dimension identifier to fetch codes for — e.g. "REF_AREA" or "MEASURE". Obtain valid dimension IDs from oecd_get_dataset_info. | |
| start_period | No | Inclusive lower SDMX period bound, e.g. "2024" or "2024-Q1". A nonblank value implies available_only. | |
| available_only | No | List only the codes of this dimension that have data in this dataflow, from OECD's availability record, with the time_range and observation_count they cover. Applied before parent, query, offset, and limit. Default false: the whole codelist. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| codes | No | The requested page of codes, after available_only, parent, query, offset, and limit are applied. | |
| error | No | Present when the call failed. Absent on success. | |
| notice | No | Present when the page needs explaining — a limit above the per-call maximum, availability that could not be read, a key that matches no series or pins a code that matches only by letter case, a dimension with no codelist, a parent filter or query that matched nothing, or codes beyond the page. One string when several apply; states how to reach the rest. | |
| source | No | Data source attribution — always "OECD". | |
| version | No | Resolved dataflow edition. | |
| flow_ref | No | The flow reference this dimension belongs to. | |
| code_count | No | Number of codes in this page — not the size of the dimension's codelist. | |
| time_range | No | Time range reported by OECD, when available. Can describe source coverage beyond the applied period bounds. | |
| totalCount | No | Codes matching after available_only, parent, and query — before offset and limit — disclosed when the page does not cover them all. | |
| dimension_id | No | The dimension whose codes are listed. | |
| available_only | No | True when codes holds only the codes with data, as OECD records them. False for the whole codelist, including when availability was asked for and could not be read — the notice then says why. | |
| effectiveQuery | No | The substring filter as applied. Absent when the whole codelist was paged. | |
| query_end_period | No | Requested upper period bound, present when applied to availability. | |
| observation_count | No | Observations under the key and applied period bounds, as OECD counts them. Present when available_only applied and OECD reported a count. | |
| query_start_period | No | Requested lower period bound, present when applied to availability. |