# legislation.gov.uk API

> 2 public methods for legislation.gov.uk, each 1 credit per completed run.

Unofficial. Not affiliated with or endorsed by legislation.gov.uk.

- Page: https://fous.com/methods/legislation.gov.uk

## Methods

### [Search UK legislation](https://fous.com/methods/legislation.gov.uk/search-legislation.md)

`legislation.gov.uk/search_legislation`, read. Search UK legislation by topic or title, with optional type and year filters. Closest title matches appear first; broader text matches fill remaining places.

Returns: title, year, type, number as cited, date enacted or made, link

### [Get UK law section](https://fous.com/methods/legislation.gov.uk/get-law-section.md)

`legislation.gov.uk/get_law_section`, read. Gets the latest available revised text of a section of a UK Act from legislation.gov.uk, or the Act's section contents when no section is given. The outstanding-changes flag describes the Act and may include changes outside the selected section.

Returns: title, year, chapter, section heading and text, in force, extent, outstanding changes, version date, link, contents
