To main content

Statistics Sweden’s statistics are accessible via API

Enterprises and private individuals can obtain access to Statistics Sweden's statistics via open data and use it to develop new products and services. It is possible to transfer data from the Statistical Database electronically via the programming interface API.

APIs (Application Programming Interface) can be processed and used to build apps for smartphones or new websites, even with commercial purposes. You can use our tables or parts of tables from the Statistical Database free of charge.

The ambition to improve the conditions for further use of public information from government agencies is on the government's digital agenda. It is also something that is regulated in the PSI Directive and Inspire Directive from the EU.

Statistics Sweden’s open data – conditions for use

You can use Statistics Sweden’s open data free of charge. The agency applies the CC0 licence to this data, which means that you may use and disseminate the data or make it available with no obligation to state the source.

If you choose to state the source, we recommend: “Source: Statistics Sweden”.

Statistics Sweden’s databases also contain statistics from other government agencies. If you use statistics made available through Statistics Sweden’s API for which the source is another government agency, you must state this agency as the source.

If you have adapted data from Statistics Sweden, do not state a source.

Using the API to spread harmful coding is prohibited.

Presenting a service as an “official cooperation” or “partnership” with Statistics Sweden is not permitted.

How to use the API for the Statistical Database
Terms of use on

This is how Statistics Sweden's APIs work

Statistics Sweden's API is provided as is. The use is also limited based on the caller's IP address. It functions so that the caller can make a maximum of 10 calls within a 10-second period. It is up to each user how the enquiries are used.

For example, you can choose to ask 10 questions in the first second and then be denied the nine following times. You can retrieve a maximum of 100 000 values per table. The error message HTTP 403 Forbidden indicates that the maximum value has been exceeded.

How to use Python with data from the Statistical database (Github)

How are corrections of the statistics handled?

The statistics that are distributed via the API are regularly updated in connection with corrections of the source data. However, the correction is only noted in the Statistical Database.

However, changes in the API itself are reported via an RSS feed. This may, for example, involve updates that require the user to redirect their question for the download to work.


Statistics Service

+46 10 479 50 00
Opening hours
9:00–12:00, 13:00–16:30