Oecd Get Dimension Values
oecd_get_dimension_valuesFetch the valid codes and labels for one dimension of a dataflow. Use to resolve human-readable names (countries, measures) to SDMX codes before querying with oecd_query_dataset. Pass 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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum codes to return (1–500, default 50). | |
| 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". Omit to page the whole codelist. | |
| 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. | |
| 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. | |
| dimension_id | Yes | Dimension identifier to fetch codes for — e.g. "REF_AREA" or "MEASURE". Obtain valid dimension IDs from oecd_get_dataset_info. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| codes | No | The requested page of codes, after query, offset, and limit are applied. | |
| error | No | Present when the call failed. Absent on success. | |
| notice | No | Present when the page needs explaining — the dimension has no codelist, the query matched nothing, or codes remain beyond the page. States how to reach the rest. | |
| source | No | Data source attribution — always "OECD". | |
| 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. | |
| totalCount | No | Codes matching before offset and limit, disclosed when the page does not cover them all. | |
| dimension_id | No | The dimension whose codes are listed. | |
| effectiveQuery | No | The substring filter as applied. Absent when the whole codelist was paged. |