Quickstart
Get an XAU/USD spot price in under a minute. This first request is anonymous.
Before you begin
You need curl or any HTTP client. No API key is required for this request.
Your first request
Use the exact URL below. The response is always wrapped in symbols.
Reading the response
price is a decimal string per troy ounce. Check is_stale before using a price, and use computed_at to identify the price observation or source-cache timestamp. It is not when the HTTP response was assembled.
{
"symbols": [
{
"symbol": "XAU",
"quote_currency": "USD",
"unit": "troy_ounce",
"contract_type": "spot",
"price": "4826.40",
"bid": "4825.00",
"ask": "4827.00",
"is_stale": false,
"computed_at": "2026-04-27T01:00:00+00:00"
}
]
}When things go wrong
Handled API errors are JSON. An unexpected unhandled server failure can return a plain-text 500. The usual first-call cases are 400 invalid_symbol for an invalid symbol, 403 plan_gated for data outside your plan, and 429 rate_limit_exceeded for the per-minute limit or 429 rate_limited for the anonymous IP cap. Authenticated calls can also return 429 quota_exceeded for the monthly quota. Wait for the response's reset or retry guidance. The API reference lists errors for every operation.
Add a key when you need one
Anonymous spot requests use shared IP limits. A free key identifies your integration, includes 1,000 calls per month, and unlocks authenticated-only options such as include=stats.
curl "https://api.goldprice.dev/v1/prices?symbol=XAU-USD-SPOT&include=stats" \
-H "Authorization: Bearer ga_live_..."Use it with
Ready-made guides for common clients and tools: