Data and API
Researchers, journalists and developers can use the data behind this site directly. Everything here is free, read-only and needs no key. None of it uses AI: briefings are only available on the site.
Terms and fair use
- Parliamentary information is licensed under the Open Parliament Licence v3.0; please credit it, and Where They Stand, when you use it.
- Requests are limited per visitor (about 20 a minute, shared with the rest of the site). If you get a 429 response, wait a minute. Please do not use the API to copy the whole archive: the sources listed below are better for that.
- The API is in beta and may change. Changes will be listed on the changelog.
Search the record
GET /api/v1/search?q=onshore wind returns the contributions in the Westminster record since 2010
that best match the words, ranked by relevance (by keyword and by meaning), with the speaker as they were on
the day. It may take a few seconds.
q- The words to search for (required).
date_from,date_to- Limit to dates, written as YYYY-MM-DD.
housecommonsorlords.party- A party identifier, for example
labour,conservative,liberal-democrat,scottish-national-party,reform,green. writtenfalseto leave out written questions, answers and statements.limit- Up to 50 results (default 20).
Each result has the record's identifier (TheyWorkForYou's), date, House, chamber, type, heading, speaker (name, party, constituency and parlparse person identifier), an excerpt, the Hansard column or question number, links to the official record and TheyWorkForYou, and a relevance score between 0 and 1.
Other endpoints
These return JSON and are what the site's own pages use.
/api/people?q=,/api/people/{number}- MPs and peers: memberships, roles, recent contributions, voting record, registered interests, early day motions.
/api/debates/{date}/{chamber}/{slug}- A whole debate in order.
chamberiscommons,lords,westminster-hallorpublic-bill-committee; the address is the same as the debate's page on this site. /api/week?start=YYYY-MM-DD- One sitting week: debates by day and chamber, every vote with its kind, written statements.
/api/bills,/api/bills/{slug}- Bills since 2010, their sittings and their votes, with what each vote was on.
/api/trends?q=&by=- How often words were used each year, with totals for context.
byisall,party,house,nationorparliaments. /api/edms?q=&person=,/api/edms/{id}- Early day motions and who signed them, with each member's party on the day they signed.
/api/committees,/api/committees/{id},/api/inquiries/{id},/api/witnesses?q=- Committees, their inquiries, reports and government responses, and who gave oral evidence.
/api/devolved,/api/devolved/search?q=&leg=,/api/devolved/{leg}/{key}- The Scottish Parliament (
scottish-parliament), the Senedd (senedd) and the Northern Ireland Assembly (ni-assembly).
RSS feeds
/feeds/people/{number}.xml: what a member has said, newest first./feeds/topics.xml,/feeds/bills.xml,/feeds/edms.xml,/feeds/committee-reports.xml,/feeds/changelog.xml,/feeds/corrections.xml.
Better sources for bulk data
For whole datasets, go to the sources this site is built on:
- TheyWorkForYou's data and ParlParse (mySociety): the Hansard record and member data.
- UK Parliament's developer hub: members, divisions, bills, committees, written questions and early day motions.
- The source code of this site, to run your own copy.