---
title: "Gold price API: GET /v1/prices · goldprice.dev"
description: "Gold price API examples from goldprice.dev: curl, JavaScript and Python requests, a complete response, every field, error codes and limits for each plan."
canonical: "https://goldprice.dev/docs/endpoints/prices"
---

> Index of every goldprice.dev page and doc for AI readers: [llms.txt](https://goldprice.dev/llms.txt)

# Request spot prices

GET /v1/prices: copy a request for gold, silver, copper, platinum and palladium spot prices

`GET /v1/prices?symbol=XAU-USD-SPOT` gives you the gold spot price in US dollars per troy ounce. Omit `symbol` to request all spot prices at once. Without a key, the limit is 10 requests a minute per IP. Free and keyless prices are delayed by 15 minutes.

## Make a request

Symbols use BASE-QUOTE-CONTRACT, such as `XAU-USD-SPOT`, `XAG-USD-SPOT` or `XAU-INR-SPOT` for gold priced in rupees. Both `gold` and `XAU` resolve to `XAU-USD-SPOT`. Store your key on the server, as the API does not support browser CORS.

```bash
curl "https://api.goldprice.dev/v1/prices?symbol=XAU-USD-SPOT" \
  -H "Authorization: Bearer $GOLDPRICE_API_KEY"
```

```javascript
const res = await fetch("https://api.goldprice.dev/v1/prices?symbol=XAU-USD-SPOT", {
  headers: { Authorization: `Bearer ${process.env.GOLDPRICE_API_KEY}` },
})
const data = await res.json()
if (!res.ok) throw new Error(data.error)
```

```python
import os, requests

res = requests.get(
    "https://api.goldprice.dev/v1/prices?symbol=XAU-USD-SPOT",
    headers={"Authorization": f"Bearer {os.environ['GOLDPRICE_API_KEY']}"},
    timeout=10,
)
res.raise_for_status()
data = res.json()
```

## Request parameters

| Name | Location | Required | Description |
| --- | --- | --- | --- |
| `symbol` | query | No (every spot price) | BASE-QUOTE-CONTRACT, such as XAU-USD-SPOT |
| `include` | query | No | Additional field groups, such as `sources,karat` or `all` |

## Read the response

This example response was recorded without a key on 19 Oct 2026. Prices use strings to preserve precision. Parse them as decimals.

```json title="Response example (19 Oct 2026)"
{
  "symbols": [
    {
      "symbol": "XAU",
      "quote_currency": "USD",
      "unit": "troy_ounce",
      "contract_type": "spot",
      "price": "4164.22",
      "is_stale": false,
      "computed_at": "2026-10-19T12:45:06.720397+00:00"
    }
  ],
  "delayed_minutes": 15
}
```

| Field | Description |
| --- | --- |
| `symbol` | Metal code: XAU, XAG, HG, XPT or XPD |
| `quote_currency` | Currency used for the price |
| `unit` | `troy_ounce`, or `pound` for copper |
| `contract_type` | `spot` |
| `price` | Price as a decimal string |
| `is_stale` | True if the price is outside its freshness window |
| `computed_at` | Price calculation time (UTC) |
| `delayed_minutes` | 15 when the price is 15 minutes behind live (keyless and Free). Absent on paid answers. |

## API errors

| Status | error | Cause |
| --- | --- | --- |
| 400 | `invalid_symbol` | Symbol is unavailable or does not use BASE-QUOTE-CONTRACT |
| 429 | `rate_limited` | Keyless IP exceeded 100 requests in the hour |
| 429 | `rate_limit_exceeded` | Minute limit exceeded for the plan, or per IP without a key |
| 429 | `quota_exceeded` | Plan's monthly request quota exceeded |

```json title="Error response example"
{
  "error": "invalid_symbol",
  "symbol": "NOPE",
  "hint": "expected format BASE-QUOTE-CONTRACT, e.g. XAU-USD-SPOT"
}
```

## Request and data limits

Free and keyless prices are delayed by 15 minutes. Without a key, you get 10 requests a minute per IP. A free key includes 5,000 requests a month. Paid plans provide live prices. See [free plan limits](https://goldprice.dev/free-plan-limits) for all plan limits.

## Questions

### Is an API key required to get the gold price?

No. /v1/prices allows 10 requests a minute and 100 an hour per IP without a key. A free key gives you your own 5,000 requests a month.

### How can I request gold in a different currency?

Set the quote currency in the symbol, such as XAU-INR-SPOT or XAU-JPY-SPOT. Gold prices are available in 31 currencies.

### Why does the API return the price as a string?

Strings preserve precision in JSON. For sales or accounting, parse the price as a decimal rather than a float.

Source: https://goldprice.dev/docs/endpoints/prices
