Gold Price API — XAU

The gold price data your platform deserves.

Live spot prices, and multi-currency gold data — delivered via a single, clean API endpoint built for developers.

  • Unlimited free trial for integrations
  • No credit card
  • JSON over HTTPS
GETXAU
Sample responseapplication/json
{
  "success": true,
  "timestamp": 1792527641,
  "rates": {
    "XAU": {
      "rate": 4122.97,
      "bid": 4122.47,
      "ask": 4122.97,
      "carats": {
        "24k_per_gram": 132.5565,
        "22k_per_gram": 121.5101,
        "21k_per_gram": 115.9869,
        "20k_per_gram": 110.4637,
        "18k_per_gram": 99.4173,
        "16k_per_gram": 88.371,
        "14k_per_gram": 77.3246,
        "12k_per_gram": 66.2782,
        "10k_per_gram": 55.2319,
        "9k_per_gram": 49.7087,
        "8k_per_gram": 44.1855
      }
    }
  },
  "metadata": {
    "XAU": {
      "unit": "T.oz",
      "quote": "USD"
    }
  }
}
99.97%
Uptime SLA
<80ms
Avg Response
Live
Data Feed
CFD
Price Source

include=carat

Every karat from one call.

Jewellers price by purity, not by the ounce. Add include=carat and the response carries a per-gram rate for each karat from 24k down to 8k, so the price list on your counter or storefront updates itself.

KaratPurityPurity barUSD / gram
24k100.0%
132.64
22k91.7%
121.59
21k87.5%
116.06
20k83.3%
110.53
18k75.0%
99.48
14k58.3%
77.37
10k41.7%
55.27
9k37.5%
49.74

From XAU 4,125.53 USD/T.oz · refreshed hourly on this page

What's included

Everything you need to build with gold.

01

Real-Time Spot Price

Pull live gold prices refreshed every second from aggregated global exchanges — London, New York, Shanghai.

02

150+ Currencies

Every response can be denominated in the currency of your choice. USD, EUR, PKR, JPY — you name it.

03

OHLC & Candlestick

Build charting dashboards and analytics with full OHLC data across any time interval you need.

04

24/5 Market Coverage

Gold never sleeps. Our CFD-based feed tracks prices across extended trading hours — capturing moves that benchmark fixes miss.

05

Multiple Units

Troy ounce, gram, tola — get prices in the most popular units that your platform needs, natively.

06

Secure & Reliable

TLS encrypted, key-authenticated requests with 99.97% uptime backed by a contractual SLA.

Simple by design

One request. Everything you need.

Authenticate with your key, pass a currency and unit — that's it. No SDK required, no complex setup, no vendor lock-in.

Documentation
1
Endpoint
Clean, predictable REST
JSON
Response format
No XML. No surprises.
Any
HTTP client
curl, fetch, axios — all work
0
SDKs required
Just your API key

API reference

Live gold rates

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

GEThttps://api.commoditypriceapi.com/v3/rates/latest/xau
Every current plan receives real-time rates. Basic plan users receive rates in USD; the quote parameter is not available on that plan. Standard, Advanced and Enterprise users can request any supported quote currency. On the legacy Lite plan rates are in USD and may be delayed by up to 10 minutes.

Authentication

X-API-Keyheader · stringrequired
Your unique API key, passed as a request header. Find it in your dashboard.

Query parameters

quotestringoptionalStandard & above
The target currency to convert the rate into. If omitted, the commodity's native quote currency (USD) is used. Basic and legacy Lite plan users cannot use this parameter — it is silently ignored.
includestringoptional
The unit to express the rate in. Additional unit-specific fields are appended to the rate object alongside the base troy ounce rate. Accepted values:
  • gram— 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 purity

The base rate, bid, and ask fields are always returned in troy ounce regardless of this parameter.

metadatabooleanoptional
Whether to include the metadata object in the response. Defaults to true. Pass false to receive only the rate and keep the payload minimal. Any other value is treated as the default.

Response fields

successboolean
Always true for 200 responses. Indicates the request was processed successfully.
timestampnumber
Unix timestamp (seconds) of when the rate was generated on the server.
rates.XAUobject
Rate 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.XAUobject
Context for the returned rate — the unit it's expressed in (T.oz) and the quote currency (e.g. USD, or whichever currency was requested). Omitted when the request sets metadata=false.

Example

$ curl https://api.commoditypriceapi.com/v3/rates/latest/xau \
  -H "X-API-Key: YOUR_API_KEY" \
  -G -d "quote=EUR" \
     -d "include=carat"

Sample values. Run the playground above for a live response.

Get started

Try it free. No card. No catch.

Start with an unlimited free trial for integrations on our Basic plan — no credit card, zero commitment. When you're ready to scale, request a plan upgrade and we'll have you live within the day.

  • Unlimited free trial for integrations
  • No card required
  • Cancel anytime