Get data from an SSB table
statistics_get_dataFetch numbers from an SSB table as labelled rows. Choose values per dimension in select with codes from statistics_describe_table: a list of codes, '*' for all, {'latest': N} for the last N periods, or {'from': code}. Dimensions you leave out are totalled where SSB allows it; time defaults to the latest period. The size is checked before anything is fetched.
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": {
"table_id": "<table_id>"
},
"name": "statistics_get_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | Language of titles and labels. Codes are the same in both. | en |
| select | No | Values to fetch per dimension code. A time dimension left out gets its latest value; other dimensions that can be omitted are totalled. | |
| max_rows | No | ||
| table_id | Yes | SSB table id, e.g. '07459'. Find ids with statistics_search_tables. | |
| codelists | No | Optional codelist per dimension, e.g. {'Region': 'agg_Fylker2024'} to get counties. Codes in `select` then refer to that codelist. |