Gold Carat API: USD per Gram for 24K–8K JSON

Metals-API 2 min read
Gold Carat API: USD per Gram for 24K–8K JSON

A gold carat API returns jewelry-grade gold as JSON — USD per gram for 24K down to 8K — instead of the ISO ounce tick XAU. On Metals-API that path is GET /api/carat with query access_key. The published sample is unit: "per Gram". This is gold only (not silver).

Copper Monthly starts at $19.99/mo (2,500 calls, 10-minute updates, 10 symbols per request). Gold Monthly is $149.99 with a tighter refresh. Docs: metals-api.com/documentation. Support: [email protected], Monday–Friday 7am–4pm EST.

Request: gold by carat

curl "https://metals-api.com/api/carat?access_key=YOUR_API_KEY"

Same access_key as /api/latest. Do not mix these gram prints with rates.XAU / rates.USDXAU (troy ounce). LBMA codes (USDLBXAG, …) are a different family.

Response: official carat fixture

{
"success": true,
"timestamp": 1712175937,
"base": "USD",
"rates": {
"24K": 73.71,
"23K": 70.62,
"22K": 67.6,
"21K": 64.5,
"18K": 55.29,
"14K": 42.98,
"12K": 36.86,
"10K": 30.74,
"9K": 27.64,
"8K": 24.55
},
"unit": "per Gram"
}

In this sample, 24K is 73.71 USD per gram and 18K is 55.29. Copy the curl with your key for a live print — do not treat 73.71 as today’s spot.

PHP: official Metals-API cURL pattern

Docs Sample Code uses $endpoint = 'latest'. Same client, swap the path to carat and read a carat key:

$endpoint = 'carat';
$access_key = 'YOUR_API_KEY';

$ch = curl_init('https://metals-api.com/api/'.$endpoint.'?access_key='.$access_key);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$json = curl_exec($ch);
curl_close($ch);

$exchangeRates = json_decode($json, true);
echo $exchangeRates['rates']['24K'];
echo $exchangeRates['unit'];

Go live

1. Register — Copper Monthly from $19.99/mo.

2. Copy access_key.

3. GET https://metals-api.com/api/carat

4. Display rates.24K with unit. Docs: /documentation.

FAQ: gold carat API

Is this the same as XAU?

No. XAU on /api/latest is a troy ounce (use rates.USDXAU for USD/oz). Carat is per gram for jewelry grades.

Does carat work for silver?

No. The carat endpoint is documented for gold. Silver is XAG / USDXAG on latest.

Get an access_key and pull 24K per gram →