UK Law

v1.0.1
io.github.flaviohtavares/uk-law Checked 3 days ago Published 28 days ago

Search 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.

ParameterTypeDescription
query *stringWords from the title, e.g. "employment rights act", or an id such as "ukpga/2018/12"
extentstringOnly laws that extend to E, W, S or N.I.
in_forcebooleanLeave out repealed laws
limitintegerDefault 20
topicstringOnly laws under a topic whose name contains this text, e.g. Housing
typesarrayOnly 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).

ParameterTypeDescription
id *stringLaw id from search_laws, e.g. ukpga/1996/18
max_charsintegerDefault 60000
partstringOne 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.

ParameterTypeDescription
querystringe.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.

ParameterTypeDescription
name *stringTopic name from list_topics, e.g. Landlord and Tenant
max_charsintegerDefault 60000
yearstringFor big topics: the year of regulations to list