22K and 24K Gold Price API by Gram
One public request returns the current per-gram metal value for 24K, 22K, 21K, 20K, 18K, 16K, 14K, and 10K gold in any of the 31 supported currencies.
Endpoint
Pass a three-letter currency code. It defaults toUSD. The same 31-currency vocabulary used by the conversion endpoint is available here.
curl "https://api.goldprice.dev/v1/carat?currency=EUR"Response
Prices are decimal strings, not binary floating-point numbers. Parse them with a decimal type when exact money arithmetic matters. The values below are illustrative sample data.
{
"currency": "USD",
"timestamp": "2026-07-16T08:30:00Z",
"price_gram_24k": "153.42",
"price_gram_22k": "140.63",
"price_gram_21k": "134.24",
"price_gram_20k": "127.85",
"price_gram_18k": "115.07",
"price_gram_16k": "102.28",
"price_gram_14k": "89.50",
"price_gram_10k": "63.93"
}How the karat calculation works
The API starts with the current XAU/USD spot value, applies the live USD-to-local FX rate, divides by 31.1034768 grams per troy ounce, and applies the purity fraction. For example, 22K is22 / 24 of the 24K per-gram value; 18K is18 / 24.
This is the purity-adjusted metal value, not a retail jewellery quote. For sell, buyback, product-weight, and premium data, use the physical gold price API.
JavaScript example
const response = await fetch(
"https://api.goldprice.dev/v1/carat?currency=AED"
);
if (!response.ok) throw new Error(await response.text());
const prices = await response.json();
console.log(prices.price_gram_24k, prices.price_gram_22k);MCP tool
Agent clients can call get_carat(currency) through the gold price MCP server. It returns the same purity ladder and follows the same Free-tier access rules as the REST endpoint.
FAQ
Is the karat gold price API free?
Does the API support both karat and carat spelling?
How is the 22K gold price per gram calculated?
Does this include jewellery making charges or dealer premiums?
See also
- Historical gold price API for daily OHLCV and bulk data
- API reference for the compact field and error-code definition