Search UK Legislation
legislation_searchSearch UK Acts and Statutory Instruments by title, phrase, or full text. Returns ranked results with links and next-step hints for structural drill-in.
Instructions
USE THIS TOOL WHEN searching UK Acts and Statutory Instruments by title, phrase, or full-text.
Returns ranked results: title, type, year, number, legislation.gov.uk URL, and next_steps hints (toc URI, section template). AFTER calling, chain to legislation_get_toc then legislation_get_section for structural drill-in.
Filter discipline: type and year are exact-match. Use only when you
already know the value. For currency-driven searches ("the recent
Renters' Rights Act"), query by phrase alone and read the year from the
results — guessing a year and filtering by it zeroes results when wrong.
For broader concept queries across content, set fulltext=True.
Authoritative source for UK primary and secondary legislation (legislation.gov.uk).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query, e.g. 'Housing Act 1988' or 'data protection personal data' | |
| type | No | Filter by type: 'ukpga' (Acts), 'uksi' (SIs), 'asp' (Scottish Acts), 'nia' (NI Acts). Exact-match — omit if you don't already know whether you're looking for an Act vs an SI. | |
| year | No | Filter by year of enactment (exact-match — a single integer, not a range). Omit unless you already know the Act's year. Speculating a year (e.g. 'this is recent so it must be 2026') and getting it wrong will zero out the result set. Better workflow: query without `year`, then read the year from the returned results. | |
| limit | No | Maximum results to return (1–50). Passed to the upstream results-count param. | |
| fulltext | No | Default false → searches Act/SI titles only (best for finding a named Act, e.g. 'Housing Act 1988' returns ukpga/1988/50 first). Set true to search the full text of every Act/SI for the query (returns SIs and regulations that cite the term — e.g. 'rental deposits' would return many implementing instruments). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| results | Yes | Matching legislation items | |
| total | Yes | Total number of matches |