# UK legislation (legislation.gov.uk) search and latest changes

legislation.gov.uk: search UK Acts, statutory instruments and devolved legislation by title and year, and list the newest legislation published.

- No API key needed to call
- Source: [legislation.gov.uk, The National Archives](https://www.legislation.gov.uk/developer)
- Licence and terms: [Open Government Licence v3.0](https://www.legislation.gov.uk/developer/uris)
- Coverage: United Kingdom
- Answers are shared and cached for 3600 seconds.

## Questions you can ask

- Which UK Acts have data protection in the title? (operation `legislation_search`)
- What new UK legislation has just been published? (operation `legislation_newest`)

## Operations

### Search UK legislation by title

Answers: which UK Acts or statutory instruments have this word in their title, optionally from one year? Returns title, type, year, number and a link to the text.

- `type`: required, string, all \| ukpga \| uksi \| asp \| ssi \| anaw \| asc \| wsi \| nia \| nisr \| ukla \| ukci \| ukmo, Legislation type: all, ukpga \(UK general Acts\), uksi \(UK statutory instruments\), asp \(Scottish Acts\), ssi \(Scottish SIs\), anaw/asc \(Welsh\), wsi, nia \(Northern Ireland Acts\), nisr, ukla \(local Acts\), ukci, ukmo.
- `title`: required, string, Words in the title.
- `year`: optional, integer, Only legislation from this year.
- `limit`: optional, integer, default 5, How many results.

Example: Which UK Acts have data protection in the title?

Over MCP:

```
{"tool":"call_connector_operation","arguments":{"connector":"uk_legislation","operation":"legislation_search","params":{"type":"ukpga","title":"data protection","limit":3}}}
```

Over HTTP:

```
curl '/v1/connectors/uk_legislation/legislation_search?type=ukpga&title=data+protection&limit=3'
```

### Newest UK legislation published

Answers: what UK legislation was published most recently on legislation.gov.uk, including Acts, statutory instruments and devolved legislation?

Example: What new UK legislation has just been published?

Over MCP:

```
{"tool":"call_connector_operation","arguments":{"connector":"uk_legislation","operation":"legislation_newest","params":{}}}
```

Over HTTP:

```
curl '/v1/connectors/uk_legislation/legislation_newest'
```

## Source notice

Source: The National Archives, legislation.gov.uk. Terms: "All content is available under the Open Government Licence v3.0 except where otherwise stated". Contains information licensed under the Open Government Licence v3.0. Values are trimmed here.

## Missing something?

Tell us what data, endpoint or feature you wish we had. It is free and needs no signup: call the MCP tool request_capability, or POST a short description to https://agentnative.dennery.ai/v1/capabilities/request.
