goldprice.dev — retail gold conversion (keyless)
Two endpoints, no API key, no signup — build the whole feature and demo it before anyone subscribes.
Per-gram price by karat — /v1/carat
Every common karat purity (24k down to 10k) per gram, in one call. Default USD; 31 currencies supported.
curl "https://api.goldprice.dev/v1/carat?currency=INR"
Response — keys are flat price_gram_Nk, and every value is a string (parse before doing math):
{"currency":"IDR","timestamp":"2026-07-07T13:10:07Z",
"price_gram_24k":"2397283.68","price_gram_22k":"2197510.04","price_gram_21k":"2097623.22",
"price_gram_20k":"1997736.40","price_gram_18k":"1797962.76","price_gram_16k":"1598189.12",
"price_gram_14k":"1398415.48","price_gram_10k":"998868.20"}
Karat keys returned: price_gram_24k 22k 21k 20k 18k 16k 14k 10k. Computed from live XAU spot × live FX. 22k is the retail standard across India/UAE, 24k across Indonesia/China.
MCP equivalent: get_carat(currency) — free, no tier gate.
Weight ↔ money — /v1/convert
Convert a metal amount to a currency (or between units). No auth. XAU and XAG only (no copper, no spot row); date / historical is not supported.
curl "https://api.goldprice.dev/v1/convert?from=XAU&to=USD&amount=1&unit=oz"
Response — rate is full precision; amount / result are strings (cast before formatting):
{"from":"XAU","to":"IDR","amount":"1.0","rate":"2397283.680999…","result":"2397283.68","unit":"gram","timestamp":"2026-07-07T13:10:07Z"}
- Metals:
XAU,XAG - Units:
gram,oz(troy, 31.1035g),kg— the calculator UI also uses tola (11.6638g) and tael (37.4290g) - Currencies (31): AUD BGN BRL CAD CHF CNY CZK DKK EUR GBP HKD HUF IDR ILS INR ISK JPY KRW MXN MYR NOK NZD PHP PLN RON SEK SGD THB TRY USD ZAR
Currency rounding — do this right
Format the converted amount with the currency's ISO-4217 minor units, but keep the rate full-precision:
- 0 decimals: JPY, KRW, VND, IDR*, ISK, CLP, XAF, XOF and other zero-decimal currencies (whole units only).
- 3 decimals: BHD, IQD, JOD, KWD, LYD, OMR, TND (Gulf/Levant dinars).
- 2 decimals: everything else (default).
Client-side, Intl.NumberFormat(locale, {style:'currency', currency}) handles this for you. *IDR is displayed at 0 decimals by convention even though gram sub-units exist.
When your users will need to upgrade
Keyless carat/convert covers retail display. They'll hit Pro ($30) when they need: silver/copper spot prices, commercial use (embedding in a product you sell — attribution required), or historical conversion. Non-USD gold spot is free on all tiers (31 currencies).