# Pegadaian Gold — Zapi reference > Indonesian retail gold — the buy and sell price a state pawnbroker quotes, per gram, with daily history. **Base URL:** `https://api.zpi.web.id` **Auth:** Send `x-api-key: YOUR_KEY` header on every request. Get a free key at https://zpi.web.id/dashboard/keys. **Response envelope:** `{ status, message, content }` **Rate limit:** 60 req/min on free tier. **Related:** - Detail page: https://zpi.web.id/api/finance/pegadaian - Endpoint catalog: https://zpi.web.id/category/finance - Concise index: https://zpi.web.id/llms.txt - Full reference: https://zpi.web.id/llms-full.txt --- ## Pegadaian Gold **Category:** finance · **Slug:** `pegadaian` **Detail page:** https://zpi.web.id/api/finance/pegadaian Indonesian retail gold — the buy and sell price a state pawnbroker quotes, per gram, with daily history. **Tags:** gold, indonesia, idr, commodity, savings ### Gold price Today's buy and sell price per gram, and the spread. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:pegadaian/gold-price` - **Cache TTL:** 300s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `x` | string | query | no | Unused — the current price takes no parameters | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:pegadaian/gold-price?x=" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:pegadaian/gold-price?x=", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:pegadaian/gold-price?x=", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "date": "2026-08-01", "metal": "gold", "source": "pegadaian", "currency": "IDR", "unitGram": 0.01, "buyPerGram": 2367000, "buyPerUnit": 23670, "sellPerGram": 2492000, "sellPerUnit": 24920, "spreadPerGram": 125000 } ``` --- ### Gold history Daily buy/sell history over 7 to 360 days. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/finance:pegadaian/gold-history` - **Cache TTL:** 300s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `days` | enum(7|30|90|180|360) | query | no | Window length in days. Default 30 | | `type` | enum(all|sell|buy) | query | no | Which side to return. Default all | **cURL:** ```bash curl "https://api.zpi.web.id/v1/finance:pegadaian/gold-history?days=30&type=all" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/finance:pegadaian/gold-history?days=30&type=all", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/finance:pegadaian/gold-history?days=30&type=all", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "days": 30, "type": "all", "count": 30, "items": [ { "date": "2026-08-01", "buyPerGram": 2367000, "sellPerGram": 2492000, "spreadPerGram": 125000 }, { "date": "2026-07-31", "buyPerGram": 2392000, "sellPerGram": 2518000, "spreadPerGram": 126000 }, { "date": "2026-07-30", "buyPerGram": 2387000, "sellPerGram": 2513000, "spreadPerGram": 126000 }, { "date": "2026-07-29", "buyPerGram": 2367000, "sellPerGram": 2492000, "spreadPerGram": 125000 }, { "date": "2026-07-28", "buyPerGram": 2378000, "sellPerGram": 2504000, "spreadPerGram": 126000 }, { "date": "2026-07-27", "buyPerGram": 2394000, "sellPerGram": 2520000, "spreadPerGram": 126000 }, { "date": "2026-07-26", "buyPerGram": 2378000, "sellPerGram": 2504000, "spreadPerGram": 126000 }, { "date": "2026-07-25", "buyPerGram": 2378000, "sellPerGram": 2504000, "spreadPerGram": 126000 } ], "metal": "gold", "source": "pegadaian", "currency": "IDR" } ``` --- _Generated: 2026-08-02T14:23:51.547Z_