Economics
Data source: Statistics Sweden (SCB)
MCP Protocol
Endpoint
https://context.gnist.ai/mcp/scb/
claude_desktop_config.json
{
"mcpServers": {
"gnist-scb": {
"url": "https://context.gnist.ai/mcp/scb/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Shell
curl -X POST "https://context.gnist.ai/mcp/scb/" \
-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": "browse_subject", "arguments": {"path": "example"}}}'
REST API
API Root
https://context.gnist.ai/rest/scb/
5 endpoints available:
GET /rest/scb/list_subjectsGET /rest/scb/browse_subjectGET /rest/scb/get_table_metadataGET /rest/scb/get_dataGET /rest/scb/report_feedback
Shell
curl "https://context.gnist.ai/rest/scb/browse_subject?path=example" \ -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx
resp = httpx.get(
"https://context.gnist.ai/rest/scb/browse_subject",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
params={
"path": "example"
},
)
print(resp.json())
Command Line
Command
gc scb
CLI documentation will be available when the GnistAI SDK is published.
Install
pip install gnistai
Available Tools (5)
list_subjectsList SCB's top-level statistical subject categories.
| Parameter | Type | Required | Description |
|---|---|---|---|
lang | string | optional | Language — 'en' for English, 'sv' for Swedish. (default: "en") |
browse_subjectBrowse a subject path to find sub-categories and tables.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | required | Subject path (e.g. 'BE', 'BE/BE0101', 'AM/AM0401'). |
lang | string | optional | Language — 'en' or 'sv'. (default: "en") |
get_table_metadataGet the structure of an SCB table — its dimensions, variables, and valid values.
| Parameter | Type | Required | Description |
|---|---|---|---|
table_path | string | required | Full path to the table (e.g. 'BE/BE0101/BE0101A/BefolkManadCKM'). |
lang | string | optional | Language — 'en' or 'sv'. (default: "en") |
get_dataQuery data from an SCB statistical table.
| Parameter | Type | Required | Description |
|---|---|---|---|
table_path | string | required | Full path to the SCB table. |
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 'sv'. (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") |