API

Free, read-only access to everything Hear, Hear tracks — bills, MP voting records, and the rankings built on top of them. Same data the website shows, same numbers, just as JSON.

Get a key

Instant, no approval wait. One key per email address — if you've already got one, this just re-sends it rather than issuing a new one.

Using it

Pass your key as a bearer token, or as a query parameter if you just want to try an endpoint straight in a browser address bar:

curl -H "Authorization: Bearer YOUR_KEY" https://hear-hear.co.uk/api/v1/bills
https://hear-hear.co.uk/api/v1/bills?api_key=YOUR_KEY

Every key gets 2,000 requests/day, resetting at midnight UTC. Going over it gets you a 429 response for the rest of the day, not a ban — no need to email anyone, it just opens back up tomorrow.

Endpoints

GET /api/v1/bills — list tracked bills. Filter with ?topic= or ?house=Commons|Lords, page with ?limit=/?offset=.

GET /api/v1/bills/{bill_id} — one bill, with its pros/cons and real division results (aye/no/no-vote totals) where a vote's been resolved.

GET /api/v1/mps — list every current MP. Filter with ?party= or ?search=, page with ?limit=/?offset=.

GET /api/v1/mps/{mp_id} — one MP, with their voting record and whip-meter estimate.

GET /api/v1/rankings/rebels — every ranked MP's estimated party-cohesion score. ?order=rebel|loyal, ?party=.

GET /api/v1/rankings/turnout — every ranked MP's recorded-vote turnout. ?order=low|high, ?party=.

GET /api/v1/rankings/alignment — every ranked MP's alignment with their own constituents' "have your say" votes. ?order=low|high, ?party=.

GET /api/v1/rankings/interests — every MP with at least one declared financial interest on file, with our topic-match tags. ?party=, ?topic=.

GET /api/v1/mps/{mp_id}/written-questions — one MP's written questions to government, on file so far.

GET /api/v1/written-questions/departments — average/median days to answer a written question, by department. ?min_answered=, ?limit=.

GET /api/v1/petitions — every currently open petition to UK Government and Parliament, most-signed first. ?search=, page with ?limit=/?offset=.

GET /api/v1/petitions/{petition_id} — one open petition, with its full background text and response/debate details where they exist.

GET /api/v1/mp-expenses/summary — overview stats (claims/total paid/MPs on file) plus periods, the full list of financial years currently loaded. ?period= scopes the stats to one year; periods itself always lists every year regardless. All the mp-expenses endpoints below cover office costs, accommodation, travel, and bought-in/temporary staffing only — never permanent staff payroll, which IPSA publishes separately as one yearly aggregate per MP, not as individual claims. Expect totals well below the “~£170k–£220k/year average MP cost” figures reported elsewhere, which include payroll.

GET /api/v1/mp-expenses — every individual MP business-cost claim, searchable. ?search=, ?mp_id=, ?category=, ?period= (e.g. 24_25 — omit for every year combined), page with ?limit=/?offset=.

GET /api/v1/mp-expenses/top — every MP ranked by total business costs paid. Combines every financial year on file unless you pass ?period= — check /mp-expenses/summary first if you're not sure what's loaded. ?limit=.

GET /api/v1/mp-expenses/categories — total business costs paid, by category. ?period= as above.

GET /api/v1/mps/{mp_id}/expenses — one MP's business-cost claims, with a by-category breakdown. Also a lifetime-on-file total, not scoped by year.

GET /api/v1/early-day-motions — every Early Day Motion on file, searchable. ?search=, ?mp_id=, page with ?limit=/?offset=.

GET /api/v1/early-day-motions/top-sponsors — every MP ranked by how many Early Day Motions they've tabled. ?limit=.

GET /api/v1/early-day-motions/most-signed — Early Day Motions ranked by sponsor count. ?limit=.

GET /api/v1/early-day-motions/{edm_id} — one Early Day Motion, with its full motion text.

GET /api/v1/mps/{mp_id}/early-day-motions — one MP's Early Day Motions tabled, on file.

GET /api/v1/government — every government/opposition post on file, past and present, searchable. ?search=, ?mp_id=, ?category=, ?current_only=, page with ?limit=/?offset=.

GET /api/v1/government/current — every government post currently held.

GET /api/v1/government/opposition — every shadow front-bench post currently held.

GET /api/v1/mps/{mp_id}/government — one MP's government/opposition posts, current and past.

GET /api/v1/appgs — every All-Party Parliamentary Group on file, searchable. ?search=, ?category=, page with ?limit=/?offset=.

GET /api/v1/appgs/funders — external organisations ranked by total declared APPG funding on file.

GET /api/v1/appgs/{slug} — one APPG, with its full officer and funding detail.

GET /api/v1/mps/{mp_id}/appgs — every APPG one MP is a listed officer of.

GET /api/v1/briefing — the latest "this week in Parliament" summary.

Interactive API explorer (Swagger UI) → — every endpoint, with example requests you can run from the browser.

A few honesty notes that carry over from the site

Anything with a whip_meter_pct_estimate or party_cohesion_pct field is an estimate — Parliament doesn't publish real whip records, so this is how often an MP voted the same way as most of their own party, not a confirmed fact.

turnout_pct measures recorded votes cast, not chamber attendance — a low number can reflect deliberate abstention, leave, or the Commons "pairing" convention.

alignment_pct is built from Hear, Hear's own visitors in that constituency, not a scientific poll — treat it as a rough signal, not a verdict.

declared_interests is Parliament's own Register of Members' Financial Interests, unaltered. The matched_topics on each interest, and vote_overlaps, are our own automated, best-effort keyword match — not an official classification, and not a claim that any vote was influenced by an interest.

If you build something with this, a link back to hear-hear.co.uk is appreciated but not required. This is a free, independent, one-person project — there's no uptime guarantee and the rate limit may change if it's ever needed, but the intent is to keep this open.

Contains Parliamentary information licensed under the Open Parliament Licence v3.0. Hear, Hear is an independent, unofficial project — not affiliated with or endorsed by Parliament — run by one person, with no ads and no paywall. About · Privacy · Support this project ☕