Open data API
6 datasets as JSON or CSV: the statement for every year, every promise card, actors, forecasts and how they scored, contracts and data editions. Free, with no key and no sign-up.
Start at /api/v1, which lists every endpoint with a working example. Add .csv to an address for a spreadsheet.
Try it
curl -s https://ledgergov.uk/api/v1/statement/2025-26curl -s -o promises.csv https://ledgergov.uk/api/v1/promises.csvimport pandas as pd
forecasts = pd.read_csv("https://ledgergov.uk/api/v1/forecasts.csv")
print(forecasts.groupby("result").size())const res = await fetch("https://ledgergov.uk/api/v1/promises");
const { data, licence } = await res.json();
for (const p of data.promises) console.log(p.status_label, p.text);
console.log(licence.attribution);Endpoints
/api/v1/statementEvery year: income, spending, borrowing, debt and GDP, outturn or OBR forecast.JSONCSV/api/v1/statement/{year}One year, line by line: every income and spending line, and borrowing.JSONCSV/api/v1/promisesEvery promise card: the quote, cost range, status and full history.JSONCSV/api/v1/promises/{id}One promise card.JSON/api/v1/actorsPeople, parties and the government, with their cards counted by status.JSONCSV/api/v1/forecastsEvery recorded forecast and, once the outturn is in, how it scored.JSONCSV/api/v1/contractsPublic contracts linked to promise cards, with every change in value or dates.JSONCSV/api/v1/vintagesEvery edition of every source the data holds, newest first.JSONCSV
Every number comes with its source
Each number carries its unit, quality label, source and edition. Here is 2025-26 borrowing as the API gives it:
{
"borrowing": {
"value": 134.327,
"unit": "gbp_bn",
"quality": "sourced",
"source_id": "ons_psf",
"vintage": "PESA-2026 + PSF-2026-11",
"method_note": "Total spending minus receipts (PSF-2026-11). Published borrowing for 2025-26: 134.3bn."
}
}value- The number, in its unit. Money is in £ billion (gbp_bn) unless the unit says otherwise.
unit- gbp_bn, pct_gdp (% of GDP), rate_pct, persons_m, persons_k (thousands), households_m.
quality- sourced: from an official release. approx: worked out from official figures, with the method. modelled: from a model, as a range. training: a working figure not yet checked.
source_id- Which source the number comes from; the response lists every cited source under sources, with its licence.
vintage- The edition the number comes from, for example EFO-2026-03 (the OBR's March 2026 forecast).
method_note- How a number that is not simply copied from a source was made.
low, central, high- A range. Forecasts and model results always have one; a single published number has low = central = high.
Promise cards: who must act, and who made the cost
Every card in /api/v1/promises says which body would have to deliver it and, when it has a cost, who made the central figure. The rules are in the promise standard, the same for every party.
{
"id": "uk-child-house-every-region-2029",
"status": "promised",
"outcome_by": "hm-government",
"brought_about_by": null,
"cost": {
"low": 0.015,
"central": 0.0167,
"high": 0.0183,
"unit": "gbp_bn_per_year",
"costed_by": {
"kind": "official",
"name": "DHSC"
}
}
}outcome_by- The body that would have to act to deliver the promise as worded, as of now, named by its role: hm-government, a devolved government, a council or a public body, never a party or a person. null when no body in power is committed to it, such as an opposition party's pledge. It follows the role, not the party: when power changes hands, it changes only if the new holders take the promise on or the old ones lose the power to deliver it. Every card has it, a value or null. Until 9 October 2026 this field held what brought_about_by holds now.
brought_about_by- Who brought about the current status when it was not the card's own actor, such as an opposition pledge the government carried out; null otherwise.
verification- How far the card has been verified, counted from the editors' approvals recorded on it: level is none, automated (checked only by our automated reviewer), editor or editors; text is the line the card shows ("Verified by Pavel Guzhikov and 1 independent editor"); named lists the editors who chose to be named, counted how many other editors approved, on the day of the latest approval. null if the site was built without its editors list.
cost- The yearly cost to the public purse in £ billion, as low, central and high; a negative figure raises money. null when there is no costing. versions[].cost is the cost as each version of the promise stood.
cost.costed_by- Who made the central figure, as kind and name. official: the OBR, HMRC, HM Treasury or another UK government department, or a devolved government's equivalent, whoever made the promise. party: the promise-maker's own figure, including one a party now in government made in opposition. independent: anyone else, such as the IFS, a think tank or academics. name is the maker as a reader would say it, such as OBR or Labour Party. Every cost has it; method_note explains where the low and high figures come from.
corrections- Every fix to the card's history, with the old and new values and the reason. A new official yearly cost is recorded here too. A change to a card's current cost is also an entry in /feeds/all.xml and /feeds/updates.xml, with an id that never changes.
Licence and credit
Most figures are Crown copyright under the Open Government Licence v3.0; quotes from Parliament are under the Open Parliament Licence v3.0. Every response carries its licence, and each source lists its own terms.
Please credit the data like this:
Contains public sector information licensed under the Open Government Licence v3.0. Compiled by LedgerGov.UK (https://ledgergov.uk).What else the licence block says
- Every number names its source (sources[].licence gives each one's terms). Most are Crown copyright under the OGL; Bank of England and NATO figures follow their own terms.
- Quotes from Parliament: contains Parliamentary information licensed under the Open Parliament Licence v3.0 (https://www.parliament.uk/site-information/copyright-parliament/open-parliament-licence/). Other quotes are short extracts reproduced for reporting; their rights stay with the speaker and publisher (see each card's quote_licence).
- Notes, summaries and statuses written by LedgerGov.UK are licensed under Creative Commons Attribution 4.0 (CC BY 4.0) (https://creativecommons.org/licenses/by/4.0/): reuse them freely, crediting LedgerGov.UK with a link to the page they come from.
- Official forecasts are the OBR's and the ONS's, labelled by maker; only records with maker "public_ledger" are ours.
Stable, cached, private
- Field names stay the same within
v1. New fields may be added; anything that would break your code comes as a new version, and this one keeps working. - The data changes when the site is updated, after the nightly data job finds a new official release. Responses can be cached for an hour.
- Any website can call it from the browser (open CORS for GET).
- It only serves what the site publishes. Nothing about readers is in it: no follows, no subscriptions, no submissions.
- No key, no account, no tracking.