Hansard UK Parliament Debates Scraper avatar

Hansard UK Parliament Debates Scraper

Pricing

from $23.63 / 1,000 results

Go to Apify Store
Hansard UK Parliament Debates Scraper

Hansard UK Parliament Debates Scraper

Scrapes UK Parliament debate contributions from Hansard by search term, member, party, department, debate type, and date range. Returns each contribution as a flat row with speaker, chamber, full text, and sitting date.

Pricing

from $23.63 / 1,000 results

Rating

0.0

(0)

Developer

ParseForge

ParseForge

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

0

Monthly active users

10 days ago

Last modified

Share

ParseForge

Hansard UK Parliament Debates Scraper

Scrape UK Parliament debate transcripts from Hansard by keyword, member, party, or date, up to a million contributions per run. Every row returns the speaker, chamber, full text, and sitting date. Export to CSV, JSON, Excel, or XML.

The official Hansard API limits how you can search and filter decades of parliamentary debate. This Actor reads the public transcripts directly, letting you pull contributions by keyword, member name, party ID, department, debate type, or date range. You get a clean, flat dataset without writing a single line of code.

Who uses itWhat they scrape Hansard UK Parliament for
Political researchersTrack how a policy area has been discussed across Commons and Lords over a decade.
JournalistsPull every mention of a specific MP or minister to build a timeline of their public statements.
NGOs and campaign groupsMonitor parliamentary sentiment and language around a single issue like climate or housing.
Data scientistsBuild a corpus of structured political speech for NLP training or sentiment analysis.

What it does

This Actor collects UK Parliament debate contributions from Hansard by search term or direct filter, and returns each one as a flat row with speaker, chamber, party, text, and sitting date.

  • ๐Ÿ” Keyword search: Enter a phrase like 'NHS funding' and get every matching contribution, ranked by Hansard relevance.
  • ๐Ÿ›๏ธ Chamber filter: Restrict results to the House of Commons, the House of Lords, or pull from both in one run.
  • ๐Ÿ—ฃ๏ธ Member filter: Isolate every speech by a named MP or Lord with a case-insensitive substring match.
  • ๐Ÿ“… Date range: Narrow contributions to a specific sitting window with start and end dates in YYYY-MM-DD format.
  • ๐Ÿท๏ธ Debate type: Filter to Debates, Questions, Statements, Urgent Questions, Committee sessions, and more.
  • ๐Ÿ“Š Sort control: Order results by oldest or newest sitting date, or keep the default Hansard relevance ranking.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

What you can do with Hansard UK Parliament data

๐Ÿ“ˆ Track policy language over time.

A political researcher sets a keyword like 'universal credit', a date range of five years, and both Houses to map how the framing of welfare policy has shifted.

๐Ÿ—ž๏ธ Build a minister's public record.

A journalist enters a cabinet minister's name, filters to the Commons, and exports every oral contribution to fact-check claims or spot contradictions.

๐Ÿ“Š Monitor parliamentary sentiment on a single issue.

An NGO sets the search term to 'fracking', restricts to the last two years, and collects every mention to quantify support and opposition across parties.

๐Ÿค– Create a political speech dataset for AI training.

A data scientist pulls 100,000 contributions across all debate types, with speaker and party labels, to fine-tune a language model on UK parliamentary language.

Why choose this scraper

What you get
Full debate textThe complete spoken or written contribution, not a snippet.
Speaker attributionMember name, party, and chamber for every row.
Flexible filteringCombine keyword, member, party ID, department, and debate type in one run.
No API keyReads public Hansard data directly with no registration or rate-limit headaches.

How it compares

This Actor reads the public Hansard website directly, while the alternative below uses the official API. Here is how they compare on the features a buyer would check.

FeatureParseForgeUK Hansard Parliamentary Debates
Keyword search across all transcriptsYesNot listed
Filter by member nameYesNot listed
Filter by party IDYesNot listed
Filter by departmentYesNot listed
Filter by debate typeYesNot listed
Include former membersYesNot listed

Configure the run

Drive the Actor from a keyword search, or leave the search term empty to fetch the most recent contributions across all topics. Filters for house, member, party, department, debate type, and date range run as each contribution is read so only matches reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

{
"maxItems": 10
}

A larger pull:

{
"maxItems": 200
}

Pricing

Pay-per-result: $0.0315 per result collected. You pay only for the results written to your dataset.

Results collectedApproximate cost
100 results$3.15
1,000 results$31.50
10,000 results$315.00

New Apify accounts start with $5 in free credit.

Free users

Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account with $5 in credit.
  2. Open the Hansard UK Parliament Debates Scraper.
  3. Set your inputs and any filters, then click Start.
  4. Export the results as CSV, Excel, JSON, or XML from the Dataset tab.

Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.

Use with AI agents (MCP)

Give an AI agent live access to Hansard UK Parliament through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

$claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/hansard-uk-debates-scraper"

Then prompt it in plain language to run the scraper and read back the results.

Troubleshooting

Why am I getting no results?

Check that your search term or filters are not too narrow. Try removing the date range, setting the debate type to 'All types', or using a shorter keyword. Also confirm the Party ID is correct if you are using one.

The Member Name filter is not finding the person I want.

The filter does a substring match, so try a shorter version of the name. Check the spelling and try both the common name and the formal parliamentary name. If the member is no longer sitting, make sure 'Include Former Members' is enabled.

My run is taking a long time.

A wide search with a high maximum contributions count will take longer. Try narrowing the date range or adding a keyword to reduce the number of contributions the Actor needs to check.

The Party ID filter is not working.

Make sure you are using the numeric Party ID from the UK Parliament Members directory, not the party name. For example, use 4 for Labour, not the word 'Labour'.

I am getting results from the wrong chamber.

Double-check the House filter. It defaults to 'Both Houses'. Set it explicitly to 'House of Commons' or 'House of Lords' if you only want one chamber.

FAQ

QuestionAnswer
Does this scraper use the official Hansard API?No. It reads the public Hansard website directly, so you do not need an API key, registration, or to worry about rate limits.
Can I get contributions from both the Commons and the Lords in one run?Yes. Set the House filter to 'Both Houses' and the Actor will return matching contributions from the Commons and the Lords combined.
How do I filter by a specific MP or Lord?Use the Member Name field. It does a case-insensitive substring match, so 'Keir Starmer', 'starmer', or 'keir' will all work.
What is a Party ID and where do I find it?The Party ID is a numeric identifier from the UK Parliament Members directory. For example, 4 is Labour, 15 is Conservative, and 8 is Independent. You can look up the ID for any party on the official members site.
Can I scrape written statements and urgent questions, or only debates?You can filter by debate type to include Debates, Questions, Statements, Written Statements, Urgent Questions, Committee sessions, and more.
How far back does the data go?The Actor returns whatever is available on the public Hansard site, which covers many years of parliamentary records. Use the date range filter to narrow your search to a specific period.
What format is the data exported in?You can export your dataset in CSV, JSON, Excel, or XML from the Apify platform.
Can I include former MPs and Lords who no longer sit in Parliament?Yes. Enable the 'Include Former Members' checkbox and the Actor will also return contributions from members who have left their seat.
What happens if I leave the search term empty?The Actor fetches the most recent contributions across all topics, which you can then narrow with the other filters like house, member, or date range.
Is there a limit to how many contributions I can scrape?You can set the maximum contributions per run up to 1,000,000. The Actor will stop once it reaches that number or runs out of matching results.

Browse the full ParseForge collection for more scrapers.

๐Ÿ†˜ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.

โš ๏ธ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by UK Parliament. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.