National Bank of Poland API

Free to Use
77 B
Measured Score 0 50 100 Speed 14/30 Consistency 20/20 Security 20/20 Browser access 15/15 Transparency 8/15 TESTED 2026-08-10

Overview

The National Bank of Poland (NBP) API is an official government data source providing daily exchange rates for 35+ currencies relative to the Polish Zloty (PLN), published on each banking day. It supports both JSON and XML output, covers historical data going back many years, and requires no authentication. The API is ideal for financial applications operating in the Polish market or requiring authoritative exchange rate data.

Beginner Tip

No API key required. Use `https://api.nbp.pl/api/exchangerates/tables/A/?format=json` to get today's mid-market rates for all currencies. Rates are denominated in PLN. Add `Accept: application/json` header to ensure JSON output. The API has two tables: Table A (mid-market) and Table C (bid/ask spread).

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://api.nbp.pl/api/exchangerates/tables/A/?format=json
Result
HTTP 200 · application/json · 1,955 bytes · compressed
Response time
277 ms (median of 3) · fastest 273 ms
Transport
TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by Asseco Data Systems S.A.
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
table string A
no string 153/A/NBP/2026
effectiveDate string (date) 2026-08-10
rates array [1 item]

Captured Response

Captured from a real request to https://api.nbp.pl/api/exchangerates/tables/A/?format=json on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
[
  {
    "table": "A",
    "no": "153/A/NBP/2026",
    "effectiveDate": "2026-08-10",
    "rates": [
      {
        "…": "(3 more fields)"
      }
    ]
  }
]

Field Reference

table The table identifier — `A` for mid-market rates or `C` for bid/ask rates.
no Official publication number of this rate table (e.g., `073/A/NBP/2024`).
effectiveDate The date these rates apply to, in YYYY-MM-DD format.
rates Array of currency objects, each with the currency name, code, and mid-market rate.

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "http://api.nbp.pl/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 404 Requesting a path that does not exist text/plain
404 NotFound

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

406 Not Acceptable Not including an `Accept` header, causing the server to default to XML output when JSON is expected.
Always include the header `Accept: application/json` in your request, or append `?format=json` to the URL.
404 Not Found for a specific date Requesting a date that falls on a weekend or Polish public holiday when the NBP does not publish rates.
Use the `/last/{n}/` endpoint to get the last N published rates, or query the nearest weekday.
HTTP instead of HTTPS warning The official docs reference `http://api.nbp.pl`, but browsers and strict clients may warn about non-HTTPS.
Use `https://api.nbp.pl` — the server supports HTTPS and it is the recommended approach.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 14/30
Consistency 20/20
Security 20/20
Browser access 15/15
Transparency 8/15
Endpoint Response Time 277ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Difficulty Beginner
Endpoint last called: 2026-08-10

Similar APIs

View All →