Menu

Quickstart

Get an XAU/USD spot price in under a minute. No API key required.

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.

curl --fail-with-body --max-time 10 "https://api.goldprice.dev/v1/prices?symbol=XAU-USD-SPOT"

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. Bid/ask are optional and paid-only, requiring a coherent two-sided quote; Free/keyless omit them.

{
  "symbols": [
    {
      "symbol": "XAU",
      "quote_currency": "USD",
      "unit": "troy_ounce",
      "contract_type": "spot",
      "price": "4012.75",
      "is_stale": false,
      "computed_at": "2026-10-23T07:00:18.221118+00:00"
    }
  ]
}

When things go wrong

API errors normally return JSON. An unexpected server failure may return a plain-text 500. Common first-request errors 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

Keyless: 10/minute, 100/hour per IP; prices 15 minutes late. Free keys include 5,000 calls/month and authenticated options such as include=stats.

Create a free API key →

curl "https://api.goldprice.dev/v1/prices?symbol=XAU-USD-SPOT&include=stats" \
  -H "Authorization: Bearer ga_live_..."

Use it with

Guides for common clients and tools: