UK Legislation Search: Acts, SIs, In-Force Status & Changes
Pricing
from $1.60 / 1,000 legislation records
UK Legislation Search: Acts, SIs, In-Force Status & Changes
UK Acts, statutory instruments and other legislation with type, number, dates, extent, revised version date, whole-item repeal, outstanding changes, contents and amendment history, from legislation.gov.uk (The National Archives). Search by title or full text, or look up by ID.
Search UK legislation on legislation.gov.uk (The National Archives' official open data, Open Government Licence) by title or full text, or look items up by identifier, and get one row per Act of Parliament, statutory instrument, Scottish, Welsh or Northern Ireland Act or instrument, or retained EU law: type, number, Royal Assent or made date, where it applies (extent), the date of its latest revised version, whether the whole item has been repealed or revoked, the number of provisions, and the changes not yet applied to it, with the legislation making each change and whether it is in force.
Turn on the table of contents for every section, regulation and schedule with links, extent and repealed or prospective status, and the amendment history for the newest amendments, repeals and commencements affecting each item, each as its own row with in-force dates. Every search also gets a free summary with the total matches and counts by type.
No API key, login or proxy setup. The Actor follows legislation.gov.uk's fair use policy: it identifies itself and waits 5 seconds between requests, as the site's robots.txt asks.
Tested in Apify's cloud: the default input delivered 10 paid rows. The example below is a real delivered cloud row.
What you get
| Field | What it holds |
|---|---|
| recordType | legislation and change are paid rows; summary is free. |
| legislationId, title, titleWelsh, type, typeName, category, year, number, alternativeNumbers | What the item is: e.g. ukpga/2018/12, Data Protection Act 2018, United Kingdom Public General Act, primary, 2018, chapter 12. |
| description, subjects, isbn | Long title or summary, subject headings (instruments) and ISBN. |
| madeOrEnactedDate, laidDate, comingIntoForceDates | Royal Assent or made date, laid date and the coming-into-force dates printed on instruments. |
| wholeRepealed, repealedDate | Whether legislation.gov.uk records the whole item as repealed or revoked, and when. |
| documentStatus, latestVersion, extent, provisionCount | revised (kept up to date) or final (as made); latest revised version date; where it applies (E+W+S+N.I.); number of provisions. |
| outstandingChanges, outstandingChangesList | Changes legislation.gov.uk knows about but has not applied yet: what changes, which provisions, made by what, and in-force status. |
| sections, sectionCount, repealedProvisions, prospectiveProvisions | With includeSections: the table of contents with links, extent and repealed or prospective (not yet in force) status. |
| changeType, affectedProvisions, affectingTitle, affectingId, affectingProvisions, applied, inForce | With includeChanges: one row per amendment, repeal or commencement, newest first. |
| url, pdfUrl, dataXmlUrl, explanatoryNotesUrl | Links to the item, the print PDF, XML and explanatory notes or memorandum. |
| publishedAt, updatedAt | When legislation.gov.uk first published and last updated it. |
| searchTerm, rank, totalFound, byType, status, note | The search, the position, and the free summary. |
What people use it for
- Legal research and compliance: find the current Acts and instruments on a topic, where they apply, whether they are repealed, and what changes are still outstanding.
- Regulatory change monitoring: schedule runs on the Acts you care about with includeChanges and see new amendments, repeals and commencements as they are recorded.
- Legal tech and AI: feed structured legislation metadata, contents and change history into search, RAG or citation tools, with stable legislation.gov.uk identifiers.
- Policy and public affairs: track new statutory instruments under an Act, e.g. every commencement order for the Online Safety Act.
- Education and publishing: build reading lists and tables of contents with official links.
- AI agents: answer 'is the Data Protection Act 1984 still in force?' or 'what amends the Online Safety Act?' from the official source.
How to use it
- Enter Searches (title words, or set Search in to full text) and/or identifiers in Look up legislation (ukpga/2018/12 or a legislation.gov.uk link).
- Optionally pick Types (Acts, SIs, Scottish, Welsh, Northern Ireland, EU-origin, drafts) and a year range.
- Keep Details and in-force status on; add Table of contents or Changes if you need them.
- Set Maximum items per search and a Maximum cost per run in Apify, then start.
- Read the
legislationandchangerows and the freesummaryrows.
Input
| Field | Example | Notes |
|---|---|---|
| searches | ["online safety", "data protection"] | 1-20 searches. |
| searchIn | "title" | title (fast) or text (full text; legislation.gov.uk takes 10-30 seconds a page). |
| legislation | ["ukpga/2023/50"] | Identifiers or legislation.gov.uk links, up to 100. |
| types | ["ukpga", "uksi"] | Empty = all UK legislation excluding EU-origin. |
| startYear / endYear | 2000 / 2026 | Year range. |
| maxResultsPerSearch | 10 | 1-500 paid items per search. |
| includeDetails | true | Extent, version, provisions and outstanding changes: one request per item. |
| includeSections | false | Table of contents (same request). |
| includeChanges | false | Newest changes per item as paid rows. |
| maxChangesPerItem | 20 | 1-500. |
Output
Each result is one row in the run's dataset (download it as JSON, CSV, Excel, XML or HTML, or read it through the API). An example row (values shortened):
{"recordType": "legislation","resultId": "legislation-ukpga/2018/12","legislationId": "ukpga/2018/12","title": "Data Protection Act 2018","titleWelsh": null,"type": "ukpga","typeName": "United Kingdom Public General Act","category": "primary","year": 2018,"number": "12","alternativeNumbers": [],"description": "An Act to make provision for the regulation of the processing of information relating to individuals; to make provision in connection with the Information Commissioner's functions under certain regulations relating to information; to make provision for a direct marketing code of practice; and for connected purposes.","subjects": [],"madeOrEnactedDate": "2018-05-23","laidDate": null,"comingIntoForceDates": null,"wholeRepealed": false,"repealedDate": null,"documentStatus": "revised","latestVersion": "2026-09-30","extent": "E+W+S+N.I.","provisionCount": 1185,"outstandingChanges": 9,"outstandingChangesList": [{"type": "word substituted","affectedProvisions": "s. 26(2)(f)(ai)","affectingTitle": "The Data (Use and Access) Act 2025 (Consequential Amendments and Transitional Provision) Regulations 2026","affectingId": "uksi/2026/386","affectingProvisions": "Sch. 2 para. 23(2)(3)","inForce": [{"date": null,"qualification": null,"prospective": true}]},{"type": "word substituted","affectedProvisions": "s. 165(1)","affectingTitle": "The Data (Use and Access) Act 2025 (Consequential Amendments and Transitional Provision) Regulations 2026","affectingId": "uksi/2026/386","affectingProvisions": "Sch. 2 para. 23(2)(3)","inForce": [{"date": null,"qualification": null,"prospective": true}]},{"type": "words substituted","affectedProvisions": "Sch. 3 para. 8(1)(q)(ii)","affectingTitle": "Adoption and Children Act (Northern Ireland) 2022","affectingId": "nia/2022/18","affectingProvisions": "Sch. 3 para. 78(2)(a)","inForce": [{"date": null,"qualification": null,"prospective": true}]},{"type": "words substituted","affectedProvisions": "Sch. 3 para. 8(1)(q)(ii)","affectingTitle": "Adoption and Children Act (Northern Ireland) 2022","affectingId": "nia/2022/18","affectingProvisions": "Sch. 3 para. 78(2)(b)","inForce": [{"date": null,"qualification": null,"prospective": true}]},{"type": "added","affectedProvisions": "Sch. 3 para. 8(1)(y)","affectingTitle": "Adoption and Children Act (Northern Ireland) 2022","affectingId": "nia/2022/18","affectingProvisions": "Sch. 3 para. 78(3)","inForce": [{"date": null,"qualification": null,"prospective": true}]},{"type": "substututed","affectedProvisions": "Sch. 4 para. 3(4)(a)","affectingTitle": "Adoption and Children Act (Northern Ireland) 2022","affectingId": "nia/2022/18","affectingProvisions": "Sch. 3 para. 79(2)","inForce": [{"date": null,"qualification": null,"prospective": true}]},{"type": "words substituted","affectedProvisions": "Sch. 4 para. 5(4)(a)","affectingTitle": "Adoption and Children Act (Northern Ireland) 2022","affectingId": "nia/2022/18","affectingProvisions": "Sch. 3 para. 79(3)(a)","inForce": [{"date": null,"qualification": null,"prospective": true}]},{"type": "words substituted","affectedProvisions": "Sch. 4 para. 5(4)(a)","affectingTitle": "Adoption and Children Act (Northern Ireland) 2022","affectingId": "nia/2022/18","affectingProvisions": "Sch. 3 para. 79(3)(b)","inForce": [{"date": null,"qualification": null,"prospective": true}]},{"type": "words substituted","affectedProvisions": "Sch. 3 para. 2(1)","affectingTitle": "Veterans Advisory and Pensions Committees Act 2023","affectingId": "ukpga/2023/48","affectingProvisions": "s. 2(1)(l)","inForce": [{"date": null,"qualification": null,"prospective": true}]}],"sectionCount": null,"repealedProvisions": null,"prospectiveProvisions": null,"isbn": "9780105700128","explanatoryNotesUrl": "http://www.legislation.gov.uk/ukpga/2018/12/notes","publishedAt": "2019-08-19T00:00:00Z","updatedAt": "2026-09-30T10:46:18Z","url": "https://www.legislation.gov.uk/ukpga/2018/12","pdfUrl": "http://www.legislation.gov.uk/ukpga/2018/12/2026-09-30/data.pdf","dataXmlUrl": "http://www.legislation.gov.uk/ukpga/2018/12/2026-09-30/data.xml","changeType": null,"affectedId": null,"affectedTitle": null,"affectedProvisions": null,"affectingId": null,"affectingTitle": null,"affectingProvisions": null,"applied": null,"inForce": null,"searchTerm": "data protection (title)","rank": 1,"status": null,"totalFound": null,"delivered": null,"alreadyDelivered": null,"byType": null,"note": null,"sourceUrl": "https://www.legislation.gov.uk/ukpga/2018/12/introduction/data.xml","scrapedAt": "2026-11-12T19:14:00Z"}
The example uses a real cloud row; large contents and amendment arrays are omitted for readability. Exported rows retain the requested details.
Pricing
- $0.002 per record ($2 per 1,000 legislation items or changes); $0.0018 on Silver and $0.0016 on Gold and higher plans, plus Apify's $0.00005 start.
- Summaries, items already delivered for another search in the same run, empty searches and failures are free.
- Cloud runs on 12 November 2026 charged exactly one event per delivered record.
What typical jobs cost at the list price:
| Job | Cost |
|---|---|
| Default: 10 items with details for 'data protection' (94 match) | $0.02 |
| Online Safety Act, an SI and a repealed Act with contents and 5 changes each (13 records) | $0.026 |
| 1,000 items or changes | $2.00 |
| An empty search | $0 |
Set Maximum cost per run in Apify. A cloud test on 12 November 2026 stopped cleanly at two paid rows with a $0.00505 limit; free summaries are retained.
Tips
- Turn details off for quick lists: one request returns up to 100 items, instead of one request per item.
- Use quotes for exact titles, e.g. "Online Safety Act", and Types to keep to Acts or SIs.
- Look up an Act by identifier with includeChanges to see its newest amendments and commencements first.
- wholeRepealed false does not mean every provision is in force: check outstandingChanges, prospectiveProvisions (with the table of contents) and the change rows.
Use it through the API
Python
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_TOKEN>")run = client.actor("zaiqltd/uk-legislation-search").call(run_input={"searches": ["online safety"], "types": ["ukpga", "uksi"], "maxResultsPerSearch": 5, "includeChanges": true, "maxChangesPerItem": 5})for row in client.dataset(run.default_dataset_id).iterate_items():print(row)
JavaScript
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });const run = await client.actor('zaiqltd/uk-legislation-search').call({"searches": ["online safety"], "types": ["ukpga", "uksi"], "maxResultsPerSearch": 5, "includeChanges": true, "maxChangesPerItem": 5});const { items } = await client.dataset(run.defaultDatasetId).listItems();
HTTP (one call, results back)
curl -X POST 'https://api.apify.com/v2/acts/zaiqltd~uk-legislation-search/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>' \-H 'Content-Type: application/json' \-d '{"searches": ["online safety"], "types": ["ukpga", "uksi"], "maxResultsPerSearch": 5, "includeChanges": true, "maxChangesPerItem": 5}'
Integrations and schedules
- Schedules: run it every hour, day or week from the Apify Console (Schedules) and keep a history of results.
- Make, Zapier, n8n, Google Sheets, Slack, Airtable: connect it through Apify's integrations, or send each finished run to a webhook.
- Datasets: results stay in the run's dataset; export them or read them by API whenever you need them.
Use it with AI agents (MCP)
Add Apify's MCP server with this Actor already pinned (https://mcp.apify.com?tools=zaiqltd/uk-legislation-search) to Claude, ChatGPT, Cursor, VS Code or any MCP client. The agent can find this Actor and run it for you: ask it for UK Acts and statutory instruments about online safety, with extent, latest revised version, whole-item repeals and outstanding changes, plus the newest amendments to each. AI agents can also pay for runs directly through Apify's agentic payments.
Limits
- The Actor waits 5 seconds between requests, as legislation.gov.uk's robots.txt asks, so details cost about 5 seconds per item.
- Revised legislation may not be fully up to date: outstanding changes are the ones legislation.gov.uk has recorded but not yet applied.
- A whole-item repeal is reported when legislation.gov.uk records it in the title; large Acts are often repealed provision by provision instead.
- Full text is linked (XML, PDF), not copied into rows.
- Only the public legislation.gov.uk data feeds are used, under the Open Government Licence v3.0.
- Title searches require every search word in the delivered title, with simple singular/plural matching. The source can match broader word stems; those rows are skipped without charge. Source match totals can include skipped broad matches.
FAQ
Do I need a legislation.gov.uk API key?
No. legislation.gov.uk's open data needs no key; you only need your Apify account.
Does it cover Scotland, Wales and Northern Ireland?
Yes: Acts of the Scottish Parliament, Senedd Cymru and the Northern Ireland Assembly and their instruments, plus UK Acts and SIs and EU-origin legislation if you select it.
How do I know if a law is in force?
Use wholeRepealed and repealedDate for whole-item repeals, outstandingChanges for changes not yet applied, and the change rows' inForce dates; for section-level status turn on the table of contents.
Can I reuse the data commercially?
Yes. legislation.gov.uk content is Crown copyright under the Open Government Licence v3.0, which allows commercial reuse with attribution: 'Contains public sector information licensed under the Open Government Licence v3.0.'
Related Actors from Zaiq
- company-registry-search: official UK and European company records
- government-tenders-scraper: UK and EU public tenders and awards
- google-news-scraper: news coverage of the same legislation
Support
Questions, a site that changed, or a field you need? Open an issue on this Actor's Issues tab: we answer there, usually within a day.
Also found as: UK legislation API, legislation.gov.uk scraper, UK Acts of Parliament data, statutory instruments search, UK law in force status, legislation changes and amendments, Scottish and Welsh legislation, UK regulations tracker, repealed Acts, commencement orders.