Food prices API Reference
5 routes. Base URL https://api.apifor.dev, authenticated with x-api-key. Failed calls are not charged. Overview, limits and sources are on the Food price API page.
/v1/food-prices1 creditMonthly average prices per commodity, level and region, newest month first. Months with no reported price are left out. 1 credit. WFP rows are per market (region_level market) with market details under local.
| Parameter | In | Type | Rules |
|---|---|---|---|
| country | query | string | ISO 3166-1 alpha-2 · default ID · ISO 3166-1 alpha-2 code: ID (default), MY, or a WFP country (PH, KH, LA, MM, TL, TH, VN). Other codes return an empty list. |
| source | query | string | one of bapanas, pricecatcher, wfp · wfp = WFP market prices via HDX HAPI (PH, KH, LA, MM, TL, TH, VN, and ID). Used automatically for those countries; with source=wfp and no country every WFP country is searched. |
| commodity | query | string | A code from /v1/food-prices/commodities (e.g. rice-medium) or part of the English or original name. For MY also a PriceCatcher item_code (e.g. 1). |
| region | query | string | national, an ISO 3166-2 code (ID-JB), a 2-digit statistics code, or part of a province name. All regions when left out. For MY: national, MY-01..MY-16 or part of a state name. For WFP countries: an OCHA admin p-code (PH13), a WFP market code, or part of a region or market name. |
| level | query | string | one of consumer, producer, wholesale · consumer (retail), producer (farm-gate, mill; ID only) or wholesale (WFP only). Both levels of the source when left out. |
| from | query | string | First month, YYYY-MM. |
| to | query | string | Last month, YYYY-MM. |
| page | query | integer | default 1 · Page number, from 1. |
| limit | query | integer | 1 to 200 · default 50 · Rows per page, at most 200. |
curl 'https://api.apifor.dev/v1/food-prices?country=ID&source=wfp&commodity=rice-medium®ion=ID-JB&level=consumer&from=2025-01&to=2026-01&page=1&limit=50' \
-H 'x-api-key: YOUR_API_KEY'{
"success": true,
"data": [
{
"country": "ID",
"commodity": "rice-medium",
"commodity_name": "Medium-grade rice",
"commodity_original": "Beras Medium",
"level": "consumer",
"region_level": "province",
"region_code": "ID-JB",
"region_name": "Jawa Barat",
"region_source_code": "32",
"period": "2026-01",
"price": 12964,
"currency": "IDR",
"unit": "IDR/kg"
},
{
"country": "ID",
"commodity": "rice-medium",
"commodity_name": "Medium-grade rice",
"commodity_original": "Beras Medium",
"level": "consumer",
"region_level": "province",
"region_code": "ID-JB",
"region_name": "Jawa Barat",
"region_source_code": "32",
"period": "2025-12",
"price": 13001,
"currency": "IDR",
"unit": "IDR/kg"
}
],
"meta": {
"total": 61,
"page": 1,
"per_page": 2,
"total_pages": 31,
"coverage": [
"ID"
],
"attribution": {
"source": "Badan Pangan Nasional (National Food Agency of Indonesia), Open Data Pangan",
"license": "Indonesian government publication (Law 28/2014 on Copyright, Art. 43(b)); attribution required by APIFor policy",
"license_url": "https://peraturan.bpk.go.id/Download/28018/UU_Nomor_28_Tahun_2014.pdf",
"source_url": "https://data.badanpangan.go.id/datasetpublications",
"attribution_page": "https://data.badanpangan.go.id",
"notice": "Source: Badan Pangan Nasional, Open Data Pangan (data.badanpangan.go.id). Monthly averages as published; APIFor added English commodity n..."
}
}
}200Price rows400Invalid parameter
/v1/food-prices/commodities1 creditEvery commodity with a price series: English code and name, every original spelling, unit and the months covered. 1 credit.
| Parameter | In | Type | Rules |
|---|---|---|---|
| country | query | string | ISO 3166-1 alpha-2 · default ID · ISO 3166-1 alpha-2 code: ID (default), MY, or a WFP country (PH, KH, LA, MM, TL, TH, VN). Other codes return an empty list. |
| source | query | string | one of bapanas, pricecatcher, wfp · wfp = WFP market prices via HDX HAPI (PH, KH, LA, MM, TL, TH, VN, and ID). Used automatically for those countries; with source=wfp and no country every WFP country is searched. |
| level | query | string | one of consumer, producer, wholesale · consumer (retail), producer (farm-gate, mill; ID only) or wholesale (WFP only). Both levels of the source when left out. |
curl 'https://api.apifor.dev/v1/food-prices/commodities?country=ID&source=wfp&level=consumer' \
-H 'x-api-key: YOUR_API_KEY'{
"success": true,
"data": [
{
"country": "ID",
"code": "rice-medium",
"name": "Medium-grade rice",
"level": "consumer",
"unit": "IDR/kg",
"names_original": [
"Beras Medium"
],
"first_period": "2021-01",
"last_period": "2026-01",
"rows": 2235,
"currency": "IDR"
}
],
"meta": {
"total": 1,
"coverage": [
"ID"
],
"attribution": {
"source": "Badan Pangan Nasional (National Food Agency of Indonesia), Open Data Pangan",
"license": "Indonesian government publication (Law 28/2014 on Copyright, Art. 43(b)); attribution required by APIFor policy",
"license_url": "https://peraturan.bpk.go.id/Download/28018/UU_Nomor_28_Tahun_2014.pdf",
"source_url": "https://data.badanpangan.go.id/datasetpublications",
"attribution_page": "https://data.badanpangan.go.id",
"notice": "Source: Badan Pangan Nasional, Open Data Pangan (data.badanpangan.go.id). Monthly averages as published; APIFor added English commodity n..."
}
}
}200Commodity list400Invalid parameter
/v1/food-prices/latest1 creditThe newest month for each commodity in one region (national by default), with the month before and the change in percent. 1 credit.
| Parameter | In | Type | Rules |
|---|---|---|---|
| country | query | string | ISO 3166-1 alpha-2 · default ID · ISO 3166-1 alpha-2 code: ID (default), MY, or a WFP country (PH, KH, LA, MM, TL, TH, VN). Other codes return an empty list. |
| source | query | string | one of bapanas, pricecatcher, wfp · wfp = WFP market prices via HDX HAPI (PH, KH, LA, MM, TL, TH, VN, and ID). Used automatically for those countries; with source=wfp and no country every WFP country is searched. |
| commodity | query | string | A code from /v1/food-prices/commodities (e.g. rice-medium) or part of the English or original name. For MY also a PriceCatcher item_code (e.g. 1). |
| region | query | string | national (default), an ISO 3166-2 code, a 2-digit statistics code or part of a province name. For MY: national, MY-01..MY-16 or part of a state name. For WFP countries: an OCHA admin p-code (PH13), a WFP market code, or part of a region or market name. |
| level | query | string | one of consumer, producer, wholesale · consumer (retail), producer (farm-gate, mill; ID only) or wholesale (WFP only). Both levels of the source when left out. |
curl 'https://api.apifor.dev/v1/food-prices/latest?country=ID&source=wfp&commodity=rice-medium®ion=national&level=consumer' \
-H 'x-api-key: YOUR_API_KEY'{
"success": true,
"data": [
{
"country": "ID",
"commodity": "rice-medium",
"commodity_name": "Medium-grade rice",
"commodity_original": "Beras Medium",
"level": "consumer",
"region_level": "national",
"region_code": "ID",
"region_name": "Indonesia",
"region_source_code": null,
"period": "2026-01",
"price": 13517,
"currency": "IDR",
"unit": "IDR/kg",
"previous_period": "2025-12",
"previous_price": 13540,
"change_pct": -0.17
}
],
"meta": {
"total": 1,
"coverage": [
"ID"
],
"attribution": {
"source": "Badan Pangan Nasional (National Food Agency of Indonesia), Open Data Pangan",
"license": "Indonesian government publication (Law 28/2014 on Copyright, Art. 43(b)); attribution required by APIFor policy",
"license_url": "https://peraturan.bpk.go.id/Download/28018/UU_Nomor_28_Tahun_2014.pdf",
"source_url": "https://data.badanpangan.go.id/datasetpublications",
"attribution_page": "https://data.badanpangan.go.id",
"notice": "Source: Badan Pangan Nasional, Open Data Pangan (data.badanpangan.go.id). Monthly averages as published; APIFor added English commodity n..."
}
}
}200Latest prices400Invalid parameter
/v1/food-prices/anomalies1 creditMonthly price anomaly index per commodity (QIPA, AIPA, IFPA) with a status such as alert_high or warning_low. 1 credit.
| Parameter | In | Type | Rules |
|---|---|---|---|
| country | query | string | ISO 3166-1 alpha-2 · default ID · ISO 3166-1 alpha-2 country code: ID (default) or MY. Other codes return an empty list. |
| commodity | query | string | Code or part of a name. |
| from | query | string | First month, YYYY-MM. |
| to | query | string | Last month, YYYY-MM. |
curl 'https://api.apifor.dev/v1/food-prices/anomalies?country=ID&commodity=beef&from=2026-10&to=2026-10' \
-H 'x-api-key: YOUR_API_KEY'{
"success": true,
"data": [
{
"country": "ID",
"commodity": "beef",
"commodity_name": "Beef (lean)",
"commodity_original": "Daging Sapi Murni",
"period": "2026-10",
"qipa": 4.576311018,
"aipa": 2.67910535,
"ifpa": 3.437987617,
"status": "alert_high",
"status_original": "Alert (High Price)"
}
],
"meta": {
"total": 1,
"coverage": [
"ID"
],
"attribution": {
"source": "Badan Pangan Nasional (National Food Agency of Indonesia), Open Data Pangan",
"license": "Indonesian government publication (Law 28/2014 on Copyright, Art. 43(b)); attribution required by APIFor policy",
"license_url": "https://peraturan.bpk.go.id/Download/28018/UU_Nomor_28_Tahun_2014.pdf",
"source_url": "https://data.badanpangan.go.id/datasetpublications",
"attribution_page": "https://data.badanpangan.go.id",
"notice": "Source: Badan Pangan Nasional, Open Data Pangan (data.badanpangan.go.id). Monthly averages as published; APIFor added English commodity n..."
}
}
}200Anomaly rows400Invalid parameter
/v1/food-prices/coverageFreeCountries this service covers, with sources, licences, row counts and country-only fields. Free (0 credits), still needs an API key. Price note: Free.
curl 'https://api.apifor.dev/v1/food-prices/coverage' \
-H 'x-api-key: YOUR_API_KEY'{
"success": true,
"data": {
"service": "food-prices",
"global": false,
"country_param": "optional",
"param_name": "country",
"countries": [
{
"country": "ID",
"market": null,
"subdivision_levels": [
"province",
"regency"
],
"rows": null,
"updated_at": null,
"sources": [
{
"name": "Badan Pangan Nasional, Open Data Pangan",
"url": "https://data.badanpangan.go.id",
"licence": "Government publication, Law 28/2014 Art. 43(b), attribution",
"attribution": null
},
{
"name": "WFP market prices via HDX HAPI",
"url": "https://data.humdata.org/dataset/global-wfp-food-prices",
"licence": "CC BY-IGO",
"attribution": "Source: World Food Programme (WFP) via HDX HAPI, CC BY-IGO; monthly means by APIFor"
}
],
"local_fields": [],
"notes": "Monthly prices by commodity and market level. With source=wfp: WFP market prices 2017 to 2021 (about 320k monthly rows, 220 markets)."
},
{
"country": "MY",
"market": null,
"subdivision_levels": [
"state"
],
"rows": 416845,
"updated_at": "2026-11-30",
"sources": [
{
"name": "KPDN PriceCatcher via data.gov.my",
"url": "https://data.gov.my/data-catalogue/pricecatcher",
"licence": "CC BY 4.0",
"attribution": "Source: KPDN PriceCatcher, data.gov.my (CC BY 4.0); aggregated monthly by APIFor"
}
],
"local_fields": [
"item_code",
"item_group"
],
"notes": "Consumer (retail) prices only, from 2022-01. Daily premise-level prices averaged per month, item and state, plus national (region MY). It..."
}
]
}
}200Coverage