Philippine Budget Data API
A free, public, read-only API over Philippine national budget data — the enacted General Appropriations Act (FY2020–2026), the FY2027 National Expenditure Program, budget-cycle execution data, the House budget hearings (what was actually said, topic by topic, with timestamps), and the FY2027 House bill set against the NEP project by project. Also available as an MCP server for AI agents.
https://budget.bettergov.ph/api/v1
No auth required
CORS: open (*)
All amounts in exact ₱ pesos
curl https://budget.bettergov.ph/api/v1/gaa/departments
curl "https://budget.bettergov.ph/api/v1/gaa/search?q=school%20building"
curl https://budget.bettergov.ph/api/v1/nep/2027
The API is free for public use under fair-use conditions. Responses are cached at the edge
(Cache-Control: public, max-age=300, s-maxage=3600); data updates at most a few times a year,
so aggressive client-side caching is encouraged. Please identify heavy automated use with a
descriptive User-Agent.
Datasets & units
| Dataset | Coverage | What it is |
|---|---|---|
gaa | FY2020–2026, 38 departments | The enacted General Appropriations Act, down to UACS object-level line items (~2M rows). Hierarchy: department → agency → program (P/A/P) → operating unit → fund → expense class → object. |
nep/2027 | FY2027, 39 departments | The Executive's proposed ₱7.20 T National Expenditure Program. Every figure carries
amount (FY2027 proposal), base_amount (FY2026 GAA baseline), delta, and pct. |
budget-cycle | FY2018–2026, selected departments | How appropriations moved through the cycle: NEP → GAA → authorized/adjusted appropriation → adjusted allotment → obligations → disbursements, per program × year × stage × expense class. |
hearings | FY2027 season, House Committee on Appropriations | The budget deliberations: for each hearing (2–9 hours of video), a per-topic record of what transpired — the question at issue, who said what and when, the agency's answer, figures as spoken, commitments, and where it landed — plus a section-by-section timeline and the transcript. Every item is timestamped and deep-linked to the video. |
hgab/2027 | FY2027, four programs, plus DPWH by district; the whole bill as files | The House of Representatives' version of the FY2027 budget (House Bill 10858) set against the NEP, line by line, for the four programs where the bill lists projects: DPWH infrastructure, farm-to-market roads, health facilities and irrigation. Also DPWH money by district engineering office, with the congressional districts each office serves. The rest of the House bill section (every line of the bill, DPWH contractors, seats by party, multi-purpose buildings) is published as data files, not endpoints. |
Units. Every amount anywhere in this API is an exact Philippine peso figure.
Each response's meta restates this ("currency": "PHP", "scale": "pesos"). The upstream
source publishes GAA figures in thousands; this API rescales them so you never have to.
Department ids. GAA ids are two digits (07 = Department of Education,
18 = Public Works). The NEP FY2027 dataset uses the same two-digit ids plus two
synthetic departments carved out for correctness: SPF (special purpose funds) and
AUTO (automatic appropriations).
AUTO is a synthetic NEP department — it is not GAA department 04.
(2) Budget-cycle figures cover Current New Appropriations only, a narrower scope than the
main GAA series — never compare the two 1:1.
(3) GAA and NEP are different stages of the budget process: NEP is the proposal, GAA is the law.
(4) In NEP rollups, __unassigned__ buckets rows the source didn't tag with that dimension,
and __other__ is an explicit remainder row on capped lists — both exist so lists always
sum to the true total.Conventions
Every endpoint is GET and returns JSON in a common envelope:
{
"meta": { "dataset": "gaa", "currency": "PHP", "scale": "pesos", ... },
"data": [ ... ] | { ... },
"next_cursor": "..." | null // paginated lists only
}
GAA rows carry per-year figures as a nested map — every year key is always present (zeroed if the source has no row for that year):
"years": { "2020": { "count": 12, "amount": 4491000 }, ..., "2026": { "count": 15, "amount": 5120000 } }
Filtered list endpoints also report whole-result-set totals in meta.matched /
meta.matched_amount, so a single request answers "how many and how much in total?"
without fetching every page.
Pagination
Large lists use opaque keyset cursors. Take next_cursor from a response and pass it back
as cursor; when it is null, the list is exhausted. Cursors are tied to the exact filter
combination that produced them — changing any filter invalidates the cursor (you'll get
400 bad_cursor or wrong pages). The GAA and NEP lists have no page-number or offset
pagination; cursor performance does not degrade with depth.
The hearings and House bill lists are smaller and use limit / offset
instead. House bill lists also return total (rows matched) and next_offset
(null on the last page).
Errors
Errors are JSON with a machine-readable slug and a human-readable message:
{ "error": "not_found", "message": "No GAA department 99" }
| Status | Slug | Meaning |
|---|---|---|
| 400 | bad_request | Invalid parameter (year out of range, malformed id, …) |
| 400 | bad_cursor | The cursor was not issued by this API (or filters changed) |
| 404 | not_found | Unknown department / endpoint |
| 405 | method_not_allowed | The API is read-only — use GET |
| 503 | not_loaded | The dataset is not loaded on this deployment |
| 500 | query_failed | Unexpected database error |
GAA — General Appropriations Act, FY2020–2026
/api/v1/gaaNational totals per fiscal year, summed across all departments.
curl https://budget.bettergov.ph/api/v1/gaa
{
"meta": { "dataset": "gaa", "years": [2020, ..., 2026], "currency": "PHP", "scale": "pesos", "departments": 38 },
"data": [
{ "year": 2020, "line_items": 725178, "amount": 4100000000000 },
...
{ "year": 2026, "line_items": 810081, "amount": 6326000000000 }
]
}
/api/v1/gaa/departmentsAll 38 departments with per-year appropriations and line-item counts, largest FY2026 budget
first. This is where you discover valid {id} values.
curl https://budget.bettergov.ph/api/v1/gaa/departments
/api/v1/gaa/departments/{id}One department in full: yearly totals, its agencies/bureaus (whose ids work as
agency_id filters elsewhere), and the expense-class breakdown.
curl https://budget.bettergov.ph/api/v1/gaa/departments/07
/api/v1/gaa/departments/{id}/expense-classesPersonnel Services / MOOE / Financial Expenses / Capital Outlays totals per year.
| Code | Class |
|---|---|
1 | Personnel Services (PS) |
2 | Maintenance and Other Operating Expenses (MOOE) |
3 | Financial Expenses (FinEx) |
6 | Capital Outlays (CO) |
/api/v1/gaa/departments/{id}/programsProgram/activity/project (P/A/P) families — raw P/A/P rows deduplicated by normalized name within an agency — ranked by appropriation in the chosen year. Paginated.
| Param | Type | Description |
|---|---|---|
year | 2020–2026 | Ranking year (default 2026) |
q | string | Substring filter on program name |
agency_id | string | Scope to one agency/bureau |
limit | 1–500 | Page size (default 100) |
cursor | string | From a previous next_cursor |
curl "https://budget.bettergov.ph/api/v1/gaa/departments/07/programs?year=2026&q=computerization&limit=5"
/api/v1/gaa/departments/{id}/objectsUACS object-level line items — the finest granularity in the GAA (DepEd alone has about a
million rows). Filter tightly and paginate. Rows with a zero amount in the chosen year are
hidden unless include_zero=1.
| Param | Type | Description |
|---|---|---|
year | 2020–2026 | Filter/ranking year (default 2026) |
q | string | Substring filter on description or UACS code |
agency_id | string | Scope to one agency/bureau |
expense_class | 1, 2, 3, 6 | 1=PS, 2=MOOE, 3=FinEx, 6=CO |
sort | amount | description | code | total | total ranks by the 7-year sum (implies include_zero) |
dir | asc | desc | Defaults: desc for amounts, asc otherwise |
limit, cursor | Page size 1–500 (default 100); keyset cursor |
curl "https://budget.bettergov.ph/api/v1/gaa/departments/07/objects?year=2026&q=textbooks&limit=10"
Note that free-text search here matches the object-level description (the UACS
expense object, e.g. "Textbooks and Instructional Materials"), not program names — search
programs with /gaa/search instead.
/api/v1/gaa/searchSearch program names across all departments at once — the quickest route from a topic ("school building", "flood control", "irrigation") to who funds it and with how much.
| Param | Type | Description |
|---|---|---|
q | string, required | Search text (min 2 chars) |
department_id | string | Optional two-digit scope |
year | 2020–2026 | Ranking year (default 2026) |
limit | 1–100 | Max results (default 25) |
curl "https://budget.bettergov.ph/api/v1/gaa/search?q=flood%20control&year=2026&limit=10"
/api/v1/gaa/years/{year}One fiscal year in isolation: the national total plus every department's appropriation,
line-item count, and share of that year's budget, largest first. The per-year counterpart of
/gaa/departments, which returns all seven years per row.
This is the API face of the per-year budget
browser.
curl https://budget.bettergov.ph/api/v1/gaa/years/2022
{
"meta": { "dataset": "gaa", "year": 2022, "departments": 37, ... },
"data": {
"total": { "year": 2022, "line_items": 628666, "amount": 5023600000000 },
"departments": [
{ "id": "07", "slug": "department-of-education-deped", "description": "Department of Education (DepEd)",
"year": 2022, "line_items": 308586, "amount": 633323678000, "share": 0.12607 },
...
]
}
}
/api/v1/gaa/years/{year}/departments/{id}/childrenWalk one department's hierarchy a level at a time, scoped to a single fiscal year — the same
drill the per-year browser does: department → agency (bureau) → program (FPAP) → operating unit
→ fund → expense class. Rows carry that year's figures only, ranked largest first, and keep
their parent-id columns so each row's id feeds the next level's parent.
Rows with a zero amount in that year are hidden unless include_zero=1.
| Param | Type | Description |
|---|---|---|
level | agencies | fpaps | operating_units | fund_subcategories | expenses | Level to list (default agencies) |
parent | string | Parent entity id — required below agencies |
include_zero | 1 | Keep rows the year doesn't fund |
limit, cursor | Page size 1–500 (default 100); keyset cursor |
# DepEd's bureaus in FY2022
curl "https://budget.bettergov.ph/api/v1/gaa/years/2022/departments/07/children"
# then programs of one bureau...
curl "https://budget.bettergov.ph/api/v1/gaa/years/2022/departments/07/children?level=fpaps&parent=07-001"
# ...down to the expense classes of one fund
curl "https://budget.bettergov.ph/api/v1/gaa/years/2022/departments/07/children?level=expenses&parent=07-001-310400100002000-0807002-01101101"
NEP FY2027 — National Expenditure Program
The Executive's ₱7.20 T proposal for FY2027, measured line by line against the FY2026 GAA.
Every row carries amount, base_amount, delta, and pct (null when the FY2026
baseline is zero, i.e. a new item).
/api/v1/nep/2027National overview: every department with its delta, expense classes, regions, top funds and programs, and the biggest movers up/down.
curl https://budget.bettergov.ph/api/v1/nep/2027
/api/v1/nep/2027/departmentsAll 39 departments (including synthetic SPF and AUTO) with amounts, baselines, and
per-dimension counts.
/api/v1/nep/2027/departments/{id}Full department view: agencies, programs, expense classes, funds, and regions in full;
objects, operating units, and divisions capped at the top 50 with an explicit
__other__ remainder row so lists still sum to the department total.
curl https://budget.bettergov.ph/api/v1/nep/2027/departments/07
curl https://budget.bettergov.ph/api/v1/nep/2027/departments/SPF
/api/v1/nep/2027/departments/{id}/rollups/{dimension}The complete, untruncated list for one dimension within one department, paginated.
Dimensions: agency, program, expense_class, fund, region, object,
operating_unit, division.
curl "https://budget.bettergov.ph/api/v1/nep/2027/departments/07/rollups/operating_unit?limit=500"
/api/v1/nep/2027/rollups/{dimension}National rollups. Two modes:
- Default — national totals per code in the dimension, summed across all departments. Every dimension is complete, so these sums are exact.
?code=X&by=department— one code broken down across departments (e.g. which departments spend in region13, or on object5020399000).
curl https://budget.bettergov.ph/api/v1/nep/2027/rollups/expense_class
curl "https://budget.bettergov.ph/api/v1/nep/2027/rollups/region?code=13&by=department"
Budget cycle — NEP → GAA → execution
/api/v1/budget-cycleDataset manifest and coverage: which departments are included, fiscal years (2018–2026), stages, and expense classes. Scope is Current New Appropriations only — narrower than the main GAA series; do not compare the two directly.
curl https://budget.bettergov.ph/api/v1/budget-cycle
/api/v1/budget-cycle/departments/{id}For one covered department: its programs (with the source→portal crosswalk and match confidence) and facts — one row per program × fiscal year × stage × expense class.
| Field | Values |
|---|---|
stage | nep, gaa, authorized_appropriation, adjusted_appropriation, adjusted_allotment, obligations, disbursements |
expense_class | ps, mooe, finex, co, total |
curl https://budget.bettergov.ph/api/v1/budget-cycle/departments/14
Budget hearings — what was said, topic by topic
The House Committee on Appropriations deliberates each agency's proposed budget in hearings that
run 2–9 hours. We transcribe the streams (speaker-labelled) and build a deliberation record:
not a summary of the hearing, but an account of what transpired on each topic. Machine
transcripts are imperfect — names and figures are as heard — so every item carries a timestamp and a
url that opens the hearing page with the video at that moment. Treat the records as an
index into the video, and verify before you quote.
/api/v1/hearingsAll hearings, newest first. Filters: fiscal_year, agency (acronym as in the title,
e.g. DOH), q (title keyword), limit, offset. has_record
says whether the topic record exists; transcript_source says how the transcript was made.
curl "https://budget.bettergov.ph/api/v1/hearings?agency=DOH"
/api/v1/hearings/search?q=…Keyword search over every topic record across all hearings — the topic, its summary, question, outcome,
and every spoken moment. All terms must match. Each hit returns the topic and the specific
matching_moments (timestamp, speaker, what was said, url). Optional fiscal_year,
agency, status (resolved | committed | parked | unresolved | informational).
curl "https://budget.bettergov.ph/api/v1/hearings/search?q=philhealth%20subsidy"
curl "https://budget.bettergov.ph/api/v1/hearings/search?q=flood%20control&status=committed"
/api/v1/hearings/{video_id}One hearing's metadata and its topic index (topic, status, first timestamp, summary, outcome).
/api/v1/hearings/{video_id}/topics
· /topics/{index}The full deliberation record. For each topic: question (what the committee was trying to
establish), thread (chronological moments: timestamp, speaker, side,
kind, said, url), agency_position, positions,
figures (as spoken; amount is a best-effort peso parse), actions (document
requests, commitments, motions, rulings), outcome and status. ?thread=0 omits the
moment-by-moment thread.
curl https://budget.bettergov.ph/api/v1/hearings/7U4YvhlnbZY/topics
curl "https://budget.bettergov.ph/api/v1/hearings/7U4YvhlnbZY/topics?thread=0"
/api/v1/hearings/{video_id}/timelineThe proceedings in order — roll call, presentation, each interpellation, motions, suspensions — with per-section summaries, exchanges, figures and actions.
/api/v1/hearings/{video_id}/transcript?from=&to=Raw transcript segments for a time window (seconds; default 20 minutes from from, at most
1000 segments), with the inferred speaker name when known.
curl "https://budget.bettergov.ph/api/v1/hearings/7U4YvhlnbZY/transcript?from=3600&to=3900"
House bill FY2027 — the House's version against the NEP
For the four programs where House Bill 10858 lists projects one by one, every project line in the House
bill is set against the NEP (the budget the President submits to Congress each August): what was added,
dropped, raised, reduced or left unchanged. The programs (the {key} in every path):
| Key | Program | Each row | House version compared |
|---|---|---|---|
dpwh | DPWH infrastructure (roads, bridges, flood control, buildings) | One named project | Third reading |
fmr | DA farm-to-market roads | One road | Second reading (the list is the same at third) |
hfep | DOH Health Facilities Enhancement Program | One facility and funding column | Second reading (the same at third) |
nia | NIA irrigation | One irrigation project | Second reading (the same at third) |
null means "this version has no such line", never zero.
(2) The NEP and the House bill are two versions of one budget: compare them,
never add them. Sums over a filtered set come per version, marked not_additive_across_versions: true.
(3) Pairings are candidates: matches and gaps found by comparing names, places and amounts. They
are leads for checking, not confirmed changes. A line found in one version only is an insertion
candidate or a deletion candidate, never a confirmed insertion or deletion. Each row has a plain
status_label next to its raw trace code.
(4) held: true marks an unconfirmed match (a fuzzy or ambiguous pairing). Bridge figures
include unconfirmed matches (so the six groups add up to net_php); each group's
unconfirmed_rows / unconfirmed_php says how much of it is unconfirmed. The 10
largest per group leave unconfirmed matches out.
(5) District figures carry their tier. A shared (tier B) office's money is never split between the
districts it serves, and the money no district card shows (the residual) comes with every district list.
(6) Every response's meta carries the disclaimer notice, and every response
carries disclaimers (below). Rows with a page on the
site carry url; document page references carry pdf_url, which opens the source PDF
at that page (#page=N).Disclaimers
Every House bill response carries disclaimers, an array of
{ "id", "title", "body", "url" } beside meta and data: the House bill
section's own paragraphs, word for word as the pages print them. Every route carries
disclaimer-no-allegations. Office-based views (/districts,
/districts/{id}, and DPWH project lists filtered with office) carry
disclaimer-offices as well, with restrictions_url and
upstream_restrictions_url. Keep them with any figure you republish. The MCP tools return the same field.
Office and legislative-district associations. The DEO mapping associates offices with legislative districts; it does not establish that a representative requested, sponsored, or controlled a project, or that each project lies in every district associated with its office. Shared-office totals remain undivided and must not be split among the districts served. Office-based views must retain attribution tiers, co-served districts, unattributable residuals, and upstream uncertainty annotations. Historical or undated amounts retained as mapping evidence are separate from the FY2027 project ledger and must not be quoted as FY2027 allocations. See the DEO mapping restrictions.
No allegations. An insertion, deletion, or amount-change candidate describes a provisional comparison between identified sources. That classification alone does not establish irregularity or wrongdoing by any office or official and should not be represented as such. Absence from an API snapshot likewise does not establish absence from the published NEP or concealment.
DEO mapping restrictions: our summary · upstream (DEO2LEG/README.md).
The six groups (the bridge). Every row falls in exactly one:
house_only (in the House bill only: insertion candidates),
nep_only (in the NEP only: deletion candidates),
unchanged (same amount in both), increased (higher in the House bill),
decreased (lower in the House bill), and scope_review (a different stretch of the
same road, not counted as a change). The identity
house_only − nep_only + increased − decreased + scope_review = net_php holds to the peso.
Versions on a row. nep_php (the NEP), hgab2_php /
hgab3_php (House bill at second / third reading), house_php (the latest House
reading), api_php (the DPWH transparency website's list, DPWH only), delta_php
(House minus the NEP, when both exist).
/api/v1/hgab/2027Start here. The four programs (plain summary, caveats, totals per version, record counts, the bridge with plain labels, links), the source documents, reconciliation status counts, the plain meaning of every term, the rules, and the stage order NEP → House → Senate → GAA.
curl https://budget.bettergov.ph/api/v1/hgab/2027
{
"meta": { "dataset": "hgab", "fiscal_year": 2027, "currency": "PHP", "scale": "pesos",
"source_commit": "a0caa77…", "built_at": "2026-10-25T08:01:58.449Z",
"notice": "Independent and unofficial. …" },
"disclaimers": [
{ "id": "disclaimer-no-allegations", "title": "No allegations.",
"body": "An insertion, deletion, or amount-change candidate describes a provisional comparison …",
"url": "https://budget.bettergov.ph/hgab/2027/methodology#disclaimer-no-allegations" }
],
"data": {
"datasets": [
{ "key": "dpwh", "label": "DPWH national infrastructure", "house_stage": "hgab3",
"totals": { "nep_php": 572924074000, "hgab2_php": 586941661000, "hgab3_php": 587075661000,
"api_php": 445378063000, "not_additive_across_versions": true },
"bridge": { "net_php": 14151587000, "groups": {
"house_only": { "label": "In the House bill only", "sub": "insertion candidates",
"rows": 6193, "php": 172149788000,
"unconfirmed_rows": 389, "unconfirmed_php": 10517119000 }, … } },
"url": "https://budget.bettergov.ph/hgab/2027/dpwh" }, …
], …
}
}
/api/v1/hgab/2027/datasets
· /datasets/{key}/datasets lists the four programs, compact. /datasets/{key} returns one program in
full: everything in its overview entry plus controls (the totals published in each document, with
nep_pdf_url / house_pdf_urls; house_doc names the volume they are published
in, Volume I-C for DPWH and Volume I-B for the other three), dims (House against the NEP by region,
office kind, program and program line, as each program records them), regions,
readings (DPWH only: second against third reading), and top: the 10 largest rows
in each group by that group's amount, unconfirmed matches left out. Unknown keys return 404.
curl https://budget.bettergov.ph/api/v1/hgab/2027/datasets
curl https://budget.bettergov.ph/api/v1/hgab/2027/datasets/hfep
/api/v1/hgab/2027/datasets/{key}/projectsFilter, sort and page one program's rows. Filters combine with AND. total counts every matched
row and sums adds each version over every matched row, not just the page; never add the sums
across versions. Rows with no amount in the sorted column always sort last. Filtered with office
(DPWH), the list is one office's ledger, so it also returns office_lens (the office's tier and
every district it is associated with; no row is assigned to any one of them) and both disclaimers.
| Param | Values | Description |
|---|---|---|
q | words | Every word must appear in the title, program, program line, region or office |
group | comma list | house_only, nep_only, unchanged, increased, decreased, scope_review |
held | all | hide | only | Unconfirmed matches: keep (default), hide, or only them |
region | key or label | A region key (NCR, CAR, I … IV-A, MIMAROPA … XIII, BARMM, NIR) or a region label exactly as published |
program, pap, office, office_kind | exact text | As published (office is the DPWH implementing office) |
zone | local | fap | Locally funded or foreign-assisted (DPWH) |
trace, reading_status | code | Exact raw status, or DPWH second/third reading status (e.g. third_only) |
flag | code | One review flag that must be present, e.g. office_difference |
has_coordinates | 1 | 0 | Rows whose documents publish map coordinates (all farm-to-market roads, some DPWH) |
sort | house | nep | delta | abs_delta | title | Default house (latest House amount); abs_delta = size of the change |
order | desc | asc | Default desc for amounts, asc for title |
limit, offset | 1–200, ≥ 0 | Page size (default 50) and rows to skip |
# Insertion candidates in DPWH, largest first, unconfirmed matches hidden
curl "https://budget.bettergov.ph/api/v1/hgab/2027/datasets/dpwh/projects?group=house_only&held=hide&limit=10"
# Calabarzon flood-control lines, biggest change first
curl "https://budget.bettergov.ph/api/v1/hgab/2027/datasets/dpwh/projects?region=IV-A&q=flood&sort=abs_delta"
# Farm-to-market roads with published coordinates
curl "https://budget.bettergov.ph/api/v1/hgab/2027/datasets/fmr/projects?has_coordinates=1"
{
"meta": { "dataset": "hgab", "dataset_key": "dpwh", "filters": { "group": ["house_only"], "held": "hide" },
"sort": "house", "order": "desc", "limit": 10, "offset": 0, "returned": 10, "total": 5804, … },
"data": {
"total": 5804,
"sums": { "nep_php": null, "hgab2_php": …, "hgab3_php": 161632669000, "api_php": null,
"not_additive_across_versions": true, … },
"rows": [
{ "id": "house-reading:848", "title": "Daang Maharlika Road Development Project - Package B3-A, …",
"trace": "house_only_candidate", "status_label": "House bill only", "held": false,
"nep_php": null, "hgab3_php": 1845741000, "house_php": 1845741000, "delta_php": null,
"pdf_url": { "nep": null, "hgab3": "https://budget-assets.bettergov.ph/hgab/2027/pdf/hb10858-3r-vol-ic.pdf#page=150", … },
"url": "https://budget.bettergov.ph/hgab/2027/dpwh/p/house-reading%3A848" }, …
],
"next_offset": 10
}
}
/api/v1/hgab/2027/datasets/{key}/projects/{id}One row in full: its amounts, plain labels for its status (with what it means), how the pairing was made,
second against third reading, the DPWH website listing, zone and every review flag; a pdf_url
per version (for farm-to-market roads, health facilities and irrigation, whose House list is identical at both
readings, hgab3 opens the third-reading copy at the page the line was read from); the row's page
url; and record, the source workbench's full record as
the workbench writes it. Percent-encode the id (ids can contain : and |).
curl https://budget.bettergov.ph/api/v1/hgab/2027/datasets/dpwh/projects/house-reading%3A0
curl https://budget.bettergov.ph/api/v1/hgab/2027/datasets/hfep/projects/ib%3Ap877%3Ar12%7Cinfrastructure
/api/v1/hgab/2027/datasets/{key}/regionsAll 18 regions, north to south, under the region each document lists (null where a document
lists nothing there), plus not_on_map: amounts listed as nationwide or with no region. Nothing
is placed from place names. The irrigation lists give no region, so all of NIA is in
not_on_map.
curl https://budget.bettergov.ph/api/v1/hgab/2027/datasets/dpwh/regions
/api/v1/hgab/2027/documents
· /reconciliation/documents: the eight source PDFs (NEP and House bill volumes) with pdf_url,
the page range used, sha256, size, and which programs cite each. The third-reading volumes are the copies
published on the Senate Budget Transparency Portal (same sha256). Page numbers everywhere are positions in
the file, not the page numbers shown on the pages. /reconciliation: the 69 checks of the source's
figures against this portal's own FY2027 NEP data (ours_php, from the DBM CSV) and the
source's extraction from the PDFs (theirs_php); filter with dataset and
status (exact, explained, mismatch, info).
curl https://budget.bettergov.ph/api/v1/hgab/2027/documents
curl "https://budget.bettergov.ph/api/v1/hgab/2027/reconciliation?dataset=dpwh&status=explained"
/api/v1/hgab/2027/districts
· /districts/{id}DPWH money by the district engineering office the documents list, with the congressional districts each
office serves. No project is assigned to a district. A lone office (tier A) serves one district, so its figure
can be read as that district's. A shared office (tier B) serves several, so its figure is shared and is
not split: when a card's attribution is B or mixed, its headline
carries shared_office_total: true and the co-served district ids, and should be read as a
range. Headline amounts are the 2026 enacted budget and the 2027 NEP (whole office) and the 2027 House
bill (named projects only); fy2027_vs_proposal is the like-for-like 2027 change on the same
project rows. Every list also returns residual: for all nine year slots, the DPWH money under
the Central Office, regional offices and unplaced office names, which no district card shows.
Representatives are listed so a reader can find their district; nothing here says a representative
requested or controlled any amount. These are office associations: keep each figure's tier, never split
a shared total, and report the residual beside district figures. Both routes carry both
disclaimers.
| Param | Values | Description |
|---|---|---|
region | key or label | Region key (e.g. III) or a region label as published |
q | words | Every word must appear in the district, representative or office name |
attribution | A | B | mixed | none | Whose budget the figure is (none = no office found) |
sort | hgab3 | gaa2026 | change | name | Default hgab3 (largest House bill amount) |
limit, offset | 1–254, ≥ 0 | Page size (default 50) and rows to skip |
/districts/{id} returns one card, its representative, and every serving office's full
history: FY2020–2026 enacted, the FY2027 NEP and House bill, totals per Congress, the 2027 six-group
comparison, notes, and links to the office's DPWH project rows. Each office's fy2027.annotations
keeps the source's uncertainty markers apart: unconfirmed matches (unconfirmed_rows /
unconfirmed_php, also on each bridge group and on the card's fy2027_vs_proposal),
different-stretch rows and second-to-third-reading markers; fy2027.office_change lists the office's
paired lines whose other side names a different office group, which are in no figure on the card. The page also
returns the residual, whose FY2027 House bill slot carries those lines as
office_change_php / office_change_rows, and lines whose grouped records name no office as
no_office_php / no_office_rows (an office's own such lines are its fy2027.no_office).
Both are counted in not_on_any_district_php: deo + central office + regional offices + unmatched +
no_office + office_change = total.
curl "https://budget.bettergov.ph/api/v1/hgab/2027/districts?region=III&sort=change&limit=5"
curl "https://budget.bettergov.ph/api/v1/hgab/2027/districts?q=bulacan"
curl https://budget.bettergov.ph/api/v1/hgab/2027/districts/leg%3Aabra%3Alone
{
"data": {
"total": 24,
"districts": [
{ "id": "leg:nueva-ecija:1st", "label": "Nueva Ecija, 1st District", "region_key": "III",
"attribution": { "code": "B", "label": "Shared · the office total, not split", "meaning": "…" },
"headline": { "fy2026_gaa_php": …, "fy2027_hgab3_php": 3856983000,
"shared_office_total": true, "co_served_district_ids": ["leg:nueva-ecija:2nd"] },
"fy2027_vs_proposal": { "nep_php": …, "hgab3_php": …, "delta_php": 1146570000 },
"url": "https://budget.bettergov.ph/hgab/2027/districts/leg%3Anueva-ecija%3A1st" }, …
],
"residual": [ { "fy": 2027, "stage": "hgab3", "total_php": 587075661000, "deo_php": 176097432000,
"central_office_php": 410825229000, "not_on_any_district_php": 410978229000, … }, … ]
}
}
Data files (not endpoints)
The endpoints above cover the four programs and the districts. The rest of the House bill section on
the site is published as plain files on the data host, https://budget-assets.bettergov.ph, with no API in front of them:
JSON summaries, CSV and Parquet tables, each set listed in a manifest.json that gives every
file's rows, size, SHA-256 and columns, plus a notice to keep with anything you republish.
The rules and disclaimers above apply to these
files as they do to the endpoints. Parquet files can be queried in place: DuckDB reads them over HTTP
with range requests.
| What | Start here | Page |
|---|---|---|
| The whole House bill, line by line, against the NEP: every department, every appropriation line (third reading) | hgab/2027/explorer/downloads/manifest.json — a zip of every CSV, two Parquet tables
(the lines; the lines against the NEP) and a README of the columns |
/hgab/2027/explorer |
| DPWH contractors, 2016–2026: DPWH's contract list, and the GAA lines (FY2020–2026) its contracts carry | hgab/2027/contractors/downloads/manifest.json — contracts, contractors, GAA lines and
line-to-contract links, each as CSV and Parquet, plus a README |
/hgab/2027/contractors |
| Seats by party: each district's representative and May 2025 party, and the DPWH budget by party | hgab/2027/parties/parties.json |
/hgab/2027/parties |
| Multi-purpose buildings, FY2015 GAA to the FY2027 House bill, with coordinates | hgab/2027/mpb-years/lines.csv, hgab/2027/mpb-years/summary.json |
/hgab/2027/multi-purpose/map |
| The four programs' own tables (what the endpoints above read) | hgab/2027/overview.json, hgab/2027/{key}/summary.json,
hgab/2027/{key}/projects.parquet |
/hgab/2027/sources |
# every file in the line-by-line set, with its size
curl -s https://budget-assets.bettergov.ph/hgab/2027/explorer/downloads/manifest.json | jq '.files[] | [.csv.file, .csv.bytes]'
# query a program's project table in place (DuckDB)
SELECT title, region, trace, nep_php, hgab3_php, delta_php
FROM read_parquet('https://budget-assets.bettergov.ph/hgab/2027/dpwh/projects.parquet')
WHERE trace = 'candidate_increase' ORDER BY delta_php DESC LIMIT 25;
OpenAPI specification
A machine-readable OpenAPI 3.1 description of every endpoint, parameter, and schema:
https://budget.bettergov.ph/api/v1/openapi.json
Import it into Postman, Insomnia, or any OpenAPI-aware code generator.
MCP server
The same data is exposed as an MCP server for AI agents — Claude, Cursor, and any other MCP-capable client. The transport is stateless Streamable HTTP: no auth, no sessions, JSON-RPC over POST.
https://budget.bettergov.ph/mcpTransport: Streamable HTTPRead-only toolsInstall in your AI client
Claude Code (CLI)
claude mcp add --transport http ph-budget https://budget.bettergov.ph/mcp
Then just ask: "Using ph-budget, which departments gain the most in the FY2027 proposal?"
Claude Desktop & claude.ai
Settings → Connectors → Add custom connector → paste
https://budget.bettergov.ph/mcp. No authentication is needed; the server is read-only.
Cursor
Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json in a project:
{
"mcpServers": {
"ph-budget": { "url": "https://budget.bettergov.ph/mcp" }
}
}
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"ph-budget": { "serverUrl": "https://budget.bettergov.ph/mcp" }
}
}
VS Code (Copilot Chat)
Run MCP: Add Server… from the command palette (choose HTTP), or add to
.vscode/mcp.json:
{
"servers": {
"ph-budget": { "type": "http", "url": "https://budget.bettergov.ph/mcp" }
}
}
Gemini CLI
Add to ~/.gemini/settings.json:
{
"mcpServers": {
"ph-budget": { "httpUrl": "https://budget.bettergov.ph/mcp" }
}
}
Anything else
Any client that speaks MCP over Streamable HTTP works: point it at
https://budget.bettergov.ph/mcp, no auth, no session setup. Most clients accept the generic
{"mcpServers": {"ph-budget": {"url": "https://budget.bettergov.ph/mcp"}}} shape.
Tools
| Tool | What it answers |
|---|---|
list_gaa_departments | Which departments exist, with per-year budgets (start here) |
get_gaa_national_trends | National GAA totals per year, 2020–2026 |
get_gaa_department | One department: yearly totals, agencies, expense classes |
search_gaa_programs | Find programs by name across all departments |
get_gaa_department_programs | All programs of one department, paginated |
search_gaa_line_items | Object-level line items with text/agency/expense-class filters |
get_gaa_year_snapshot | One fiscal year in isolation: national total and every department's share, largest first |
browse_gaa_hierarchy | Drill one department's hierarchy for a single year: agencies → programs → operating units → funds → expenses |
get_nep_2027_overview | The FY2027 proposal at national level, vs FY2026 |
list_nep_2027_departments | All 39 NEP departments with deltas |
get_nep_2027_department | One department's FY2027 proposal in full |
get_nep_2027_rollup | Slice FY2027 by agency/program/region/object/… nationally, per department, or cross-department |
get_budget_cycle | NEP→GAA→execution stages for covered departments |
list_hearings | House appropriations hearings, newest first, filterable by fiscal year, agency, or title keyword |
search_hearings | What was said on a subject across all hearings: matching topics plus timestamped moments (start here for hearings) |
get_hearing | One hearing's metadata and topic index, with each topic's status, summary, and outcome |
get_hearing_topics | Full deliberation record per topic: who said what, positions, figures as spoken, commitments |
get_hearing_timeline | The proceedings in order, section by section |
get_hearing_transcript | Raw machine transcript for a time window, to check exact wording |
get_hgab_2027_overview | The FY2027 House bill against the NEP for the four programs: totals per version, the six groups, documents, rules (start here for the House bill) |
get_hgab_2027_dataset | One program in full: the totals published in each document, House against the NEP by region and program, the 10 largest rows per group |
search_hgab_2027_projects | Filter, sort and page one program's project rows (at most 50 per call; total says when to page) |
get_hgab_2027_project | One project row with plain labels, PDF page links and the source record |
list_hgab_2027_districts | DPWH money by congressional district, with office tiers, representatives and the money on no district card |
get_hgab_2027_district | One district and the full history of every office that serves it |
Hearing records are built from machine transcripts: speaker names are inferred and figures are
recorded as spoken. Each moment carries a url that opens the video at that second —
cite it when quoting, and verify figures against the video or official documents.
House bill rows are candidates, not findings: a line found in one version only is an insertion or
deletion candidate. The NEP and the House bill are compared, never added. Bridge figures
include unconfirmed matches (so the six groups add up to net_php); each group's
unconfirmed_rows / unconfirmed_php says how much of it is unconfirmed. The 10
largest per group leave unconfirmed matches out. Cite each row's url and pdf_url.
District results are office associations: keep each figure's tier, never split a shared total, report the
residual, and attribute nothing to a representative. Every House bill tool result carries the same
disclaimers as the REST response, and the server instructions
quote both paragraphs.
Example prompts
Once connected, ask your assistant things like:
- "Which departments get the biggest increases in the FY2027 budget proposal, in pesos and in percent?"
- "How much has the government appropriated for flood control programs each year since 2020, and under which departments?"
- "Break down DepEd's FY2026 budget by expense class, then show its largest line items for capital outlays."
- "Which regions gain and which lose in the FY2027 NEP compared to the FY2026 GAA?"
- "For the Department of Health, compare what was proposed (NEP), enacted (GAA), obligated, and disbursed across recent years."
- "What are the special purpose funds in the FY2027 proposal and how much is each?"
- "What did the DOH say in its budget hearing about the PhilHealth subsidy, and what did members demand? Link me to the moments."
- "Across all FY2027 hearings, which topics ended with the agency committing to submit documents?"
- "Which DPWH projects in the FY2027 House bill are not in the NEP, largest first? Link the PDF pages."
- "How did the House bill change health facilities funding compared with the NEP?"
- "Which DPWH offices serve Bulacan's districts, and how did their budgets change from 2020 to the 2027 House bill?"
How an agent typically chains the tools
A question like "how much of DepEd's 2026 budget is textbooks?" resolves in three calls:
list_gaa_departments→ find DepEd's id (07)get_gaa_department {"department_id": "07"}→ totals and agencies for contextsearch_gaa_line_items {"department_id": "07", "query": "textbooks", "year": 2026}→ the matched line items, plusmeta.matched_amountanswering the question in one number
National "who spends on X?" questions go straight to search_gaa_programs (GAA) or
get_nep_2027_rollup with by_department: true (FY2027 proposal).
Hearing questions like "what did DOH say about medical assistance (MAIFIP) in its FY2027 hearing?" chain the same way:
search_hearings {"query": "MAIFIP", "agency": "DOH", "fiscal_year": "2027"}→ matching topics with their status and outcome, plus the timestamped moments that mention the termget_hearing_topics {"video_id": "…", "topic_index": 2}→ that topic's full thread, positions, figures, and commitmentsget_hearing_transcript {"video_id": "…", "from_seconds": 3600, "to_seconds": 3900}→ the exact wording around a moment, when a quote or figure needs checking
Pair the result with get_nep_2027_department to set what was said against what was proposed.
House bill questions like "which flood-control projects did the House add in Calabarzon?":
get_hgab_2027_overview→ the four programs, their totals and the six groupssearch_hgab_2027_projects {"dataset": "dpwh", "query": "flood", "region": "IV-A", "group": ["house_only"], "held": "hide"}→ the matching rows,total, and the per-version sumsget_hgab_2027_project {"dataset": "dpwh", "id": "…"}→ one row's status explained, its source record, and the PDF pages to check
Raw protocol examples (curl)
The transport is stateless JSON-RPC over POST — you can drive it with curl. Handshake:
curl -X POST https://budget.bettergov.ph/mcp -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0", "id": 1, "method": "initialize",
"params": { "protocolVersion": "2025-06-18", "capabilities": {},
"clientInfo": { "name": "curl", "version": "1.0" } }
}'
curl -X POST https://budget.bettergov.ph/mcp -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
Search flood-control programs across all departments:
curl -X POST https://budget.bettergov.ph/mcp -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0", "id": 3, "method": "tools/call",
"params": { "name": "search_gaa_programs",
"arguments": { "query": "flood control", "limit": 3 } }
}'
Break FY2027 spending in NCR (region code 13) down by department:
curl -X POST https://budget.bettergov.ph/mcp -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0", "id": 4, "method": "tools/call",
"params": { "name": "get_nep_2027_rollup",
"arguments": { "dimension": "region", "code": "13", "by_department": true, "limit": 5 } }
}'
Tool results arrive as JSON text inside result.content[0].text, in the same envelopes
the REST API returns. Invalid inputs come back as a result with
isError: true and a message explaining what to fix.
What's new
Recent additions to the site, the API and the data, newest first. Endpoints and MCP tools are noted where a feature has them; the rest are pages and data files.
9 November 2026
- Where the 2027 budget is now. The NEP overview, where the site opens, now leads with the current stage: the House has approved its version, House Bill No. 10858, on third reading, and the Senate is next, with a link to the House bill. The API and the data files did not change.
8 November 2026
- Terms of Service and Disclaimer. /terms-of-service and /disclaimer. On their first visit, and again when the terms change, readers accept them before using the site. The terms are an agreement with the People's Budget Coalition and BetterGov.ph, and they cover the API and the MCP server too: keep the disclaimers each result carries, and credit People's Budget Coalition × BetterGov.PH. The API and the data files did not change.
7 November 2026
- Correction, Districts. On the Districts cards and region
table, the 2027 NEP figure now counts named projects only, like the House bill figure beside it; it had
shown the whole office's NEP listing. The change shown was always on the same projects and is unchanged,
as is the API (
headline.fy2027_nep_phpis still the whole office;fy2027_vs_proposalis the like-for-like pair). The page now shows an "As of" date and a list of changes.
4 November 2026
- API docs. The House bill data files that have no endpoint (the whole bill line by line, DPWH contractors, seats by party, multi-purpose buildings) are listed here with their manifests, and this changelog starts.
3 November 2026
- DPWH contractors. /hgab/2027/contractors: every
contractor's DPWH contracts from 2016 to 2026, and which FY2020–2026 GAA lines each contract carries.
A page per contractor, and the data as CSV and Parquet with a
manifest.json. - The House bill by party. /hgab/2027/parties: each district's representative and May 2025 party, the DPWH budget by party across three Congresses, a same-office comparison, and a page per party with every line.
- Multi-purpose buildings. Top contractors, DPWH contract links and four leaderboards on the multi-purpose buildings page; map marks never cover one another at any zoom.
- Citizen Reports. /citizen-reports: budget analyses published on other sites, in one place.
2 November 2026
- Multi-purpose buildings map. /hgab/2027/multi-purpose/map:
every multi-purpose building line from the FY2015 GAA to the FY2027 House bill, with repeats across
years, as files (
hgab/2027/mpb-years/). - GAA Explorer, 2000–2026. /gaa now reaches back to FY2000 with the same explorer, summary cards and source-record browser for every year.
- Whole bill on the overview. The House bill overview carries the whole bill against the NEP, not only the four programs; the House bill sub-navigation is reordered.
1 November 2026
- The whole House bill, line by line. /hgab/2027/explorer:
every appropriation line of House Bill 10858 (third reading) against the NEP, by department and
agency, with the NEP and House bill page on every row. Downloadable as a zip of CSVs and two Parquet
tables, listed in a
manifest.jsonwith links versioned by checksum. These pages carry an "Under citizen review" banner until the review is complete. - Leaderboards for the whole bill. Departments, agencies and budget lines, with increases and cuts as separate boards, on /hgab/2027/leaderboard.
- Letters. A letter to a representative can copy the Speaker, the Majority Leader and the Committee on Appropriations.
28–29 October 2026
- Multi-purpose buildings. /hgab/2027/multi-purpose: DPWH multi-purpose buildings from the FY2020 GAA to the FY2027 House bill, set beside flood control, DepEd school facilities and DOH health facilities, with a poster.
- Write to your representative. /hgab/2027/letter: a letter for every district, filled from the district's own figures.
- Fix: blank NEP department pages (for example
/2027/d/07).
26–27 October 2026
- We are not ignorant. /hgab/2027/we-are-not-ignorant: every inserted and adjusted DPWH project in one list, with a campaign poster and link preview.
- Districts by DPWH office. Browse districts by the district engineering office that serves them; district cards show the net change, a Shared label and the office tier.
- Download CSV on every program page; maps zoom and pan freely; a budget-process timeline on the House bill overview; share images carry an "As of" date.
- Disclaimers on every House bill page, in every API response and in the MCP server (above); DPWH program totals cite Volume I-C, and the Senate's copies are the documents' source.
25 October 2026
- House bill FY2027. /hgab/2027 launches: House Bill 10858 set against the NEP, project by project, for DPWH infrastructure, farm-to-market roads, health facilities and irrigation, with DPWH by congressional district, leaderboards with share images, maps and an intro deck.
- API and MCP. Ten House bill endpoints under
/api/v1/hgab/2027and six*_hgab_2027_*MCP tools, reading D1 tables built from the same files the pages read.
4–9 September 2026
- Budget hearings. /hearings: the House Committee on
Appropriations hearings with an interactive transcript and a per-topic deliberation record (who
said what, when, with a deep link to the video). In the API as seven
endpoints and in the MCP server as six
*hearing*tools.
24 August 2026
- Learn and the glossary. /learn explains the budget cycle with visual flows; /glossary is the full BESF glossary.
Data sources & attribution
Source data is derived from Department of Budget and Management publications, packaged as the BetterGov.PH GAA dataset. Figures are presented as published; always verify against official DBM documents before citing in formal work. If this API is useful to you, attribution to BetterGov.PH is appreciated.