# Harga Pangan Bank Indonesia API

> Returns the food commodities of the Bank Indonesia price panel with the date of their latest prices.

Category: Government & Open Data. Region: ID. 2 endpoints at `https://api.hoshime.com/v1/hargapangan/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/hargapangan
## GET /v1/hargapangan/commodities

The food commodities of the Bank Indonesia price panel, with the date of their latest prices.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `id` (string), `name` (string), `priceDate` (string)

```bash
curl "https://api.hoshime.com/v1/hargapangan/commodities" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/hargapangan/prices

Daily prices of one food commodity by region in Indonesia: the national average, each province, city and market, for the five days up to a date.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `commodity` | string | yes | Commodity id from the commodities endpoint, such as 11 for Bawang Merah. (e.g. 11) |
| `priceType` | string | no | 1 traditional market (default), 2 modern market, 3 wholesale trader, 4 producer. |
| `date` | string | no | Last day of the five-day table, as YYYY-MM-DD. Empty uses the day of the commodity's latest prices. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `level` (integer (int64)), `name` (string), `parent` (string), `prices` (DailyPrice[]), `prices[].date` (string), `prices[].price` (number (double))

```bash
curl "https://api.hoshime.com/v1/hargapangan/prices?commodity=11" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
