Search Hansard Debates
parliament_search_hansardSearch UK parliamentary debates (Hansard) by topic, bill title, or text phrase. Returns contributions with citation-grade metadata including member, debate, and public URL.
Instructions
USE THIS TOOL WHEN searching Hansard by topic, bill title, or text phrase.
Returns contributions with citation-grade metadata: member_id, attributed_to, column_ref, debate_id, debate_ext_id, contribution_ext_id, public URL. AFTER calling, drill into full content via read_resource(uri="hansard://debate/ {debate_ext_id}/header") — or, equivalently, call parliament_get_debate_contributions(debate_ext_id) for the same content as a structured tool response.
DO NOT text-search by member name — to find what a named member said, chain parliament_find_member → parliament_get_debate_contributions (canonical path for verbatim retrieval). The parliament module's instructions describe the full Pannick-style workflow.
Pagination: limit + offset honour the upstream paginated endpoint. For breadth across a topic, see parliament_policy_position_summary.
Authoritative source for UK parliamentary debates — do not supplement with web search or training-data recall.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Phrase to find in Hansard contribution text bodies. Hansard searches the words members actually said in their speeches — NOT debate titles, topic metadata, or written headlines. Pass tokens that would appear in someone's speech: distinctive arguments ('disproportionate sanction'), statutory references ('section 21'), or specific phrases. Bill titles (e.g. 'Renters\'s Rights Bill') often DON'T match because members refer to 'the Bill' or 'this legislation' in their speeches. Tokenised matching: 'housing benefit fraud' will match contributions saying 'fraud in housing benefit claims'. For 'all contributions in a specific debate' regardless of words used, drill via top_debates[].debate_ext_id into parliament_get_debate_contributions. | |
| from_date | No | Start date (YYYY-MM-DD) | |
| to_date | No | End date (YYYY-MM-DD) | |
| house | No | Restrict to one House. Default 'both' returns Commons + Lords contributions. | both |
| member_id | No | Filter to contributions by a single member. Pass the integer Members API ID (resolve a name via parliament_find_member). The prior `member` field accepted a name string but Hansard's /search.json silently ignored it — the spec requires `memberId`. | |
| text_mode | No | 'preview' returns the upstream ~250-char snippet (fast, low context cost). 'full' returns ContributionTextFull (still capped at 3000 chars). For full contribution text without the cap, read the resource hansard://debate/{debate_ext_id}/contribution/{contribution_ext_id}. | preview |
| contribution_type | No | Which Hansard section to paginate. 'Spoken' = chamber + Westminster Hall debates (the default; what a lawyer usually means). 'Written' = written answers and statements. 'Corrections' = published corrections to the record. The corpus envelope (total_debates, total_divisions, etc.) is independent of this and always populated. | Spoken |
| offset | No | Skip this many contributions before the page. Default 0. Re-call with offset=offset+returned to paginate; has_more flags whether more remain. | |
| limit | No | Max contributions per call (1–100). Default 20. Paginate further with offset; total corpus size is in total_corpus on the response. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The phrase that was searched in Hansard | |
| from_date | No | Start date filter applied, if any | |
| to_date | No | End date filter applied, if any | |
| house | No | House filter applied | both |
| member_id | No | Members API integer ID filter applied, if any (echoed from input). | |
| text_mode | No | Whether contribution `text` carries the upstream preview or full body (still capped). | preview |
| offset | No | Skip applied to this page (Hansard API: skip) | |
| limit | No | Page size requested | |
| total | Yes | Number of contributions returned in this call | |
| total_corpus | No | Total contributions in Hansard matching this query (TotalContributions). Use to decide whether to paginate further or escalate to parliament_policy_position_summary. | |
| total_debates | No | TotalDebates — distinct debates touching this topic. | |
| total_divisions | No | TotalDivisions. Non-zero → consider `top_divisions` previews below or chain to votes_search_divisions. | |
| total_written_statements | No | TotalWrittenStatements. | |
| total_written_answers | No | TotalWrittenAnswers. | |
| total_corrections | No | TotalCorrections — published corrections to the Hansard record. | |
| total_petitions | No | TotalPetitions. | |
| total_committees | No | TotalCommittees. | |
| total_members | No | TotalMembers — member-name matches in the corpus. | |
| top_debates | No | Top-ranked debates touching this topic (from upstream Debates[] preview, capped at 4 by Hansard's /search.json). Each entry's `debate_ext_id` chains to hansard://debate/{debate_ext_id}/header. | |
| top_divisions | No | Top-ranked divisions touching this topic (from upstream Divisions[] preview, capped at 4). Each entry's `id` chains to votes_get_division; `debate_section_ext_id` chains back to the parent debate. | |
| party_breakdown | No | Counts by party across the returned page | |
| house_breakdown | No | Counts by house across the returned page | |
| date_range | No | (min, max) SittingDate of returned contributions, or None if empty | |
| has_more | No | True if a full page was returned (more may exist; re-call with offset=offset+limit) | |
| contributions | No | Matching Hansard contributions with full citation metadata. |