BetterGov.ph | Budget Data API NEP 2027 GAA 2020–2026 API docs OpenAPI MCP

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.

Base URL 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

DatasetCoverageWhat it is
gaaFY2020–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/2027FY2027, 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-cycleFY2018–2026, selected departments How appropriations moved through the cycle: NEP → GAA → authorized/adjusted appropriation → adjusted allotment → obligations → disbursements, per program × year × stage × expense class.
hearingsFY2027 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/2027FY2027, 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).

Caveats worth knowing. (1) 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" }
StatusSlugMeaning
400bad_requestInvalid parameter (year out of range, malformed id, …)
400bad_cursorThe cursor was not issued by this API (or filters changed)
404not_foundUnknown department / endpoint
405method_not_allowedThe API is read-only — use GET
503not_loadedThe dataset is not loaded on this deployment
500query_failedUnexpected database error

GAA — General Appropriations Act, FY2020–2026

GET/api/v1/gaa

National 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 }
  ]
}
GET/api/v1/gaa/departments

All 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
GET/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
GET/api/v1/gaa/departments/{id}/expense-classes

Personnel Services / MOOE / Financial Expenses / Capital Outlays totals per year.

CodeClass
1Personnel Services (PS)
2Maintenance and Other Operating Expenses (MOOE)
3Financial Expenses (FinEx)
6Capital Outlays (CO)
GET/api/v1/gaa/departments/{id}/programs

Program/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.

ParamTypeDescription
year2020–2026Ranking year (default 2026)
qstringSubstring filter on program name
agency_idstringScope to one agency/bureau
limit1–500Page size (default 100)
cursorstringFrom a previous next_cursor
curl "https://budget.bettergov.ph/api/v1/gaa/departments/07/programs?year=2026&q=computerization&limit=5"
GET/api/v1/gaa/departments/{id}/objects

UACS 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.

ParamTypeDescription
year2020–2026Filter/ranking year (default 2026)
qstringSubstring filter on description or UACS code
agency_idstringScope to one agency/bureau
expense_class1, 2, 3, 61=PS, 2=MOOE, 3=FinEx, 6=CO
sortamount | description | code | totaltotal ranks by the 7-year sum (implies include_zero)
dirasc | descDefaults: desc for amounts, asc otherwise
limit, cursorPage 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.

Search 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.

ParamTypeDescription
qstring, requiredSearch text (min 2 chars)
department_idstringOptional two-digit scope
year2020–2026Ranking year (default 2026)
limit1–100Max results (default 25)
curl "https://budget.bettergov.ph/api/v1/gaa/search?q=flood%20control&year=2026&limit=10"
GET/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 },
      ...
    ]
  }
}
GET/api/v1/gaa/years/{year}/departments/{id}/children

Walk 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.

ParamTypeDescription
levelagencies | fpaps | operating_units | fund_subcategories | expensesLevel to list (default agencies)
parentstringParent entity id — required below agencies
include_zero1Keep rows the year doesn't fund
limit, cursorPage 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).

GET/api/v1/nep/2027

National 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
GET/api/v1/nep/2027/departments

All 39 departments (including synthetic SPF and AUTO) with amounts, baselines, and per-dimension counts.

GET/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
GET/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"
GET/api/v1/nep/2027/rollups/{dimension}

National rollups. Two modes:

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

GET/api/v1/budget-cycle

Dataset 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
GET/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.

FieldValues
stagenep, gaa, authorized_appropriation, adjusted_appropriation, adjusted_allotment, obligations, disbursements
expense_classps, 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.

GET/api/v1/hearings

All 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"

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"
GET/api/v1/hearings/{video_id}

One hearing's metadata and its topic index (topic, status, first timestamp, summary, outcome).

GET/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"
GET/api/v1/hearings/{video_id}/timeline

The proceedings in order — roll call, presentation, each interpellation, motions, suspensions — with per-section summaries, exchanges, figures and actions.

GET/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):

KeyProgramEach rowHouse version compared
dpwhDPWH infrastructure (roads, bridges, flood control, buildings)One named projectThird reading
fmrDA farm-to-market roadsOne roadSecond reading (the list is the same at third)
hfepDOH Health Facilities Enhancement ProgramOne facility and funding columnSecond reading (the same at third)
niaNIA irrigationOne irrigation projectSecond reading (the same at third)
Rules every House bill endpoint follows. (1) Amounts are integer pesos. 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).

GET/api/v1/hgab/2027

Start 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" }, …
    ], …
  }
}
GET/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
GET/api/v1/hgab/2027/datasets/{key}/projects

Filter, 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.

