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.

4992.75$USD
GET /v2/rates/latest/xau
$ 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"
    }
  }
}
99.97%
Uptime SLA
<80ms
Avg Response
Live
Data Feed
CFD
Price Source

What's included

Everything you need to build with gold.

Real-Time Spot Price

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

150+ Currencies

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

OHLC & Candlestick

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

24/5 Market Coverage

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

Multiple Units

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

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.

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

GET/v2/rates/latest/xau

Lite 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 · stringrequired
Your unique API key, passed as a request header. Find it in your dashboard.

Query Parameters

quotestringoptionalPremium & Plus
The target currency to convert the rate into. If omitted, the commodity's native quote currency (USD) is used. 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:
  • gramappends a gram field with the per-gram rate (1 troy oz ÷ 31.1035)
  • tolaappends a tola field with the per-tola rate (1 troy oz ÷ 2.66667)
  • caratappends 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.

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).

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

Try it free.
No card. No catch.

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.

7-day free trial — no card required
Extend your trial up to 1 month, hassle-free
2,000 requests on the Lite plan to get you started
Upgrade your plan anytime with admin approval

No credit card · Cancel anytime · Admin-approved upgrades