A single clean JSON endpoint returning the live gold spot price in 30+ currencies. Free to use, no API key, no rate limits for reasonable use.
?currency=?unit= — all in one request.curl https://xaus.com/api/v1/spot # With currency conversion curl "https://xaus.com/api/v1/spot?currency=EUR" # Price per gram in GBP curl "https://xaus.com/api/v1/spot?currency=GBP&unit=gram"
// Fetch live XAU spot price const res = await fetch('https://xaus.com/api/v1/spot'); const data = await res.json(); console.log(data.spot_usd_oz); // e.g. 3330.42 console.log(data.xau.price); // price in requested currency + unit // With options const res2 = await fetch( 'https://xaus.com/api/v1/spot?currency=EUR&unit=gram' ); const eurGram = await res2.json(); console.log(eurGram.xau.price); // EUR per gram
import requests # Basic request r = requests.get("https://xaus.com/api/v1/spot") data = r.json() print(data["spot_usd_oz"]) # 3330.42 print(data["per_gram_usd"]) # 107.0601 # Price per kg in JPY r2 = requests.get( "https://xaus.com/api/v1/spot", params={"currency": "JPY", "unit": "kg"} ) print(r2.json()["xau"]["price"]) # JPY per kg
<?php $response = file_get_contents( 'https://xaus.com/api/v1/spot?currency=EUR' ); $data = json_decode($response, true); echo $data['spot_usd_oz']; // 3330.42 echo $data['xau']['price']; // EUR/oz
{
"xau": {
"price": 3330.42, // price in requested currency + unit
"currency": "USD",
"unit": "troy_oz"
},
"spot_usd_oz": 3330.42, // always USD/oz regardless of params
"per_gram_usd": 107.0601,
"per_kg_usd": 107060.10,
"fx_rate": 1, // FX rate used (USD→requested currency)
"updated_at": "2026-05-05T14:32:00.000Z",
"source": "xaus.com",
"docs": "https://xaus.com/api"
}
| Field | Type | Description |
|---|---|---|
| xau.price | number | Gold price in the requested currency and unit |
| xau.currency | string | ISO 4217 currency code |
| xau.unit | string | Weight unit: troy_oz · gram · kg |
| spot_usd_oz | number | Raw XAU/USD spot price per troy ounce — always present regardless of params |
| per_gram_usd | number | Spot price per gram in USD |
| per_kg_usd | number | Spot price per kilogram in USD |
| fx_rate | number | FX rate applied (USD → requested currency) |
| updated_at | string | ISO 8601 timestamp of the price snapshot |
| Parameter | Type | Default | Description |
|---|---|---|---|
| currency | string | USD | ISO 4217 currency code to convert the XAU price into. See supported currencies below. |
| unit | string | oz | Weight unit for xau.price. One of: oz · gram · kg |
CORS is fully open — you can call this API directly from browser JavaScript. Prices are indicative mid-market rates, not tradable quotes. For settlement-grade rates refer to the LBMA benchmark.