ParamValuesDescription
qwordsEvery word must appear in the title, program, program line, region or office
groupcomma listhouse_only, nep_only, unchanged, increased, decreased, scope_review
heldall | hide | onlyUnconfirmed matches: keep (default), hide, or only them
regionkey or labelA region key (NCR, CAR, I … IV-A, MIMAROPA … XIII, BARMM, NIR) or a region label exactly as published
program, pap, office, office_kindexact textAs published (office is the DPWH implementing office)
zonelocal | fapLocally funded or foreign-assisted (DPWH)
trace, reading_statuscodeExact raw status, or DPWH second/third reading status (e.g. third_only)
flagcodeOne review flag that must be present, e.g. office_difference
has_coordinates1 | 0Rows whose documents publish map coordinates (all farm-to-market roads, some DPWH)
sorthouse | nep | delta | abs_delta | titleDefault house (latest House amount); abs_delta = size of the change
orderdesc | ascDefault desc for amounts, asc for title
limit, offset1–200, ≥ 0Page 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
  }
}
GET/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
GET/api/v1/hgab/2027/datasets/{key}/regions

All 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
GET/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"
GET/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.

ParamValuesDescription
regionkey or labelRegion key (e.g. III) or a region label as published
qwordsEvery word must appear in the district, representative or office name
attributionA | B | mixed | noneWhose budget the figure is (none = no office found)
sorthgab3 | gaa2026 | change | nameDefault hgab3 (largest House bill amount)
limit, offset1–254, ≥ 0Page 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.

WhatStart herePage
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.

Endpoint https://budget.bettergov.ph/mcpTransport: Streamable HTTPRead-only tools

Install 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

ToolWhat it answers
list_gaa_departmentsWhich departments exist, with per-year budgets (start here)
get_gaa_national_trendsNational GAA totals per year, 2020–2026
get_gaa_departmentOne department: yearly totals, agencies, expense classes
search_gaa_programsFind programs by name across all departments
get_gaa_department_programsAll programs of one department, paginated
search_gaa_line_itemsObject-level line items with text/agency/expense-class filters
get_gaa_year_snapshotOne fiscal year in isolation: national total and every department's share, largest first
browse_gaa_hierarchyDrill one department's hierarchy for a single year: agencies → programs → operating units → funds → expenses
get_nep_2027_overviewThe FY2027 proposal at national level, vs FY2026
list_nep_2027_departmentsAll 39 NEP departments with deltas
get_nep_2027_departmentOne department's FY2027 proposal in full
get_nep_2027_rollupSlice FY2027 by agency/program/region/object/… nationally, per department, or cross-department
get_budget_cycleNEP→GAA→execution stages for covered departments
list_hearingsHouse appropriations hearings, newest first, filterable by fiscal year, agency, or title keyword
search_hearingsWhat was said on a subject across all hearings: matching topics plus timestamped moments (start here for hearings)
get_hearingOne hearing's metadata and topic index, with each topic's status, summary, and outcome
get_hearing_topicsFull deliberation record per topic: who said what, positions, figures as spoken, commitments
get_hearing_timelineThe proceedings in order, section by section
get_hearing_transcriptRaw machine transcript for a time window, to check exact wording
get_hgab_2027_overviewThe 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_datasetOne 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_projectsFilter, sort and page one program's project rows (at most 50 per call; total says when to page)
get_hgab_2027_projectOne project row with plain labels, PDF page links and the source record
list_hgab_2027_districtsDPWH money by congressional district, with office tiers, representatives and the money on no district card
get_hgab_2027_districtOne 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:

How an agent typically chains the tools

A question like "how much of DepEd's 2026 budget is textbooks?" resolves in three calls:

  1. list_gaa_departments → find DepEd's id (07)
  2. get_gaa_department {"department_id": "07"} → totals and agencies for context
  3. search_gaa_line_items {"department_id": "07", "query": "textbooks", "year": 2026} → the matched line items, plus meta.matched_amount answering 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:

  1. search_hearings {"query": "MAIFIP", "agency": "DOH", "fiscal_year": "2027"} → matching topics with their status and outcome, plus the timestamped moments that mention the term
  2. get_hearing_topics {"video_id": "…", "topic_index": 2} → that topic's full thread, positions, figures, and commitments
  3. get_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?":

  1. get_hgab_2027_overview → the four programs, their totals and the six groups
  2. search_hgab_2027_projects {"dataset": "dpwh", "query": "flood", "region": "IV-A", "group": ["house_only"], "held": "hide"} → the matching rows, total, and the per-version sums
  3. get_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

8 November 2026

7 November 2026

4 November 2026

3 November 2026

2 November 2026

1 November 2026

28–29 October 2026

26–27 October 2026

25 October 2026

4–9 September 2026

24 August 2026

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.