Sources › Finance › PIHPS (Harga Pangan) › Commodities

PIHPS Commodities API
Daftar acuan komoditas dan kategori beserta satuannya, plus empat tingkat pasar yang bisa dipilih.
Request
https://api.zapi.ink/v1/finance:pihps/commoditiesSend 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 day.
Parameters
No parameters. Call it as is.
Code examples
curl -X GET "https://api.zapi.ink/v1/finance:pihps/commodities" \ -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
const res = await fetch("https://api.zapi.ink/v1/finance:pihps/commodities", { method: "GET", headers: { "x-api-key": "zpi_xxxxxxxxxxxxxxxxxxxxxxxx" }, }); const data = await res.json(); console.log(data);
import requests res = requests.get( "https://api.zapi.ink/v1/finance:pihps/commodities", headers={"x-api-key":"zpi_xxxxxxxxxxxxxxxxxxxxxxxx"}, ) print(res.json())
Example response
{ "project": "finance:pihps", "data": { "count": 31, "items": [ { "id": "cat_1", "name": "Beras", "unit": "kg", "order": 1, "categoryId": null }, { "id": "com_1", "name": "Beras Kualitas Bawah I", "unit": "kg", "order": 1, "categoryId": "cat_1" }, { "id": "cat_2", "name": "Daging Ayam", "unit": "kg", "order": 2, "categoryId": null }, { "id": "com_2", "name": "Beras Kualitas Bawah II", "unit": "kg", "order": 2, "categoryId": "cat_1" }, { "id": "cat_3", "name": "Daging Sapi", "unit": "kg", "order": 3, "categoryId": null }, { "id": "com_3", "name": "Beras Kualitas Medium I", "unit": "kg", "order": 3, "categoryId": "cat_1" }, { "id": "cat_4", "name": "Telur Ayam", "unit": "kg", "order": 4, "categoryId": null }, { "id": "com_4", "name": "Beras Kualitas Medium II", "unit": "kg", "order": 4, "categoryId": "cat_1" } ], "source": "bank-indonesia-pihps", "markets": [ { "id": "1", "name": "Pasar Tradisional" }, { "id": "2", "name": "Pasar Modern" }, { "id": "3", "name": "Pedagang Besar" }, { "id": "4", "name": "Produsen" } ] }, "timestamp": "2026-08-08T10:10:23Z" }
Frequently asked questions
How do I call the PIHPS Commodities API?
Send a GET request to https://api.zapi.ink/v1/finance:pihps/commodities with your Zapi key in the x-api-key header. It takes no parameters. The response is JSON in the { project, data, timestamp } envelope.
What does the PIHPS Commodities API return?
Daftar acuan komoditas dan kategori beserta satuannya, plus empat tingkat pasar yang bisa dipilih. The example response has the fields count, items, source, markets. Each item in items has fields such as id, name, unit, order, categoryId.
Is the PIHPS Commodities 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 PIHPS Commodities 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 "pihps" and endpoint "commodities".
What other PIHPS API endpoints are there?
It has 2 endpoints. Besides Commodities: Food Prices.