SSB Norway Table Data
ssbnorway.data.queryFetch statistical data from a specific SSB Norway table using dimension filters. Returns a JSON-stat2 dataset with dimension labels, value arrays, and metadata (updated timestamp, source, notes). Use ssbnorway.data.search to find the table ID, ssbnorway.data.metadata to get valid dimension codes and values, then pass them here as a query array. Each filter specifies a dimension code and selected values. Use filter="item" with specific value codes to select rows, filter="top" with count to get the N most recent years. Unfiltered dimensions with elimination=true are aggregated into totals. Covers 1,900+ statistical domains across Norway.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Array of dimension filters. Each filter selects specific values for one variable. Unfiltered dimensions are aggregated (eliminated) if elimination=true, or omitted. Example: [{code:'ContentsCode',selection:{filter:'item',values:['Personer1']}}, {code:'Tid',selection:{filter:'top',values:['3']}}]. Response is JSON-stat2 with label, updated, dimension map, and values array. | |
| table_id | Yes | SSB table ID to query — the numeric ID from ssbnorway.search or ssbnorway.metadata. Example: "07459" for population, "09842" for GDP. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present only when the call failed. Includes error code, message, request_id, and any provider-specific extras. | |
| result | No | Tool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response. |