Sources › Finance › GoldPrice › Performance

GoldPrice Performance API

Performa harga historis multi-periode (USD/GBP, EOD).

GoldPriceGET /performanceAll plans1 Zap

Request

GET
https://api.zapi.ink/v1/finance:goldprice/performance

Send your key in the x-api-key header. The response is JSON in the { project, data, timestamp } envelope, and an identical request is served from cache for 5 minutes.

Parameters

NameTypeInRequiredDescription
metalenum: gold | silverqueryNoLogam: gold (XAU) atau silver (XAG). Default gold. Example: gold
rangeenum: 1M | 6M | 1Y | 5Y | 10YqueryNoPanjang deret yang ditarik. Nilai yang diterima upstream persis lima ini — 3M, YTD, 2Y dan MAX ditolak dengan "Unknown range". Default 10Y supaya semua periode di bawah bisa dihitung. Example: 10Y

Code examples

cURL
curl -X GET "https://api.zapi.ink/v1/finance:goldprice/performance?metal=gold&range=10Y" \
  -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
JavaScript
const res = await fetch("https://api.zapi.ink/v1/finance:goldprice/performance?metal=gold&range=10Y", {
  method: "GET",
  headers: {
    "x-api-key": "zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
  },
});
const data = await res.json();
console.log(data);
Python
import requests

res = requests.get(
    "https://api.zapi.ink/v1/finance:goldprice/performance",
    params={"metal":"gold","range":"10Y"},
    headers={"x-api-key":"zpi_xxxxxxxxxxxxxxxxxxxxxxxx"},
)
print(res.json())

Example response

200 OK · application/json
{
  "project": "finance:goldprice",
  "data": {
    "asOf": "2026-05-01",
    "note": "Performa dihitung dari data penutupan harian (EOD) sumber; bukan harga spot live. `asOf` adalah tanggal data terakhir yang tersedia.",
    "metal": "gold",
    "source": "historical-eod",
    "symbol": "XAU",
    "current": 4636.9,
    "periods": [
      {
        "label": "1M",
        "changeAbs": -102.1,
        "priceThen": 4739,
        "changePercent": -2.15,
        "priceThenDate": "2026-04-01"
      },
      {
        "label": "3M",
        "changeAbs": -344.95,
        "priceThen": 4981.85,
        "changePercent": -6.92,
        "priceThenDate": "2026-01-30"
      },
      {
        "label": "6M",
        "changeAbs": 625.4,
        "priceThen": 4011.5,
        "changePercent": 15.59,
        "priceThenDate": "2025-10-31"
      },
      {
        "label": "YTD",
        "changeAbs": 269.1,
        "priceThen": 4367.8,
        "changePercent": 6.16,
        "priceThenDate": "2025-12-30"
      },
      {
        "label": "1Y",
        "changeAbs": 1422.15,
        "priceThen": 3214.75,
        "changePercent": 44.24,
        "priceThenDate": "2025-05-01"
      },
      {
        "label": "2Y",
        "changeAbs": 2334.55,
        "priceThen": 2302.35,
        "changePercent": 101.4,
        "priceThenDate": "2024-05-01"
      },
      {
        "label": "5Y",
        "changeAbs": 2869.25,
        "priceThen": 1767.65,
        "changePercent": 162.32,
        "priceThenDate": "2021-04-30"
      }
    ],
    "chartUrl": "https://goldprice.org/charts/gold-price-performance-USD_x.png",
    "currency": "USD"
  },
  "timestamp": "2026-06-14T06:24:09Z"
}

Frequently asked questions

How do I call the GoldPrice Performance API?

Send a GET request to https://api.zapi.ink/v1/finance:goldprice/performance with your Zapi key in the x-api-key header. Parameters — optional: metal, range. The response is JSON in the { project, data, timestamp } envelope.

What does the GoldPrice Performance API return?

Performa harga historis multi-periode (USD/GBP, EOD). The example response has the fields asOf, note, metal, source, symbol, current, periods, chartUrl. Each item in periods has fields such as label, changeAbs, priceThen, changePercent, priceThenDate.

Is the GoldPrice Performance API free?

Yes. It is on the Zapi free tier: 600 Zap a month with one API key and no credit card. Each call costs 1 Zap. Paid plans raise the limits.

Can an AI assistant call the GoldPrice Performance API?

Yes. Add the Zapi MCP server (https://mcp.zapi.ink/mcp) to Claude, Cursor or another MCP client and ask in plain words; it calls run_scraper with scraper "goldprice" and endpoint "performance".

What other GoldPrice API endpoints are there?

It has 3 endpoints. Besides Performance: Spot, News.