Hansard Parliamentary Debates
Pricing
from $10.00 / 1,000 results
Hansard Parliamentary Debates
Every contribution from the House of Commons and Lords via the official Hansard API. Speaker, party, constituency, full text and timestamps, ideal for political research and AI training data.
UK Hansard Parliamentary Debates
Extract full text UK parliamentary debates from the official Hansard record: one row per contribution, with the speaker, party, constituency, debate title, timestamp and the text itself.
🔍 What does UK Hansard Parliamentary Debates do?
It walks the official Hansard record for a date range and returns every contribution as a clean row of data, ready for a corpus, a RAG index, a database or your own product.
It covers:
- House of Commons debates
- House of Lords debates
- Westminster Hall debates
- Written ministerial statements
Weekends are skipped automatically, and days when the House did not sit return nothing.
📊 What data can I extract from Hansard?
One row per contribution:
| Field | Description |
|---|---|
date | Sitting date, YYYY-MM-DD |
house | Commons or Lords |
section | Debate, WestHall or WMS |
debateTitle | Title of the debate or question |
debateId | Hansard debate identifier |
speaker | Member name, null for unattributed text |
role | Ministerial role or Chair, where the attribution carries one |
constituency | Seat, Commons members only |
party | Party abbreviation, for example Lab or Con |
memberId | Parliament member id, useful for joining to other datasets |
time | Timestamp of the contribution where Hansard records one |
text | Full contribution text, markup stripped |
wordCount | Word count |
uin | Unique identifying number for written questions |
contributionId | Hansard contribution identifier |
url | Link to the debate on Hansard |
💡 Why use Hansard data?
LLM training and fine-tuning. Millions of words of formal political discourse, already attributed to a named speaker and party.
RAG and search. Build a parliamentary knowledge base you can cite, with a source URL on every row.
Policy and legislative research. Track how a bill or a topic was argued over time, and by whom.
Fact checking and media. Verify a quote against the official record rather than a press report of it.
🚀 How do I use UK Hansard Parliamentary Debates?
- Click Try for free.
- Pick a
chamber:commons,lordsorboth. - Set
startDateandendDateto bound the range, YYYY-MM-DD. - Add a
searchTermto keep only contributions containing a word or phrase, and setmaxSpeechesto cap the run. - Click Start, then download the results as JSON, CSV or Excel, or pull them from the API.
⬇️ Input
{"chamber": "commons","startDate": "2024-01-01","searchTerm": "housing","maxSpeeches": 5000}
| Field | Type | Default | What it does |
|---|---|---|---|
chamber | string | commons | Which house to collect, commons, lords or both |
startDate | string | 2024-01-01 | First sitting date to collect, YYYY-MM-DD |
endDate | string | Last sitting date, leave empty for today | |
searchTerm | string | Only contributions containing this term | |
includeWrittenAnswers | boolean | true | Include written ministerial statements, the WMS section |
includeWestminsterHall | boolean | true | Include Westminster Hall debates |
maxSpeeches | integer | 5000 | Hard cap on the number of results |
Two more options are worth knowing. maxDays limits the run to N weekday dates, where 0 means every weekday in the range. includeProcedural adds short non-speech entries such as Prayers and the sitting date, and it is off by default because each one is a billable result.
⬆️ Output
Table view
Results arrive as a Contributions table you can sort and filter in the Console, with the date, house, debate title, speaker and word count lined up for scanning.
JSON
A typical row:
{"date": "2026-06-03","house": "Commons","section": "Debate","debateTitle": "Supreme Court Dillon Judgment: Policy Implications","debateId": "C66E1F5D-9FA8-409F-9D3B-87F3A026A61A","speaker": "Peter Swallow","role": null,"constituency": "Bracknell","party": "Lab","memberId": 5182,"time": "11:32:00","text": "What assessment he has made of the potential implications...","wordCount": 26,"uin": null,"contributionId": "26060368000025","url": "https://hansard.parliament.uk/commons/2026-06-03/debates/C66E1F5D-9FA8-409F-9D3B-87F3A026A61A"}
Download it from the run as JSON, CSV or Excel, or read it straight from the API.
Dataset size examples
Typical volume per time period:
| Period | Contributions | Approximate words |
|---|---|---|
| 1 day | 50 to 200 | 50,000 to 200,000 |
| 1 week | 200 to 800 | 200k to 800k |
| 1 month | 1,000 to 3,000 | 1M to 3M |
| 1 year | 12,000 to 35,000 | 12M to 35M |
And for larger corpora:
| Range | Contributions | Approximate words |
|---|---|---|
| Full 2024 | around 25,000 | around 25M |
| Last 5 years | around 125,000 | around 125M |
| Modern era, 2000 onwards | 600,000 plus | 600M plus |
Three runs to size against: 30 days of Commons returns around 5,000 contributions; climate change across both houses since 2020 returns around 2,000; a full calendar year across both houses returns around 30,000.
Recommended update schedule
For an ongoing corpus, run daily at 2am UTC to capture the previous day's debates. Hansard publishes the next working day after a sitting.
For a historical corpus, run once across the full date range and store the output in your own pipeline rather than re-fetching it.
Proxies and reliability
The Actor uses Apify's residential proxy service to avoid rate limiting and keep access to Hansard reliable. Proxy cost is included in the per-result price, so there is nothing to configure.
💰 How much does it cost?
You pay per contribution returned. Set maxSpeeches to cap what a run can cost, which matters most when a wide date range would otherwise produce far more rows than you expected.
Days when the House did not sit return nothing and are not charged. Leaving includeProcedural off keeps short procedural entries such as Prayers out of the bill. Paid Apify plans get a lower rate per contribution.
🔌 Integrations
Send results straight to Google Sheets, Slack, Airtable, Zapier, Make or your own webhook using Apify integrations. You can also trigger a run whenever something happens in another tool, and the Actor is callable from AI agents and MCP clients through the standard Apify API.
🔗 Using UK Hansard Parliamentary Debates with the Apify API
curl -X POST "https://api.apify.com/v2/acts/spookyweb~uk-hansard-parliamentary-debates/run-sync-get-dataset-items?token=YOUR_TOKEN" \-H "Content-Type: application/json" \-d '{"chamber": "commons", "startDate": "2024-01-01", "searchTerm": "housing", "maxSpeeches": 5000}'
Or with the Apify client:
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_TOKEN' });const run = await client.actor('spookyweb/uk-hansard-parliamentary-debates').call({chamber: 'commons',startDate: '2024-01-01',searchTerm: 'housing',maxSpeeches: 5000,});const { items } = await client.dataset(run.defaultDatasetId).listItems();
Full detail is in the Apify API reference, and every run is also callable from the Python and JavaScript clients.
❓ FAQ
Does it cover the Lords as well as the Commons?
Yes. Set chamber to lords for the upper house only, or both to collect the two together. The house field on every row tells you which one a contribution came from, so a both run is easy to split afterwards.
Does it include written questions and Westminster Hall?
Yes, and both are on by default. includeWrittenAnswers covers written ministerial statements, includeWestminsterHall covers Westminster Hall debates. The section field labels each row as Debate, WestHall or WMS, so you can filter them apart later. Written parliamentary questions and answers live in a separate Parliament API and are not part of the Hansard debate record.
How far back does it go?
The official Hansard record runs back to 1803, and structured coverage through the Hansard API is reliable from 2005 onwards. Set startDate to whatever you need and the Actor walks forward from there, skipping weekends and non-sitting days.
Can I search for a term across debates?
Yes, searchTerm keeps only contributions containing that term. It is the cheapest way to build a topic corpus, because contributions that do not match are never returned and never charged.
What counts as one item?
One contribution, meaning a single speech, intervention or written statement, exactly as Hansard segments it. That is also the billing unit. Procedural entries such as Prayers are contributions too, which is why includeProcedural is off by default.
Do I need a Hansard API key?
No. There is nothing to register for and no quota to manage. Give the Actor a date range and it handles pagination, non-sitting days and rate limiting for you.
⚖️ Is it legal to scrape Hansard?
Hansard is the official report of proceedings in Parliament, published under the Open Parliament Licence, which expressly permits reuse, including commercial reuse, subject to acknowledgement. Contributions are made by members in their public role. This Actor uses the official Hansard API.
Source: hansard.parliament.uk. Apify's ethical scraping guide covers the wider picture.
👍 Your feedback
Found a bug, or want a field that is not here yet? Open an issue on the Actor's Issues tab. Requests that make the data more useful get built, and problems get fixed quickly.
🔎 You might also like
| Actor | What it does |
|---|---|
| UK Case Law Search and Monitor | Court judgments and tribunal decisions from Find Case Law, with full text and change monitoring |
| UK ICO Enforcement Actions | ICO fines, reprimands, enforcement notices and prosecutions with fine amounts and sectors |
| UK Planning Applications | Planning applications from every UK council, tagged by the type of work proposed |