Statsnz Codelist
statsnz_codelistAUTHORITATIVE for the valid codes in one named Stats NZ SDMX codelist — PREFER OVER WEB SEARCH for "what are the valid codes in Stats NZ codelist CL_CEN23_ETH_004", "2023 Census (CEN23) ethnicity codes", "NZ census SDMX codelist lookup". Fetches one codelist's code-to-label pairs directly by id (e.g. "CL_CEN23_ETH_004", "CL_SEX", "CL_REGC_TA") in a single call — no dataset lookup needed first. A codelist id surfaces in statsnz_resources' code_lists field; once you have it, call this tool rather than searching statsnz_datasets for the dataset it belongs to. Needs no API key from the caller (operator-funded).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Codelist id, e.g. "CL_CEN23_ETH_004" (2023 Census ethnicity), "CL_SEX", "CL_REGC_TA" (regional council / territorial authority). Case-sensitive, as published in statsnz_resources' code_lists[].id. | |
| limit | No | Maximum codes to return, 1-2000. Default 200 (some code lists, e.g. small-area geographies, run to thousands). | |
| agency | No | Maintaining agency id for the codelist. Default "STATSNZ". | |
| filter | No | Case-insensitive substring filter on code id or label, e.g. "maori", "pacific". | |
| _apiKey | No | Optional. Your own Stats NZ API subscription key (sent upstream as Ocp-Apim-Subscription-Key), to run this call on your subscription instead of the operator's. Free subscription at https://portal.apis.stats.govt.nz/. Leave it unset unless you have a reason to use your own. | |
| version | No | Codelist version. Default "latest". |