DocsUse case

Price jewellery from the gold rate

A metal rate for your shop's own pricing calculation

3 Nov 2026 · 3 min read

Use the gold price API to get a per-gram metal rate, multiply it by the item's weight, then add your shop's making charge, taxes and margin. Free and keyless requests use spot prices that are 15 minutes late; live prices need Basic.

Get the per-gram rate by karat

GET /v1/carat?currency=INR returns per-gram prices for 24K, 22K, 21K, 20K, 18K, 16K, 14K and 10K in one call, with no key needed. The curl example shows the request.

The endpoint supports 35 currencies. Prices in other currencies use exchangerate.dev rates; see the karat price API for details.

Shell
curl "https://api.goldprice.dev/v1/carat?currency=INR"

Add your shop's charges

A shop's item price is usually the per-gram rate for its karat multiplied by the item weight, plus the shop's making charge, taxes and margin. The API supplies only the metal rate.

The JavaScript example uses itemPrice(weightGrams, karat, makingCharge) for the metal value plus making charge. Add your shop's taxes and margin to complete the selling price.

JavaScript
// Metal value of an item from today's per-gram rate, plus the shop's making charge.// Add your own taxes and margin to this.async function itemPrice(weightGrams, karat, makingCharge, currency = 'INR') {  const res = await fetch(`https://api.goldprice.dev/v1/carat?currency=${currency}`)  if (!res.ok) throw new Error(`goldprice.dev answered ${res.status}`)  const rates = await res.json()  const perGram = Number(rates[`price_gram_${karat}k`])  return weightGrams * perGram + makingCharge}// A 22K ring of 8 grams with a making charge of 1,500 rupeesconsole.log(await itemPrice(8, 22, 1500))

Print a price list for the counter

One request is enough for a whole board. The Python script fetches the INR rates once and prints each karat for 2, 5 and 10 gram pieces with an 8% making charge. Change the making charge, the karats and the weights to match the shop.

The table is from a run on 2 November 2026. A 5 g piece in 22K costs 5 × 10,906.38 = 54,531.90 in gold, and 58,894.45 with the 8% making charge. The script rounds each price once, at the end, with half-up rounding. Fetch the rate on a timer in your backend, store it with its timestamp and print the timestamp on the board.

Python
import jsonfrom decimal import Decimal, ROUND_HALF_UPfrom urllib.request import urlopenAPI = "https://api.goldprice.dev"cents = lambda d: d.quantize(Decimal("0.01"), rounding=ROUND_HALF_UP)def rates(currency):    with urlopen(f"{API}/v1/carat?currency={currency}", timeout=10) as r:        return json.load(r)def price_list(currency, karats, weights, making_pct):    data = rates(currency)    print(f"Rates at {data['timestamp']} ({currency} per gram)")    for k in karats:        rate = Decimal(data[f"price_gram_{k}k"])        row = [f"{k}K {rate:>9}"]        for w in weights:            metal = Decimal(w) * rate            row.append(f"{w}g {cents(metal * (1 + Decimal(making_pct) / 100)):>10}")        print("  ".join(row))price_list("INR", [24, 22, 18, 14], ["2", "5", "10"], "8")
KaratINR per gram2 g with making charge5 g with making charge10 g with making charge
24K11,897.8725,699.4064,248.50128,497.00
22K10,906.3823,557.7858,894.45117,788.90
18K8,923.4019,274.5448,186.3696,372.72
14K6,940.4214,991.3137,478.2774,956.54

Apply the calculation in India or Indonesia

An Indian shop can use the INR rate for a 22K item, multiply it by the weight in grams and add its own charges. An Indonesian shop can use the same method for an 18K item priced in rupiah.

Use the gold price calculator for a calculation, or add a reference rate to your website with the jewellery shop widget.

Plan for freshness and request limits

Free includes 5,000 requests a month. Keyless callers get 10 requests a minute and 100 an hour per IP.

Spot prices are 15 minutes late on Free and without a key. Paid plans provide live prices; choose Basic when your pricing needs a live metal rate.

Questions

Can I get karat prices without an API key?

Yes. The karat endpoint needs no key, with limits of 10 requests a minute and 100 an hour per IP.

Does the API include making charges, taxes or margin?

No. It supplies only the metal rate. Your shop adds its own making charge, taxes and margin to calculate the selling price.

Are the gold prices live on Free?

No. Free and keyless requests use spot prices that are 15 minutes late. Live prices need Basic.

Keep reading

Start with a free API key

Try the karat price API with 5,000 requests a month and no card needed.

Get a free key