Developer API
Open market-price data as JSON over HTTPS. No key, no signup — the same endpoints this dashboard uses.
Core endpoints
3 endpoints · REST JSON/api/prices/{category}Latest survey round for one category: per-market prices grouped by region, each region scoped to its own most recent survey date. Falls back to bundled data when the live database is unreachable (see _source).
| Parameter | Type | Required | Description |
|---|---|---|---|
| category | path · enum | yes | One of the 10 category ids in the table below. |
{
"scrapedAt": "2026-10-11T02:14:00.000Z",
"commodity": "Rice & Grains",
"regions": [
{
"region": "REGION I (Ilocos Region)",
"regionCode": "010000000",
"date": "October 08, 2026",
"markets": ["SAN FERNANDO CITY WET MARKET", "..."],
"commodities": [
{
"name": "COMMERCIAL (LOCAL) Regular Milled",
"specification": "20-40% BRAN STREAK",
"prices": { "SAN FERNANDO CITY WET MARKET": 45 }
}
]
}
// + 16 more regions
],
"_source": "supabase"
}/api/history/{category}?region={code}Per-survey snapshots for charting. Omit ?region= for the full category history (large). Each scrape appends one snapshot per round.
| Parameter | Type | Required | Description |
|---|---|---|---|
| category | path · enum | yes | One of the 10 category ids. |
| region | query · region code | no | e.g. 010000000. Narrows to one region. |
{
"category": "rice",
"label": "Rice & Grains",
"updatedAt": "2026-10-11T02:14:00.000Z",
"regions": [
{
"region": "REGION I (Ilocos Region)",
"regionCode": "010000000",
"commodities": {
"COMMERCIAL (LOCAL) Regular Milled": [
{
"date": "2026-10-08",
"label": "October 08, 2026",
"prevailing": 42.5,
"low": 35,
"high": 54,
"quotes": 4
}
]
}
}
]
}/api/regionsEvery known region across all categories — the same list behind the dashboard's region filter. Cached server-side for one hour.
| Parameter | Type | Required | Description |
|---|
{
"regions": [
{ "regionCode": "010000000", "region": "REGION I (Ilocos Region)" },
{ "regionCode": "020000000", "region": "REGION II (Cagayan Valley)" }
// + 15 more regions
]
}Live console
Try it against this deployment
Runs in your browser against the same origin — no key needed.
/api/prices/riceCopy-paste
Code samples
Replace the path with any endpoint above. Works from any origin — CORS is open on GET.
curl "/api/prices/rice" # BASE is the deployed origin, e.g. your Vercel URL, # or run against http://localhost:3000 in development.
Categories
Use the id in paths. Dashboard pages live under /prices/{id}.
Region codes
PSGC codes used by ?region= and the regions feed.
| 010000000 | REGION I (Ilocos Region) |
| 020000000 | REGION II (Cagayan Valley) |
| 030000000 | REGION III (Central Luzon) |
| 040000000 | REGION IV-A (CALABARZON) |
| 050000000 | REGION V (Bicol Region) |
| 060000000 | REGION VI (Western Visayas) |
| 070000000 | REGION VII (Central Visayas) |
| 080000000 | REGION VIII (Eastern Visayas) |
| 090000000 | REGION IX (Zamboanga Peninsula) |
| 100000000 | REGION X (Northern Mindanao) |
| 110000000 | REGION XI (Davao Region) |
| 120000000 | REGION XII (SOCCSKSARGEN) |
| 130000000 | NCR (National Capital Region) |
| 140000000 | CAR (Cordillera Administrative Region) |
| 150000000 | BARMM (Bangsamoro Autonomous Region of Muslim Mindanao) |
| 160000000 | REGION XIII (Caraga) |
| 170000000 | REGION IV-B (MIMAROPA) |
Fair use & provenance
No key, no signup. Endpoints are public and CORS-open for GET. Fair use is enforced per IP — roughly 120 req/min on prices and regions, 60 req/min on history — with short edge caching on top. A 429 means slow down and respect the Retry-After header; persistent abuse earns a temporary block.
Cite the source. Data comes from DA-AMAS field monitoring via Bantay Presyo. SRP lines are reference baselines, not retail lists.
Dates vary by region. Each region carries its own latest survey date; rounds are never mixed within a region.