Dennery AgentNative

All API connectors

Statistics Sweden (SCB) key tables

Statistics Sweden statistics tables through its open data API: a fixed list of key tables (population, cpi, gdp_quarterly, labour_force_monthly, house_prices_county, births) with table structure lookup and bounded data queries.

No API key needed to call

Source
Statistics Sweden open data API
Licence and terms
CC0 1.0
Coverage
Sweden
Refresh cadence
Answers are shared and cached for 21600 seconds.

Questions you can ask

Operations

Statistics Sweden table structure

Answers: which variables, codes and sample values does a Statistics Sweden statistics table have, and which can be left out? Call this before scb_sweden_table_data.

tablerequired, string, population | cpi | gdp_quarterly | labour_force_monthly | house_prices_county | births, Table: population (population by region, marital status, age, sex, yearly); cpi (consumer price index 2020=100, monthly); gdp_quarterly (GDP by expenditure, quarterly); labour_force_monthly (labour force survey, monthly); house_prices_county (house price index by county, yearly); births (bi...

Example: What variables does the Statistics Sweden population table have?

Over MCP

{"tool":"call_connector_operation","arguments":{"connector":"scb_sweden","operation":"scb_sweden_table_info","params":{"table":"population"}}}

Over HTTP

curl '/v1/connectors/scb_sweden/scb_sweden_table_info?table=population'

Statistics Sweden table data

Answers: What was the population of Sweden in the latest years? Returns the newest values first with the codes that vary.

tablerequired, string, population | cpi | gdp_quarterly | labour_force_monthly | house_prices_county | births, Table: population (population by region, marital status, age, sex, yearly); cpi (consumer price index 2020=100, monthly); gdp_quarterly (GDP by expenditure, quarterly); labour_force_monthly (labour force survey, monthly); house_prices_county (house price index by county, yearly); births (bi...
selectionsrequired, string, Selections as Code=value pairs separated by semicolons; several values for one variable are comma separated (up to 20), for example Region=00;ContentsCode=BE0101N1;Tid=top:3. Use top:N as the only value of the time variable for its latest N periods. Variable codes and values come from the table_info operation. Variables that can be omitted are summed to their total when left out.

Example: What was the population of Sweden in the latest years?

Over MCP

{"tool":"call_connector_operation","arguments":{"connector":"scb_sweden","operation":"scb_sweden_table_data","params":{"table":"population","selections":"Region=00;ContentsCode=BE0101N1;Tid=top:3"}}}

Over HTTP

curl '/v1/connectors/scb_sweden/scb_sweden_table_data?table=population&selections=Region%3D00%3BContentsCode%3DBE0101N1%3BTid%3Dtop%3A3'

Source notice

Source: Statistics Sweden. Terms: "We use the licence CC0 for this data, which means that you may use and disseminate or provide such data without any requirement to state the source." The agency recommends "Source: Statistics Sweden". Values are trimmed and reordered here; the publisher does not endorse this presentation.