UK legislation from legislation.gov.uk, as structured JSON next to EUR-Lex — on the same API key and credit pool once the United Kingdom is live.
LexAPI is a REST API for EU law (EUR-Lex) that adds national law country by country. For the United Kingdom, the scope is primary and secondary legislation in force from legislation.gov.uk, as structured JSON in the same document shape as every other country, on the same API key and credit pool as EU law. Whether the United Kingdom is live right now is shown in the coverage list and at GET /api/v1/national/coverage.
Primary and secondary legislation in force from legislation.gov.uk — UK, Scottish, Welsh and Northern Ireland Acts, UK, Scottish and Welsh Statutory Instruments and Northern Ireland Statutory Rules — revised where a revised text exists, else as made.
Not part of the scope for this country — see the known gaps below.
| Source | Licence / terms | Publisher |
|---|---|---|
| legislation.gov.uk | Open Government Licence v3.0 | The National Archives |
curl -H "x-api-key: $LEX_KEY" \
"https://lex-api.com/api/v1/uk/documents/UK-UKPGA-2018-12"UK-UKPGA-2018-12 is an Act, by type, year and chapter. A document costs 1 credit (reserved at 5 and settled at 1 when the answer is sent, so a document read needs 5 credits available); list the United Kingdom’s documents with GET /api/v1/uk/documents.
{
"document": {
"id": "UK-UKPGA-2018-12",
"jurisdiction": "UK",
"language": "en",
"documentKind": "act",
"title": "…",
"documentType": "…",
"ecli": …,
"eli": …,
"dateOfDocument": …,
"version": 1,
"fetchedAt": "…",
"validTo": …,
"inForce": …,
"decision": null,
"content": { "fullText", "articles", … },
"textAvailability": { "available": true },
"attribution": "…",
"textBasis": …
}
}| Plan | National-law calls |
|---|---|
| Free | 30 calls / month |
| Starter | 500 calls / month |
| Professional | 2,000 calls / month |
| Business · Scale · Enterprise | No separate limit |
/api/v1/citations/…, or ?includeNational=true) are on Business, Scale and Enterprise only.