🇺🇸 US site · USD🇬🇧 UK site · GBP
🔌 Free · no API key · static JSON

Gold Price API

The exact data this site runs on, published as plain static JSON files — free to fetch, no key, no rate limit beyond normal static-file hosting.

Endpoints

GET https://usgoldpricepergram.com/gold-data.json
GET https://usgoldpricepergram.com/history.json

Both are plain static files (no server-side compute, no authentication) served the same way as any other page on this site — fetch them directly from client-side JS or a server.

gold-data.json — Current Price Snapshot

Overwritten on every update — always represents the latest known values, not a history.

FieldTypeDescription
lastUpdatedstring (ISO 8601)Timestamp of the gold spot price currently shown.
fxLastUpdatedstring (ISO 8601)Timestamp of the GBP→USD rate currently in use.
isFallbackbooleantrue if either the gold spot price or the FX rate is stale (upstream fetch failed this run).
fallbackComponentstring | null"gold", "fx", "both", or null — which component (if any) is stale.
spotPricePerOzGBPnumberSpot price per troy oz, GBP.
fxRateGBPtoUSDnumberGBP→USD rate in use.
pricePerGramobjectUSD price per gram, keyed "24k"/"22k"/"18k"/"14k"/"10k".
cashPricePerGramobjectpricePerGram × the site's cash-for-gold discount factor, same keys.
dayChangeobject | nullPer-karat {abs, pct} change vs. ~24h ago (null if no data point fell in the 20-30h lookback window). Keyed same as pricePerGram.
notestring | nullHuman-readable explanation when isFallback is true.

history.json — Time Series

A flat JSON array, oldest first, one entry per successful update (stale/fallback runs are never appended — see the price history page). Capped at the most recent 3,000 points (roughly 2.5 years at 3×/day).

FieldTypeDescription
tstring (ISO 8601)Timestamp of this data point.
spotGBPnumberSpot price per troy oz, GBP (source feed currency, kept for provenance).
fxnumberGBP→USD rate used at this point.
g24knumber24K price per gram, USD.
g22knumber22K price per gram, USD.
g18knumber18K price per gram, USD.
g14knumber14K price per gram, USD.
g10knumber10K price per gram, USD.

Update Cadence

Both files refresh on the same cron schedule as the rest of the site: 0 6,12,18 * * * (three times a day). This text is pulled directly from the site's own config at generation time, so it can't drift out of sync with the actual schedule.

License & Usage

Free to use, no API key, no signup, no rate limit beyond normal static-file hosting. Attribution with a link back to usgoldpricepergram.com is appreciated but not required. No uptime SLA — this is a static file on GitHub Pages, not a monitored production API. This is not a dealer quote or a regulated price feed; see the methodology page for the full calculation and its limitations.

Example

fetch('https://usgoldpricepergram.com/gold-data.json')
  .then(r => r.json())
  .then(data => console.log(data.pricePerGram['24k']));

Transparency & Methodology

GP

Gold Price Per Gram USA

Independent, Open-Source Live Tracker

An independent calculator that reads a live gold price from its UK sister site and applies a live FX conversion and the standard troy-ounce-to-gram formula deterministically — no manual price entry, no AI estimate.

Live UK feed + FX rate Updated 3×/day

Methodology & Limitations

USD prices are derived from the live GBP spot price published by our sister site, Gold Price Per Gram UK, converted using a live GBP→USD rate. See the full methodology for the exact formula and update schedule.

Not a Dealer or Adviser

This site is not a bullion dealer, refiner or financial adviser — prices are indicative only. Before selling, compare quotes from a reputable buyer; for the US benchmark gold market see CME Group / COMEX Gold Futures.

US Karat Standards

Karat quality marks (24K/22K/18K/14K/10K) follow the FTC's Jewelry Guides (16 CFR Part 23) — the federal rules on gold fineness marking. See the FTC's own consumer guide, Buying Platinum, Gold, and Silver Jewelry, for what to check before buying.

Open Source

The fetch, formula and page-generation code is public. Inspect it or suggest improvements on GitHub.