Gold Price API — XAU

The gold price data your platform deserves.

Live gold spot prices for your app: the mid-market price from the global over-the-counter spot market, refreshed every second with bid and ask, per troy ounce, gram or tola, in USD or 150+ currencies.

  • Unlimited free trial for integrations
  • No credit card
  • JSON over HTTPS
GETXAU
Sample responseapplication/json
{
  "success": true,
  "timestamp": 1794520612,
  "rates": {
    "XAU": {
      "rate": 3878.61,
      "bid": 3876.81,
      "ask": 3878.61,
      "carats": {
        "24k_per_gram": 124.7001,
        "22k_per_gram": 114.3084,
        "21k_per_gram": 109.1126,
        "20k_per_gram": 103.9168,
        "18k_per_gram": 93.5251,
        "16k_per_gram": 83.1334,
        "14k_per_gram": 72.7417,
        "12k_per_gram": 62.3501,
        "10k_per_gram": 51.9584,
        "9k_per_gram": 46.7625,
        "8k_per_gram": 41.5667
      }
    }
  },
  "metadata": {
    "XAU": {
      "unit": "T.oz",
      "quote": "USD"
    }
  }
}
99.97%
Uptime SLA
<80ms
Avg Response
Live
Data Feed
OTC spot
Underlying market

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%
124.69
22k91.7%
114.29
21k87.5%
109.10
20k83.3%
103.90
18k75.0%
93.51
14k58.3%
72.73
10k41.7%
51.95
9k37.5%
46.76

From XAU 3,878.14 USD/T.oz · refreshed hourly on this page

Key facts

Gold price API at a glance

CommodityPriceAPI's gold price (XAU) is a mid-market reference rate for spot gold: the midpoint between the live bid and ask, taken from real-time market data for the global over-the-counter spot market sourced from official banks and exchanges, which trades around the clock from Sunday evening to Friday evening. It is refreshed every second and returned in US dollars per troy ounce.

Symbol
XAU (ISO 4217 code for one troy ounce of gold)
Price basis
Mid-market reference rate (midpoint of live bid and ask)
Data sources
Real-time market data for the global over-the-counter spot market, sourced from official banks and exchanges
Underlying market
Global over-the-counter spot market, centred on London; trades 24/5, Sunday evening to Friday evening
Update frequency
Every second, all current plans
Bid and ask
Returned with every rate
Units
Troy ounce (31.1035 g); gram, tola and carat on request
Quote currencies
USD by default; 150+ currencies with the quote parameter on the Standard plan or above
Not included
The LBMA Gold Price auction benchmark, a COMEX settlement, or an executable quote

What's included

Everything you need to build with gold.

01

Real-Time Spot Price

Live XAU spot price refreshed every second: the mid-market price from the global over-the-counter gold market, where banks and dealers trade physical gold around the clock.

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 trades around the clock from Sunday evening to Friday evening. XAU follows the spot market through every session, including the hours between the twice-daily benchmark auctions.

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 spot rate for gold (XAU): the mid-market price from the global over-the-counter spot market, including bid and ask 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.

FAQ

Frequently asked questions

Contact support
  • 01

    Where does your gold price come from?

    XAU is a mid-market reference rate: the midpoint between the live bid and ask, taken from real-time market data for the global over-the-counter spot gold market, sourced from official banks and exchanges. The market is centred on London, where banks and dealers trade physical gold around the clock, and XAU is refreshed every second.

  • 02

    Is this the LBMA Gold Price?

    No. The LBMA Gold Price is a benchmark set by auction twice a day, at 10:30 and 15:00 London time, and administered by ICE Benchmark Administration. XAU is the live spot price from the same over-the-counter market, so it moves every second, including between those auctions.

  • 03

    Is this the COMEX gold price?

    No. COMEX gold is a futures contract in New York and usually trades slightly above spot because of time to delivery. XAU is a spot price.

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