Economics
Data source: Statistics Norway (SSB)
MCP Protocol
Endpoint
https://context.gnist.ai/mcp/ssb/
claude_desktop_config.json
{
"mcpServers": {
"gnist-ssb": {
"url": "https://context.gnist.ai/mcp/ssb/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Shell
curl -X POST "https://context.gnist.ai/mcp/ssb/" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_tables", "arguments": {"query": "example"}}}'
REST API
API Root
https://context.gnist.ai/rest/ssb/
6 endpoints available:
GET /rest/ssb/search_tablesGET /rest/ssb/get_table_metadataGET /rest/ssb/get_dataGET /rest/ssb/list_subjectsGET /rest/ssb/browse_subjectGET /rest/ssb/report_feedback
Shell
curl "https://context.gnist.ai/rest/ssb/search_tables?query=example" \ -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx
resp = httpx.get(
"https://context.gnist.ai/rest/ssb/search_tables",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
params={
"query": "example"
},
)
print(resp.json())
Command Line
Command
gc ssb
CLI documentation will be available when the GnistAI SDK is published.
Install
pip install gnistai
Available Tools (6)
search_tablesSearch SSB's statistical table catalog by keyword.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | Search keywords (e.g. 'population by municipality'). |
lang | string | optional | Language — 'en' for English, 'no' for Norwegian (default 'en'). (default: "en") |
get_table_metadataGet the structure of an SSB table — its dimensions, variables, and valid values.
| Parameter | Type | Required | Description |
|---|---|---|---|
table_id | string | required | SSB table ID (e.g. '07459' for population, '03013' for CPI). |
lang | string | optional | Language — 'en' or 'no'. (default: "en") |
get_dataQuery data from an SSB statistical table.
| Parameter | Type | Required | Description |
|---|---|---|---|
table_id | string | required | SSB table ID. |
filters | any | optional | List of dimension filters. See get_table_metadata for valid codes. |
top_n | integer | optional | If no filters given, fetch this many latest time periods (default 5). (default: 5) |
lang | string | optional | Language — 'en' or 'no'. (default: "en") |
list_subjectsList SSB's top-level subject categories.
| Parameter | Type | Required | Description |
|---|---|---|---|
lang | string | optional | Language — 'en' or 'no'. (default: "en") |
browse_subjectBrowse a subject path to find sub-categories and tables.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | required | Subject path (e.g. 'bb', 'bb/bb01'). |
lang | string | optional | Language — 'en' or 'no'. (default: "en") |
report_feedbackReport a bug, feature request, or general feedback for this data source.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |