Gold Price API — XAU
Live spot prices, and multi-currency gold data — delivered via a single, clean API endpoint built for developers.
$ curl -X GET \ https://api.commoditiespriceapi.com/v2/rates/latest/xau? \ -H "x-api-key: YOUR_API_KEY"
{
"success": true,
"timestamp": 1774674431,
"rates": {
"XAU": {
"rate": 4992.75,
"bid": 4992.25,
"ask": 4992.75,
"carats": {
"24k_per_gram": 160.5205,
"22k_per_gram": 147.1438,
"21k_per_gram": 140.4555,
"20k_per_gram": 133.7671,
"18k_per_gram": 120.3904,
"16k_per_gram": 107.0137,
"14k_per_gram": 93.637,
"12k_per_gram": 80.2603,
"10k_per_gram": 66.8836,
"9k_per_gram": 60.1952,
"8k_per_gram": 53.5068
}
}
},
"metadata": {
"XAU": {
"unit": "T.oz",
"quote": "USD"
}
}
}What's included
Pull live gold prices refreshed every second from aggregated global exchanges — London, New York, Shanghai.
Every response can be denominated in the currency of your choice. USD, EUR, PKR, JPY — you name it.
Build charting dashboards and analytics with full OHLC data across any time interval you need.
Gold never sleeps. Our CFD-based feed tracks prices across extended trading hours — capturing moves that benchmark fixes miss.
Troy ounce, gram, tola — get prices in the most popular units that your platform needs, natively.
TLS encrypted, key-authenticated requests with 99.97% uptime backed by a contractual SLA.
Simple by design
Authenticate with your key, pass a currency and unit — that's it. No SDK required, no complex setup, no vendor lock-in.
API Reference
Returns the latest CFD-based spot rate for gold (XAU), including bid and ask prices. Rates are sourced from live OTC market feeds and reflect real-world traded prices.
Endpoint
/v2/rates/latest/xauLite plan users receive rates in USD and data may be delayed by up to 10 minutes. The quote parameter is not available on this plan. Premium and Plus users receive real-time rates and can request any supported quote currency.
Authentication
X-API-Keyheader · stringrequiredQuery Parameters
quotestringoptionalPremium & Plusincludestringoptionalgram— appends a gram field with the per-gram rate (1 troy oz ÷ 31.1035)tola— appends a tola field with the per-tola rate (1 troy oz ÷ 2.66667)carat— appends a carats object with per-gram rates for 24k, 22k, 21k, 20k, 18k, 16k, 14k, 12k, 10k, 9k, and 8k purityThe base rate, bid, and ask fields are always returned in troy ounce regardless of this parameter.
Response Fields
successbooleanAlways true for 200 responses. Indicates the request was processed successfully.
timestampnumberUnix timestamp (seconds) of when the rate was generated on the server.
rates.XAUobjectRate data for XAU. Includes rate (mid-market price per troy ounce), bid (highest buy price), and ask (lowest sell price). Additional fields — gram, tola, or carats — are present only when the include parameter is passed.
metadata.XAUobjectContext for the returned rate — the unit it's expressed in (T.oz) and the quote currency (e.g. USD, or whichever currency was requested).
Example
curl https://api.commoditiespriceapi.com/v2/rates/latest/xau \
-H "X-API-Key: YOUR_API_KEY" \
-G -d "quote=EUR" \
-d "include=carat"Get started
Start with a 7-day free trial on our Lite plan — 2,000 requests included, zero commitment. Need more runway? Extend your trial up to a full month. When you're ready to scale, request a plan upgrade and we'll have you live within the day.
No credit card · Cancel anytime · Admin-approved upgrades