Sources › Finance › Pegadaian Gold › Gold history

Pegadaian Gold Gold history API

Daily buy/sell history over 7 to 360 days.

Pegadaian GoldGET /gold-historyAll plans1 Zap

Request

GET
https://api.zapi.ink/v1/finance:pegadaian/gold-history

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 1 hour.

Parameters

NameTypeInRequiredDescription
daysenum: 7 | 30 | 90 | 180 | 360queryNoWindow length in days. Default 30 Example: 30
typeenum: all | sell | buyqueryNoWhich side to return. Default all Example: all

Code examples

cURL
curl -X GET "https://api.zapi.ink/v1/finance:pegadaian/gold-history?days=30&type=all" \
  -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
JavaScript
const res = await fetch("https://api.zapi.ink/v1/finance:pegadaian/gold-history?days=30&type=all", {
  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:pegadaian/gold-history",
    params={"days":"30","type":"all"},
    headers={"x-api-key":"zpi_xxxxxxxxxxxxxxxxxxxxxxxx"},
)
print(res.json())

Example response

200 OK · application/json
{
  "project": "finance:pegadaian",
  "data": {
    "days": 30,
    "type": "all",
    "count": 30,
    "items": [
      {
        "date": "2026-08-20",
        "buyPerGram": 2490000,
        "sellPerGram": 2622000,
        "spreadPerGram": 132000
      },
      {
        "date": "2026-08-19",
        "buyPerGram": 2446000,
        "sellPerGram": 2575000,
        "spreadPerGram": 129000
      },
      {
        "date": "2026-08-18",
        "buyPerGram": 2474000,
        "sellPerGram": 2605000,
        "spreadPerGram": 131000
      },
      {
        "date": "2026-08-17",
        "buyPerGram": 2472000,
        "sellPerGram": 2603000,
        "spreadPerGram": 131000
      },
      {
        "date": "2026-08-16",
        "buyPerGram": 2463000,
        "sellPerGram": 2593000,
        "spreadPerGram": 130000
      },
      {
        "date": "2026-08-15",
        "buyPerGram": 2463000,
        "sellPerGram": 2593000,
        "spreadPerGram": 130000
      },
      {
        "date": "2026-08-14",
        "buyPerGram": 2452000,
        "sellPerGram": 2582000,
        "spreadPerGram": 130000
      },
      {
        "date": "2026-08-13",
        "buyPerGram": 2472000,
        "sellPerGram": 2603000,
        "spreadPerGram": 131000
      }
    ],
    "metal": "gold",
    "source": "pegadaian",
    "currency": "IDR"
  },
  "timestamp": "2026-08-02T04:30:01Z"
}

Frequently asked questions

How do I call the Pegadaian Gold Gold history API?

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

What does the Pegadaian Gold Gold history API return?

Daily buy/sell history over 7 to 360 days. The example response has the fields days, type, count, items, metal, source, currency. Each item in items has fields such as date, buyPerGram, sellPerGram, spreadPerGram.

Is the Pegadaian Gold Gold history 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 Pegadaian Gold Gold history 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 "pegadaian" and endpoint "gold-history".

What other Pegadaian Gold API endpoints are there?

It has 2 endpoints. Besides Gold history: Gold price.