# Statistics Sweden API: SCB CPI, CPIF, Jobs, GDP & Any Table

Statistics Sweden (SCB) data from the official PxWebApi: CPI, CPIF and CPIF-XE, LFS unemployment, GDP and the monthly GDP indicator, and population presets, any table by id with dimension filters, and table search. Labelled rows with units.

$0.16 per 1,000 values

[Get an API key](https://pushbuild.com/apis/app/signup?api=statistics-sweden)

Example request

```
POST /statistics-sweden/run
{
  "presets": [
    "cpif",
    "unemployment"
  ],
  "maxItems": 20
}
```

## What a response looks like

POST /statistics-sweden/run{"maxItems": 5, "presets": ["cpif", "unemployment"]}

```
{"count": 5, "items": [{ "codes": {}, "contentsCode": "000007ZN", "dimensions": {}, "indicator": "CPIF, Index, 2020=100", "period": "2025-10", "periodCode": "2025M10", "preset": "cpif", "series": "CPIF, Index, 2020=100", "source": "https://www.statistikdatabasen.scb.se/pxweb/en/ssd/?tabl… "table": "TAB6590", … ]}
```

| contentsCode | indicator | period | periodCode | preset | series |
| --- | --- | --- | --- | --- | --- |
| 000007ZN | CPIF, Index, 2020=100 | 2025-10 | 2025M10 | cpif | CPIF, Index, 2020=100 |
| 000007ZN | CPIF, Index, 2020=100 | 2025-11 | 2025M11 | cpif | CPIF, Index, 2020=100 |
| 000007ZN | CPIF, Index, 2020=100 | 2025-12 | 2025M12 | cpif | CPIF, Index, 2020=100 |
| 000007ZN | CPIF, Index, 2020=100 | 2026-01 | 2026M01 | cpif | CPIF, Index, 2020=100 |
| 000007ZN | CPIF, Index, 2020=100 | 2026-02 | 2026M02 | cpif | CPIF, Index, 2020=100 |

Real rows returned by this API on 2026-11-09 for the request shown.

## What it returns

Statistics Sweden (SCB) data from the official PxWebApi v2, as labelled rows with units and ISO periods.

- **Presets**: `cpi` (CPI 2020=100: index, monthly and annual change), `cpif` (CPIF and CPIF-XE: index, monthly and annual change), `unemployment` (LFS unemployment and employment rate, seasonally adjusted, 15-74), `gdp` (quarterly GDP volume change, seasonally adjusted), `gdp-indicator` (monthly GDP indicator), `population` (monthly)
- **Any table**: give `table` with optional `filters`
- **Search**: `search` returns table ids, titles and coverage

| field | meaning |
| --- | --- |
| `table`, `tableTitle` | SCB table |
| `indicator`, `contentsCode` | the measure and its code |
| `period`, `periodCode` | ISO period (`2026-09`, `2026Q2`) and the SCB code |
| `series`, `dimensions`, `codes` | the measure plus dimension labels, and the codes to reuse in `filters` |
| `value`, `unit` | the figure and its unit as published |
| `updated`, `preset`, `source` | when SCB last updated the table, the preset used, the table page |

## Request

`POST https://api.pushbuild.com/statistics-sweden/run` with a JSON body. Send your key in the `X-API-Key` header.

| Field | Type | Description |
| --- | --- | --- |
| `presets` | list of strings | Any of: cpi, cpif, unemployment, gdp, gdp-indicator, population. Default (when no table is given): cpi, cpif, unemployment, gdp. |
| `table` | string | Any Statistics Sweden table id, e.g. TAB6596, TAB6387, TAB4553. Find ids with search. |
| `filters` | string | Dimension -> value codes, e.g. {"Kon": ["1", "2"]}. ["*"] selects all values. Dimensions left out use the table's total where it has one, else their first value; all contents are returned unless ContentsCode is filtered. |
| `lastN` | integer | How many of the latest periods to return. Default: `12`. |
| `fromPeriod` | string | Period code in the table's format, e.g. 2020M01, 2020K1, 2020. Overrides lastN. |
| `toPeriod` | string | ISO form, e.g. 2026-06 or 2026Q2. |
| `search` | string | Words to search table titles. Returns matching tables instead of data. |
| `maxItems` | integer | Maximum items to return (1-500). Default: `100`. |

### Example

```
curl -X POST https://api.pushbuild.com/statistics-sweden/run \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"presets": ["cpif", "unemployment"], "maxItems": 20}'
```

### Response

```
{"count": 20, "truncated": false, "seconds": 1.4, "items": [ { ... } ]}
```

Each call returns up to 500 items. Records that fail validation or are not found are flagged in the items and not charged.

## Pricing

Pay only for results returned: $0.16 per 1,000 values. No charge for errors or empty searches.

| Values | Cost |
| --- | --- |
| 1,000 | $0.16 |
| 10,000 | $1.60 |
| 100,000 | $16.00 |
| 1,000,000 | $160.00 |
| 6,249 a month | Free ($1 monthly credit) |

## Use it from Claude, ChatGPT or Cursor

This API is also an MCP server: `https://api.pushbuild.com/mcp/statistics-sweden`. Add it to any assistant that supports remote MCP servers, with your key in the `X-API-Key` header. Same prices. [Setup for each app](https://pushbuild.com/apis/mcp.html).

## Related APIs

- [Statistics Norway API: SSB StatBank CPI, Jobs, GDP & Homes API](https://pushbuild.com/apis/statistics-norway.html): Statistics Norway (SSB) StatBank data from the official PxWebApi: CPI, CPI-ATE, LFS unemployment, GDP and Mainland GDP growth, and existing dwelling price presets, any table by id with dimension filters, and table search.
- [Statistics Denmark API: Statbank Tables, CPI, GDP & Rates API](https://pushbuild.com/apis/statistics-denmark.html): Any of Statistics Denmark's ~2,300 Statbank tables by id with dimension filters, plus presets for CPI, unemployment, GDP, population and Nationalbank policy rates, and a table search.
- [Statistics Finland API: StatFin CPI, Jobs, GDP & Any Table API](https://pushbuild.com/apis/statistics-finland.html): Statistics Finland (StatFin) data from the official PxWeb API: CPI (2025=100, annual and monthly change), LFS unemployment and employment rate, and GDP presets, any StatFin table by path with variable filters, and table search.
- [Statistics Iceland API: CPI, Population & Tables API](https://pushbuild.com/apis/statistics-iceland-data.html): Official Statistics Iceland (Hagstofa) data: monthly CPI and inflation, quarterly population, GDP, a folder browser, table search and any official Icelandic table with filters, from the PxWeb API..
- [Swiss National Bank API: Policy Rate, SARON, CHF FX & CPI API](https://pushbuild.com/apis/swiss-national-bank-data.html): Swiss National Bank statistics from its official data portal: SNB policy rate, SARON and sight deposit rates (daily), Swiss franc exchange rates, CPI, M1/M2/M3 and SNB gold and foreign currency holdings.
- [Statistics Slovenia API: CPI, GDP, Unemployment & Any Table API](https://pushbuild.com/apis/statistics-slovenia-data.html): Statistical Office of Slovenia (SURS) data from its official PxWeb API: monthly CPI, quarterly GDP and monthly unemployment presets, any table with variable filters, and table search.

## Tell us what you need built.

Questions about this API, higher volumes, or a data source you need that we don't cover yet.

[hello@pushbuild.com](mailto:hello@pushbuild.com?subject=API%20question)

## New APIs and data, twice a month

New data APIs, coverage changes and analysis from Pushbuild. No spam; one click to leave.

---
As of 2026-12-03. Source: https://pushbuild.com/apis/statistics-sweden.html
