Build an India Gold Price App with JavaScript
Build a live India gold-rate app from INR per-gram 24K and 22K prices, with server-side caching, Indian number formatting, GST estimates, and clear limits.
Read →The gold-price-API questions that come up on Reddit, answered straight: free tier, update frequency, rate limits, auth, where the number comes from, commercial use, and whether it's good enough to build on.
Search Reddit for a gold price API and the thread is nearly always the same shape. Someone is building a dashboard, a price alert, a trading bot, or a storefront that quotes bullion, and they want a live gold price they can pull from code. Before wiring anything in, they ask the same handful of questions in r/algotrading, r/webdev, and r/golang: is there a free tier, how fresh is the number, what are the limits, can I use it commercially, and can I trust the data.
This post answers those questions directly, using goldprice.dev as the worked example. No sign-up is needed to read it, and the first API call below runs without a key.
It is a commodity pricing API for developers: gold, silver, and copper, over a single authenticated REST endpoint at https://api.goldprice.dev. Every response carries a cross-validated staleness flag, and you can ask for per-source prices and timestamps or a divergence figure with ?include=, so your code can tell when one upstream is lagging instead of failing silently. An MCP server ships on every plan, including the free one.
It is not a brokerage or a settlement feed. The prices are indicative reference data, published for display, analytics, and alerts. If you need an executable dealing quote to settle a trade, no public gold price API is the right tool, this one included.
Yes, and it does not need a card. The free plan gives you 1,000 calls a month at 30 requests a minute, covering the live gold (XAU) spot price. Paid plans add silver and copper, futures settlement data, higher limits, and commercial rights:
| Plan | Price | Calls / month | What it adds |
|---|---|---|---|
| Free | $0 | 1,000 | XAU spot, MCP, no card |
| Physical | $10/mo | 20,000 | + gold futures, per-country dealer prices |
| Pro | $30/mo | 100,000 | + silver, copper, 30 years of daily history, commercial use |
| Realtime Pro | $80/mo | 1,000,000 | + WebSocket XAU/XAG tick stream and physical channels |
The live spot price is a continuously updated oracle, not a once-a-day snapshot. Futures settlement values update on the exchange's settlement schedule. The point of the API is that you never have to guess which one you are looking at: every response carries computed_at and sets is_stale when a value is older than its expected refresh window, and ?include=sources breaks that down to a per-source timestamp when you need it. You read the freshness off the payload rather than trusting a blanket "real-time" label.
Free is 30 requests a minute; paid plans go to 120 and 500. Every response returns the standard X-RateLimit-Remaining header, so the correct pattern is to read that header and back off when it runs low rather than polling blind and eating 429s. For most apps a short client-side cache, matched to how often the underlying value actually moves, keeps you well inside the free tier.
A bearer token. Keys are prefixed ga_live_ and go in the Authorization header. There is also an anonymous surface, capped at 100 requests an hour per IP, that returns the same lean default shape as an authenticated call (price, bid, ask, and the staleness fields) so you can test before you sign up. Authenticating doesn't change the default, but it unlocks ?include=stats for open, high, low, previous close, change, and the cross-source divergence fields — ?include=sources and ?include=karat are available either way.
Yes, and this is the part most APIs hide. Add ?include=sources and the response includes a sources[] array, one row per upstream, each with its own price and timestamp. When sources disagree, ?include=stats (authenticated) carries divergence_bps and a divergence_flag, so you can decide your own tolerance instead of trusting a single blended number with no provenance. If you are building anything where a wrong price has a cost, that visibility is the reason to use a structured API over scraping a webpage.
The free and Physical tiers are for personal and evaluation use. Commercial use, redisplaying the price in a product you ship, starts on the Pro plan and requires attribution. If you are putting a gold price in front of your own users, Pro is the floor.
Yes. The MCP server is included on every plan, including free. You add one config block to Claude, Cursor, or any MCP-capable runtime and the agent fetches the live price directly, with no hand-rolled tool code. The data is the same one the REST API serves. There is a full MCP walkthrough if you want the setup detail.
No key, no dependencies:
curl https://api.goldprice.dev/v1/prices?symbol=XAU-USD-SPOT
You get back JSON with the price, bid, ask, and a staleness flag. That single call is enough to put a live, honest gold price into whatever you are building. Add ?include=karat for a per-gram breakdown by karat or ?include=sources for the contributing sources. When you want the full shape and higher limits, a free key takes a minute.
For the language-specific version, Fetch live gold prices in JavaScript covers the REST path end to end, and Caching gold prices and staying inside rate limits covers doing it at volume.
related guides
Build a live India gold-rate app from INR per-gram 24K and 22K prices, with server-side caching, Indian number formatting, GST estimates, and clear limits.
Read →Build a gold jewelry price calculator from live per-gram karat prices, with exact decimal math, caching, margins, and clear valuation limits.
Read →Build a reproducible local-currency gold backtest from settled XAU/USD bars and dated FX observations, without inserting future rates into historical rows.
Read →goldprice.dev
Live gold prices, historical OHLC, and multi-source aggregation — available via REST and SSE.