NBP Gold Price History by Publication Date avatar

NBP Gold Price History by Publication Date

Pricing

from $0.00005 / actor start

Go to Apify Store
NBP Gold Price History by Publication Date

NBP Gold Price History by Publication Date

Export official NBP gold price observations for the latest publications or a bounded date window. Keep publication dates, exact source decimals and explicit no-data coverage.

Pricing

from $0.00005 / actor start

Rating

0.0

(0)

Developer

Michal Pšenčík

Michal Pšenčík

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

11 days ago

Last modified

Security

Limited permissions

Share

Export the official gold price published by Narodowy Bank Polski (NBP) through its public API at api.nbp.pl, either for the latest publications or for a bounded window of publication dates. Each row is one publication date with the exact decimal the API returned, so a daily schedule or a one-month backfill lands in a dataset you can download as JSON, CSV or Excel, or read through the Apify API.

NBP documents the price as the price of 1 gram of gold at 1000 fineness. Data start on 2 January 2013.

Input

FieldMeaning
modelatest (default) or range.
latestCountLatest mode only. How many recent publications to request, 1 to 20 (5 when empty). These are publications, not days; the API may return fewer.
startDateRange mode only. First date, YYYY-MM-DD, from 2013-01-02.
endDateRange mode only. Last date, at most today in Warsaw, and at most 93 calendar dates after startDate counting both ends.
maxItemsThe most rows the run stores and bills, 1 to 93 (default 93).

The default input returns the five latest publications:

{ "mode": "latest", "latestCount": 5, "maxItems": 93 }

A one-week backfill:

{ "mode": "range", "startDate": "2026-10-01", "endDate": "2026-10-09", "maxItems": 93 }

Unknown fields, a date field in latest mode, latestCount in range mode, impossible dates and ranges longer than 93 calendar dates are refused before any request.

Output

One row per publication date:

{
"schemaVersion": 1,
"id": "nbp-gold:2026-10-22",
"publicationDate": "2026-10-22",
"sourcePrice": "515.01",
"currency": null,
"goldMassGrams": 1,
"goldFinenessMillesimal": 1000,
"observedAt": "2026-10-22T22:04:01.997936+00:00",
"sourceUrl": "https://api.nbp.pl/api/cenyzlota/last/5/?format=json",
"sourceResponseSha256": "1667162d25e5fe0ff35d2cf5a744c888910a438c836a05872cb3b814d9a164c0"
}
  • sourcePrice is the API's cena value as an exact plain decimal string (no rounding, no binary floating point, trailing fractional zeros dropped, so 514.00 becomes 514).
  • currency is always null. The NBP API documentation describes the gram and fineness of the reference but does not name the currency next to the price, so this actor does not assert one. If you need a currency-guaranteed accounting feed, do not infer that guarantee from this dataset.
  • publicationDate is the API's data field. It is not a release timestamp.
  • observedAt is when this run received the response; sourceResponseSha256 is the SHA-256 of the raw response body, so you can prove what the API said.

Dates without a publication (weekends, holidays or any other gap) simply have no row: nothing is carried forward or filled in, and a gap is not labelled as a holiday or a deletion. Within a run, rows are added in ascending date order. Sort by publicationDate when you combine runs.

Run summary (free)

Every run writes a free SUMMARY record to its key-value store with the status (complete, partial, empty or error), the requested window, every publication date the API returned, how many rows were stored, why the run stopped and what to do next. A window with no publications, such as a single Sunday, is a free empty result. An API error, a blocked request or a malformed response is an error, never an empty success. RECOVERY, REQUEST_LEDGER and DELIVERY-LEDGER-* and DELIVERY-UNSENT-* records are internal and let a restarted run continue without storing or billing a row twice.

Pricing

Pay per event:

  • Actor start: $0.00005 per run.
  • Gold price observation: $0.0005 per row actually stored in the dataset.

Five latest publications cost $0.00255; a 31-day window with 23 publications costs $0.01155. Rerunning the same window stores and bills the same unchanged rows again. Empty windows, errors and the summary are not billed as rows. The start fee applies to every run, including empty or failed ones. If your run's spending limit cannot pay for another row, the run stops before storing it and says so in the summary.

Limits

  • One request per run (at most three including retries), paced politely, with no proxy, login or key. If the API refuses the request (403, 429 or a challenge page), the run stops and reports it.
  • latestCount counts publications. A latest run may return fewer rows than requested.
  • No history of revisions: a value that changes between runs is a new snapshot, not proof of a revision.
  • The NBP API's own documentation mentions a 93-day enquiry limit; this actor keeps windows to 93 calendar dates.

Support

Source: NBP Web API. Report issues through the Issues tab on this actor's page.