The api.nbp.pl service operates a public Web API enabling HTTP clients to make enquiries on the following datasets published by the NBP.PL service:
Communication with the service based on parametrized HTTP GET requests send to the https://api.nbp.pl/api/ address.
Effective August 1, 2025, all API communications must be conducted over HTTPS.
The HTTP protocol will no longer be supported for accessing our API services.
This change is part of our ongoing commitment to enhancing security and protecting your data during transmission.
To ensure uninterrupted access to our API services starting August 1, 2025, please update your integration to use HTTPS endpoints.
Thank you for your understanding and cooperation as we make this important upgrade to enhance the security of our services.
Service reply is returned in the JSON or XML format, depending on client requirements. The reply format may be indicated in two ways – with an query parameter ?format
or with a HTTP Accept
header:
Accept: application/json
header or ?format=json
parameterAccept: application/xml
header or ?format=xml
parameterIf the format has not been determined, JSON is returned.
Historic data are available respectively:
and a single enquiry cannot cover a period longer than 93 days.
The time frame for enquiry results may be determined in one of the following ways:
The data for currency exchange rates are made available in two ways:
{table}
– table type (A
, B
, or C
){code}
– a three- letter currency code (ISO 4217 standard){topCount}
– a number determining the maximum size of the returned data series{date}
, {startDate}
, {endDate}
– a date in the YYYY-MM-DD format (ISO 8601 standard)Templates of enquiries about complete tables of currency exchange rates
{table}
https://api.nbp.pl/api/exchangerates/tables/{table}/
{topCount}
tables of exchange rates of type {table}
https://api.nbp.pl/api/exchangerates/tables/{table}/last/{topCount}/
{table}
published today (or lack of data)
https://api.nbp.pl/api/exchangerates/tables/{table}/today/
{table}
published on {date}
(or lack of data)
https://api.nbp.pl/api/exchangerates/tables/{table}/{date}/
{table}
published from {startDate}
to {endDate}
(or lack of data)
https://api.nbp.pl/api/exchangerates/tables/{table}/{startDate}/{endDate}/
Templates of enquiries about a particular currency exchange rate
{code}
from the exchange rate table of type {table}
https://api.nbp.pl/api/exchangerates/rates/{table}/{code}/
{topCount}
exchange rates of currency {code}
from the exchange rate table of type {table}
https://api.nbp.pl/api/exchangerates/rates/{table}/{code}/last/{topCount}/
{code}
from the exchange rate table of type {table}
published today (or lack of data)
https://api.nbp.pl/api/exchangerates/rates/{table}/{code}/today/
{code}
from the exchange rate table of type {table}
published on {date}
(or lack of data)
https://api.nbp.pl/api/exchangerates/rates/{table}/code}/{date}/
{code}
from the exchange rate table of type {table}
published from {startDate}
to {endDate}
(or lack of data)
https://api.nbp.pl/api/exchangerates/rates/{table}/{code}/{startDate}/{endDate}/
{topCount}
– a number determining the maximum size of returned data series{date}
, {startDate}
, {endDate}
– a date in the YYYY-MM-DD format (ISO 8601 standard)https://api.nbp.pl/api/cenyzlota
{topCount}
gold price quotations
https://api.nbp.pl/api/cenyzlota/last/{topCount}
https://api.nbp.pl/api/cenyzlota/today
{date}
(or lack of data)
https://api.nbp.pl/api/cenyzlota/{date}
{startDate}
to {endDate}
(or lack of data)
https://api.nbp.pl/api/cenyzlota/{startDate}/{endDate}
https://api.nbp.pl/api/exchangerates/rates/a/chf/
https://api.nbp.pl/api/exchangerates/rates/c/usd/today/
https://api.nbp.pl/api/exchangerates/rates/c/usd/2016-04-04/?format=json
https://api.nbp.pl/api/exchangerates/tables/a/
https://api.nbp.pl/api/exchangerates/tables/a/today/
https://api.nbp.pl/api/exchangerates/rates/a/gbp/last/10/?format=json
https://api.nbp.pl/api/exchangerates/rates/c/usd/last/10/?format=xml
https://api.nbp.pl/api/exchangerates/rates/a/gbp/2012-01-01/2012-01-31/
https://api.nbp.pl/api/exchangerates/rates/a/gbp/2012-01-02/
https://api.nbp.pl/api/exchangerates/tables/a/last/5/
https://api.nbp.pl/api/exchangerates/tables/a/2012-01-01/2012-01-31/
https://api.nbp.pl/api/exchangerates/tables/b/2016-03-30/
https://api.nbp.pl/api/cenyzlota/
https://api.nbp.pl/api/cenyzlota/last/30/?format=json
https://api.nbp.pl/api/cenyzlota/today/
https://api.nbp.pl/api/cenyzlota/2013-01-02/
https://api.nbp.pl/api/cenyzlota/2013-01-01/2013-01-31/
In the case of lack of data for a correctly determined time interval, 404 Not Found message is returned
In the case of incorrectly formulated enquiries, the service returns 400 Bad Request message
In the case of an enquiry/query exceeding the returned data size limit, the service returns the message 400 Bad Request - Limit exceeded