UK Law
v1.0.1Search and read all UK legislation (130k Acts and regulations), updated daily, with official links.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
search_laws Search UK laws
Find UK Acts and regulations by words of their title, or by id (e.g. ukpga/1996/18). Exact titles, Acts and laws in force come first. Returns id, title, status, extent and topics.
| Parameter | Type | Description |
|---|---|---|
query * | string | Words from the title, e.g. "employment rights act", or an id such as "ukpga/2018/12" |
extent | string | Only laws that extend to E, W, S or N.I. |
in_force | boolean | Leave out repealed laws |
limit | integer | Default 20 |
topic | string | Only laws under a topic whose name contains this text, e.g. Housing |
types | array | Only these id prefixes: ukpga (UK Acts), uksi (UK regulations), asp/ssi (Scotland), asc/anaw/wsi (Wales), nia/nisr (Northern Ireland), eur (EU-origin) |
get_law Read a UK law
Read a law by id. Short laws come whole. Long laws (100+ sections) return their front matter and a Contents list: then ask for one part, e.g. part: "section 86", "schedule 1", "regulation 3" or "part 2" (lists that part's sections).
| Parameter | Type | Description |
|---|---|---|
id * | string | Law id from search_laws, e.g. ukpga/1996/18 |
max_chars | integer | Default 60000 |
part | string | One section, regulation, article, schedule or part of a long law, e.g. "section 86" |
list_topics List topics
Topics (the official subject headings of legislation.gov.uk) with the number of Acts and regulations in force. Optionally only those whose name has these words.
| Parameter | Type | Description |
|---|---|---|
query | string | e.g. housing, tax, employment |
get_topic Read a topic page
The Acts and regulations in force on one topic, with how many regulations each Act has on it. Big topics list regulations by year: pass year to read one.
| Parameter | Type | Description |
|---|---|---|
name * | string | Topic name from list_topics, e.g. Landlord and Tenant |
max_chars | integer | Default 60000 |
year | string | For big topics: the year of regulations to list |