GnistAI GnistAI
Log in

SCB (Statistics Sweden)

Swedish official statistics — population, labour market, national accounts, trade, prices, environment, and economic data.

Overview   |   MCP Docs   |   API Docs   |   OpenAPI   |   Playground   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 5 tools tools 5 5 Economics

Data source: Statistics Sweden (SCB)

MCP 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"}}}'

API REST API

API Root https://context.gnist.ai/rest/scb/

5 endpoints available:

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())

OpenAPI Spec  ·  Full API Docs

CLI Command Line

Command gc scb

CLI documentation will be available when the GnistAI SDK is published.

Install
pip install gnistai

Available Tools (5)

list_subjects
List SCB's top-level statistical subject categories.
ParameterTypeRequiredDescription
langstringoptionalLanguage — 'en' for English, 'sv' for Swedish. (default: "en")
browse_subject
Browse a subject path to find sub-categories and tables.
ParameterTypeRequiredDescription
pathstringrequiredSubject path (e.g. 'BE', 'BE/BE0101', 'AM/AM0401').
langstringoptionalLanguage — 'en' or 'sv'. (default: "en")
get_table_metadata
Get the structure of an SCB table — its dimensions, variables, and valid values.
ParameterTypeRequiredDescription
table_pathstringrequiredFull path to the table (e.g. 'BE/BE0101/BE0101A/BefolkManadCKM').
langstringoptionalLanguage — 'en' or 'sv'. (default: "en")
get_data
Query data from an SCB statistical table.
ParameterTypeRequiredDescription
table_pathstringrequiredFull path to the SCB table.
filtersanyoptionalList of dimension filters. See get_table_metadata for valid codes.
top_nintegeroptionalIf no filters given, fetch this many latest time periods (default 5). (default: 5)
langstringoptionalLanguage — 'en' or 'sv'. (default: "en")
report_feedback
Report a bug, feature request, or general feedback for this data source.
ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")

Related