Developer API

Open market-price data as JSON over HTTPS. No key, no signup — the same endpoints this dashboard uses.

3 endpoints · 10 categories · 17 regions · CORS open on GET
Operational

Core endpoints

3 endpoints · REST JSON
GET/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).

ParameterTypeRequiredDescription
categorypath · enumyesOne of the 10 category ids in the table below.
application/json
{
  "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"
}
GET/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.

ParameterTypeRequiredDescription
categorypath · enumyesOne of the 10 category ids.
regionquery · region codenoe.g. 010000000. Narrows to one region.
application/json
{
  "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
          }
        ]
      }
    }
  ]
}
GET/api/regions

Every known region across all categories — the same list behind the dashboard's region filter. Cached server-side for one hour.

ParameterTypeRequiredDescription
application/json
{
  "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/rice

Copy-paste

Code samples

Replace the path with any endpoint above. Works from any origin — CORS is open on GET.

application/json
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.

010000000REGION I (Ilocos Region)
020000000REGION II (Cagayan Valley)
030000000REGION III (Central Luzon)
040000000REGION IV-A (CALABARZON)
050000000REGION V (Bicol Region)
060000000REGION VI (Western Visayas)
070000000REGION VII (Central Visayas)
080000000REGION VIII (Eastern Visayas)
090000000REGION IX (Zamboanga Peninsula)
100000000REGION X (Northern Mindanao)
110000000REGION XI (Davao Region)
120000000REGION XII (SOCCSKSARGEN)
130000000NCR (National Capital Region)
140000000CAR (Cordillera Administrative Region)
150000000BARMM (Bangsamoro Autonomous Region of Muslim Mindanao)
160000000REGION XIII (Caraga)
170000000REGION 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.