---
title: "22K & 24K Gold Price API by Gram · goldprice.dev"
description: "Get 22K, 24K, and six other gold karat prices per gram in 35 currencies from one public API. Includes formulas, JSON fields, code, and MCP usage."
canonical: "https://goldprice.dev/docs/carat"
---

# Gold price by karat API reference

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 35 supported currencies.

## Endpoint

`GET /v1/carat` · No auth required · Free

Pass a three-letter `currency` code. It defaults to `USD`. The same 35-currency vocabulary used by the conversion endpoint is available here.

```bash
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.

```json
{
  "currency": "USD",
  "timestamp": "2026-10-23T06:45:01Z",
  "price_gram_24k": "129.10",
  "price_gram_22k": "118.34",
  "price_gram_21k": "112.96",
  "price_gram_20k": "107.58",
  "price_gram_18k": "96.82",
  "price_gram_16k": "86.06",
  "price_gram_14k": "75.31",
  "price_gram_10k": "53.79",
  "delayed_minutes": 15
}
```

## 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 is `22 / 24` of the 24K per-gram value; 18K is `18 / 24`.

This is the purity-adjusted metal value, not a retail jewellery quote. For sell, buyback, product-weight, and premium data, use the [physical price API](https://goldprice.dev/physical).

## JavaScript example

```javascript
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](https://goldprice.dev/docs/mcp). 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?

Yes. GET /v1/carat is a public Free-tier endpoint and does not require an API key. Standard anonymous rate limits still apply.

### Does the API support both karat and carat spelling?

The endpoint path uses /v1/carat, while the response fields use the familiar 24k, 22k, and 18k labels. Karat and carat both refer to gold purity in this context.

### How is the 22K gold price per gram calculated?

The API divides the current XAU price per troy ounce by 31.1034768 to get the 24K value per gram, converts it into the requested currency, then multiplies by 22/24 for 22K.

### Does this include jewellery making charges or dealer premiums?

No. /v1/carat returns the purity-adjusted metal value. Use the physical price endpoints for real dealer sell and buyback quotes that include local premiums.

## See also

- [Historical gold price API](https://goldprice.dev/docs/historical) for daily OHLCV and bulk data
- [API reference](https://goldprice.dev/docs/api-reference#carat) for the compact field and error-code definition
- [Gold karats: purity and price per gram](https://goldprice.dev/gold-karats)

Source: https://goldprice.dev/docs/carat
