API for the Statistical database (PxWebApi)

SCB has developed a new API that connects to the Statistics Database, PxWebApi 2.0, which will replace PxWebApi 1.0 by autumn 2025.

It is already possible to test making withdrawals against PxWebApi 2.0 Beta. In the Statistics Database you will find a link to PxWebApi1.0 and PxWebApi 2.0 Beta under each table withdrawal.

PxWebApi 2.0

PxWebApi 2.0 will be released in September 2025. It will be backward compatible with PxWebApi 2.0- Beta so it is possible to make withdrawals in the beta format already now. When PxWebApi 2.0 is released, the beginning of the URL will change from https://api.scb.se/ov0104/v2beta/api/v2/ to https://statistikdatabasen.scb.se/api/v2/

The main differences compared to PxWebApi 1.0 are

  • The structure of the URLs has been changed so that they are more stable and not affected by structural changes in the database and at the same time comply with a RESTful design.
  • The API will expose more of the metadata we have access to.
  • The user experience for retrieving data will be improved.
  • More advanced expressions for filtering out the information you want to retrieve via the API will be offered.

Read more about the different API:s

PxWebApi 2.0 - Beta

PxWebApi 1.0