Historical Gold Price API
Query real OHLCV bars for gold with cursor pagination, settled-bar labels, and explicit history windows. Daily XAU/USD data reaches back to 1996 on Pro.
Use /v1/bars for new integrations
The bars endpoint replaces the deprecated/v1/prices/history route. It returns open, high, low, close, volume, and is_closed for each interval.
curl "https://api.goldprice.dev/v1/bars?symbol=XAU-USD-SPOT&interval=1d&from=2026-07-01&to=2026-07-15&limit=100"History windows by plan
| Plan | Daily XAU/USD | Other symbols | Intraday bars |
|---|---|---|---|
| Free | Most recent 30 days | Not included | Not included |
| Physical | Most recent year | Not included | Not included |
| Pro+ | Full daily history to 1996 | XAG, GLD, GC, SI, and HG | Most recent 30 days through /v1/bars |
Deep intraday files begin in 2006. Request them by symbol, interval, and year through /v1/download instead of the live bars endpoint. See pricing for current plan details.
Response and settled bars
The values below are illustrative sample data.
{
"symbol": "XAU-USD-SPOT",
"interval": "1d",
"bars": [
{
"bar_start": "2026-07-15T00:00:00Z",
"open": "3327.12",
"high": "3354.81",
"low": "3312.44",
"close": "3348.65",
"volume": null,
"is_closed": true
}
],
"next_cursor": "MjAyNi0wNy0xNVQwMDowMDowMFo",
"meta": { "tier": "free", "count": 1, "source_id": "mixed" }
}is_closed: false identifies the currently forming bar, so a backtest can exclude provisional data. Spot volume isnull because there is no consolidated XAU spot exchange; futures and ETF instruments return real volume when available.
Cursor pagination
Results arrive newest first. When next_cursoris not null, pass it unchanged as the next request'scursor. A null cursor means the requested range is exhausted.
const url = new URL("https://api.goldprice.dev/v1/bars");
url.search = new URLSearchParams({
symbol: "XAU-USD-SPOT",
interval: "1d",
from: "2026-06-01",
to: "2026-07-15",
limit: "100",
}).toString();
let cursor;
do {
if (cursor) url.searchParams.set("cursor", cursor);
const page = await fetch(url).then((response) => response.json());
consume(page.bars.filter((bar) => bar.is_closed));
cursor = page.next_cursor;
} while (cursor);MCP and bulk download
Agent clients can use get_historical through thegold price MCP server. For offline research, /v1/download returns a redirect to a time-limited CSV or Parquet file for one symbol, interval, and calendar year.
FAQ
How much historical gold data is available for free?
How far back does the historical gold price API go?
Does gold spot history include volume?
Should new integrations use /v1/prices/history?
See also
- Complete bars reference for every field and error code
- Karat gold price API for current 24K through 10K prices per gram