Instructions for updating interface queries for PxWeb databases

The structure of px files in statistical databases will change on 8 June 2026. In order for queries made via the API interface to function after the change, they need to be adjusted. On this page, we describe the changes that need to be made and identify which databases are affected.

The changes affect almost all regularly updated tables in our databases. The changes concern tables with a four-character ID code, e.g. 12tg.

What changes will there be in the tables?

There will be three changes:

  1. The file name, TABLEID ID and MATRIX ID are shortened. This applies to all active databases.
  2. A variable code has been added to all variables. Previously, the name of the variable was used in API as the variable identifier but in future, the variable code will be in its place.
  3. In some cases, a prefix must be added to the value codes of the analysis variable. This change concerns all active databases, but not all variables.

1. Shortening of identifiers

As part of the change, the data of the TABLEID and MATRIX fields will be shortened to consist only of the ID code. After the change, the file name, TABLEID and MATRIX will be identical.

For example, the file name, TABLEID and MATRIX in a table of the employment service statistics will change as follows:

 

before the change 

after the change 

file name 

statfin_tyonv_pxt_12tg.px 

12tg.px 

TABLEID 

TABLEID="statfin_tyonv_pxt_12tg” 

TABLEID="12tg” 

MATRIX 

MATRIX="010_12tg_2026" 

MATRIX="12tg" 

In some cases, the file name will not only be shortened, but a specifying version identifier will also be added at the end of the ID. This change mainly applies to old archive tables of chargeable databases. No additional elements will be added to the file names in StatFin tables. While such suffixes exist in the StatFin archive database, the file names in that database will not be changed or shortened at this stage. The file name changes are listed in Appendix 1.

The same file also includes VARIABLECODE changes related to the time variable, which are described in more detail in the following section.

Appendix 1: Filename changes and time variable VARIABLECODE changes (XLSX)

2. Variable code

A variable-level code is added to each table variable to serve as the variable identifier in API queries in place of the current variable name after the change. Below is a list of the variable codes to be added to different variables.

Content variables

VARIABLECODE contentscode is added to the content variable “Tiedot”/”Information”:

VARIABLECODE("Tiedot")="contentscode";

VARIABLECODE[sv]("Uppgifter")="contentscode";

VARIABLECODE[en]("Information")="contentscode";

Time variables

VARIABLECODE according to the cycle of the time variable is added to the time variable. For example:

Annual tables:

VARIABLECODE("Vuosi")="timeperiod_y";

VARIABLECODE[sv]("År")="timeperiod_y";

VARIABLECODE[en]("Year")="timeperiod_y";

Monthly tables:

VARIABLECODE("Kuukausi")="timeperiod_m";

VARIABLECODE[sv]("Månad")="timeperiod_m";

VARIABLECODE[en]("Month")="timeperiod_m";

Quarterly tables:

VARIABLECODE("Vuosineljännes")="timeperiod_q";

VARIABLECODE[sv]("Kvartal")="timeperiod_q";

VARIABLECODE[en]("Quarter")="timeperiod_q";

Classifying variables

VARIABLECODE, which is the identifier of the value-level codes of the classification in question, is added to classifying variables. For example:

VARIABLECODE("Alue")="alue_23_20260101";

VARIABLECODE[sv]("Område")="alue_23_20260101";

VARIABLECODE[en]("Region")="alue_23_20260101";

The VARIABLECODEs to be added are described in the following files. The time variables are included in the same file that describes the filename changes mentioned in the previous section.

Appendix 1: Filename changes and time variable VARIABLECODE changes (XLSX)Appendix 2: VARIABLECODE additions for classification variables (XLSX)

3. Prefix of an analysis variable

In some cases, a prefix will be added to the value-level codes of an analysis variable. The analysis variable refers to the variable “Tiedot”/"Information".

For example, in StatFin table 111e concerning road traffic accidents, the data variable “kuol” is changed to “ton-kuol”.

These changes will not appear in all tables. The prefixes to be added are described in the following file.

Appendix 3: Changes to analysis variables (XLSX)

Example of a change in an API query

Example of a change in a px file

Files related to the changes

The required file-level and variable-level changes are listed in three files.

  1. A list of filename changes for px files, along with the new VARIABLECODEs for the time variables in the corresponding tables.
  2. A list of VARIABLECODEs to be added to the classification variables of the tables.
  3. A list of value-level code changes for the analysis variable (="Tiedot"/”Information” variable) in the tables (these do not apply to all tables).

The second and third files are not linked at the file level; if needed, they must be connected or combined with the first list via the "Table ID" columns.

Contact information

Service email
tietokannat@stat.fi