BYTETOOLS

Gold-API

Free precious metals API with no key: live gold, silver, platinum and palladium spot prices in USD per troy ounce, plus major crypto. Tested curl example and live response.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the Gold-API?

Gold-API returns the live spot price of gold, silver, platinum and palladium as a free JSON API with no key or registration. Prices are quoted in US dollars per troy ounce and carry an ISO timestamp.

Precious metals pricing is normally sold rather than published, so a key-free spot endpoint is worth knowing about. The response is four useful fields and nothing else: symbol, price, currency and an update timestamp, with a human-readable freshness string thrown in. Symbols follow the ISO 4217 convention where metals take an X prefix — XAU gold, XAG silver, XPT platinum, XPD palladium.

The unit needs stating explicitly: **US dollars per troy ounce**, which is 31.1035 grams, not the 28.35-gram avoirdupois ounce used for everyday weight. Anyone converting to a price per gram must divide by 31.1035. Note also that this is a single indicative spot figure rather than a two-way quote — there is no bid, no ask and no venue attribution — so read `updatedAt` and show the age rather than implying it is a dealable price.

Quick facts

Base URL
https://api.gold-api.com
Authentication
No key or registration required.
Rate limit
No published limit. The underlying price refreshes every few seconds; cache rather than polling tightly.
Pricing
Free.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the Gold-API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. Live gold spot price in USD per troy ounce

GET https://api.gold-api.com/price/XAU

curl
curl 'https://api.gold-api.com/price/XAU'
JavaScript (fetch)
const res = await fetch("https://api.gold-api.com/price/XAU");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://api.gold-api.com/price/XAU", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "currency": "USD",
  "currencySymbol": "$",
  "exchangeRate": 1.0,
  "name": "Gold",
  "price": 4565.299805,
  "symbol": "XAU",
  "updatedAt": "2026-08-21T07:45:38Z",
  "updatedAtReadable": "a few seconds ago"
}

Parameters

ParameterTypeRequiredDescription
/price/{symbol}pathRequiredMetal or asset symbol. `XAU` gold, `XAG` silver, `XPT` platinum, `XPD` palladium; major crypto symbols also resolve. XAU

Response fields

symbolstring
The requested symbol, echoed back.
namestring
Human-readable asset name.
pricenumber
Spot price in `currency` per troy ounce for metals.
currencystring
Quote currency — `USD`.
currencySymbolstring
Display symbol for the quote currency.
exchangeRatenumber
Conversion factor applied to reach the quote currency; 1.0 when quoting in USD.
updatedAtstring
ISO 8601 UTC timestamp of the last price update.
updatedAtReadablestring
Relative freshness string such as `a few seconds ago`, for display.

What you can build with the Gold-API

  • Show a live gold or silver price on a website
  • Convert a metal weight into a value for an inventory display
  • Log spot prices over time into your own dataset
  • Compare a dealer's quoted price against the spot reference

Common errors and how to fix them

404

Unknown symbol.

Fix: Metals use the X-prefixed ISO codes: `XAU`, `XAG`, `XPT`, `XPD`. Lowercase and non-prefixed forms are not accepted.

Price per gram looks wrong

Troy ounces were converted using 28.35 grams.

Fix: A troy ounce is 31.1035 grams. The avoirdupois ounce used for everyday weight is a different unit.

Stale updatedAt

The upstream feed has not refreshed.

Fix: Compare `updatedAt` against now and show the age. A metal price without a timestamp is not usable.

Gold-API — frequently asked questions

Is there a free gold price API with no key?

Yes. Gold-API returns live spot prices for gold, silver, platinum and palladium with no key, no account and no registration.

What unit is the gold price in?

US dollars per troy ounce. A troy ounce is 31.1035 grams, so divide by that figure for a price per gram — not by 28.35, which is the ordinary ounce.

Does the API give bid and ask prices?

No. It returns a single indicative spot figure with a timestamp, not a two-way dealable quote. Show the timestamp so users can judge how fresh it is.

Which symbols does it support?

The X-prefixed ISO metal codes `XAU`, `XAG`, `XPT` and `XPD`, plus major cryptocurrency symbols. All of them use the same `/price/{symbol}` path, so one code path covers both metals and crypto.

Tools that pair with this API

Gold-API is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.