LOCAL DATA BANK (POL.: BDL) is Poland's largest database of the economy, society and the environment.
BDL offers thousands statistical data grouped thematically. The first data comes from 1995.
The API application allows to browse and download for further processing the full range of data located in the Bank. The data is made available through REST API in XML and JSON format.
The BDL API was implemented as part of a project "Open data - access, standard, education", whose leader is the Ministry of Digitization. The project is co-financed from the European Union funds from the Operational Program Digital Poland.
The scope of data available in the API and in the BDL web application is the same, but for technological and ergonomic reasons, the organization and presentation of information is slightly different. This is to ensure an easy start for new users who do not know the BDL structure, as well as the appropriate performance and convenience of using the so-called permanent users.
For API security reasons, quantitative limits are imposed on the number of requests. Users who need larger limits may register and get an automatically generated personal API key. The API key should be provided in the request as an HTTP header named X-ClientId, e.g.
In the field of requests, the following user limits apply:
Period | Anonymous user | Registered user |
---|---|---|
1s | 5 | 10 |
15m | 100 | 500 |
12h | 1 000 | 5 000 |
7d | 10 000 | 50 000 |
The following BDL resources are made available in the API application:
Resources such as Aggregates, Attributes, Units of Measure and Years are dictionary resources with very low variability and multiplicity, therefore they can be treated as so-called 'typical dictionaries', occasionally updated at specific time intervals or at the user request. These resources are not paged and can’t be searched according to complicated criteria.
Resource such as Units, denoting the territorial division units, is a resource of large multiplicity and very small variability, updated only when inputting the data for the new year in BDL (at the beginning of the year). Due to its multiplicity, it may cause difficulties in downloading it in full size, therefore we are able to search and download partially according to our own criteria, of course in a limited scope.
Resources such as Data and Variables are resources with very high variability, because the Bank is constantly undergoing the process of extending the scope of data as well as verification and corrections.
The data is made available by the API in two alternative ways:
The process of downloading data for one variable and many territorial units in a simplified way may look as follows:
/api/v1/subjects?format=xml
/api/v1/subjects?lang=pl&format=json
/api/v1/subjects?parent-id=K15
/api/v1/subjects?parent-id=G186
/api/v1/data/by-variable/3643?format=xml&unit-level=2
/api/v1/data/by-variable/3643?format=xml&year=2009&year=2010&year=2011&unit-parent-id=010000000000&unit-level=2
/api/v1/data/by-variable/2137?unit-level=4&page-size=10&page=3
/api/v1/data/localities/by-variable/148190?unit-parent-id=011212001011
The process of downloading data for one territorial unit and many variables in a simplified way may look as follows:
/api/v1/Units
/api/v1/Units?level=2
/api/v1/Units?parent-id=011200000000&level=5
/api/v1/subjects?format=xml
/api/v1/subjects?lang=pl&format=json
/api/v1/subjects?parent-id=K15
/api/v1/subjects?parent-id=G186
/api/v1/Variables?subject-id=P3183
/api/v1/data/by-unit/023200000000?var-id=3643
/api/v1/data/by-unit/023200000000?var-id=3643&var-id=2137&var-id=148190
/api/v1/data/localities/by-unit/011212001011-0981682?var-id=148190
/api/v1/data/localities/by-unit/011212001011-0981682?var-id=148190&year=2009&year=2011
In both approaches, the issue of discretionary is the time and the rules for retrieving dictionary data, i.e. attributes, aggregate lists, etc.
We invite you to read the examples of valid API calls.
Data for the variable with identifier Id=3643 for the years 2000, 2010 | XML | JSON | JSONAPI |
Data for the variable with identifier Id= 65809 for the years 2004-2006 | XML | JSON | JSONAPI |
Data for the variable with identifier Id=420, for the locality from the Małopolska voivodeship | XML | JSON | JSONAPI |
Data for a territorial unit with Id=012400000000, for the variable with Id=3643, for the years 2004-2006 | XML | JSON | JSONAPI |
Data for the locality with Id=030210564011-0986283, for the variable with Id=270672 | XML | JSON | JSONAPI |
Metadata | XML | JSON |
Data for the variable with identifier Id=3643 for the years 2000, 2010 | XML | JSON | JSONAPI |
Data for the variable with identifier Id= 65809 for the years 2004-2006 | XML | JSON | JSONAPI |
Data for the variable with identifier Id=420, for the locality from the Małopolska voivodeship | XML | JSON | JSONAPI |
Data for a territorial unit with Id=012400000000, for the variable with Id=3643, for the years 2004-2006 | XML | JSON | JSONAPI |
Data for the locality with Id=030210564011-0986283, for the variable with Id=270672 | XML | JSON | JSONAPI |
Metadata | XML | JSON |
The use of data is possible on the basis of Attribution 4.0 International licence (CC BY 4.0.) https://creativecommons.org/licenses/by/4.0/
If you notice any irregularities in the operation of the BDL API application or if you have any doubts about the scope of the data provided, please contact us by email to clarify the problem.
In order to handle your notification in the most efficient way, please provide us with the most detailed information as it is possible, about the problem you have seen:
Please send technical notifications to the address bdl.kontakt@stat.gov.pl (giving in the subject: API-Pomoc).
Any other notifications or problems of a non-technical nature to the address bdl.kontakt@stat.gov.pl (giving in the subject: API-Informacje).
206 933 263 queries from 04.12.2018
6 486 registered users
The daily use of the service - last 7 days
Statistics Poland
Aleja Niepodległości 208
00-925 Warszawa
Go to the Statistics Poland Portal
Copyright © 2018-2024 Statistics Poland