UK Legislation Scraper - Acts and Statutory Instruments
Pricing
from $0.80 / 1,000 record scrapeds
UK Legislation Scraper - Acts and Statutory Instruments
The UK statute book as structured records: Acts and Statutory Instruments from Westminster, Scotland, Wales and Northern Ireland, plus retained EU law. Dates, extent, subjects and the amendment trail, ready to filter by type and year.
Pricing
from $0.80 / 1,000 record scrapeds
Rating
0.0
(0)
Developer
BowTiedRaccoon
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
4 days ago
Last modified
Categories
Features
Share
UK Legislation Scraper — Acts and Statutory Instruments
Collects the UK statute book from legislation.gov.uk as structured records: Acts of Parliament, Scottish, Welsh and Northern Ireland legislation, Statutory Instruments, Church measures and retained EU law. Each record carries the reference, title, dates, territorial extent, subject headings and links to the official text, with an optional amendment trail showing which legislation changed which.
UK Legislation Scraper Features
- Covers 30 legislation types in one actor, from UK Public General Acts and Statutory Instruments to Scottish Acts, Welsh Statutory Instruments, Northern Ireland Orders and EU Regulations that still sit on the UK statute book
- Filters by type, year range and title text, so you can pull "every Statutory Instrument made in 2024" or "everything with 'data protection' in the title"
- Returns the enactment or making date, the first coming-into-force date, the date laid before Parliament, territorial extent (for example
E+W+S+N.I.) and the official subject headings - Optional amendment trail: the legislation each item amends and the legislation that amends it, with the number and kind of changes
- Links every record to the official page, the structured full-text XML and the published PDF
- Flat, consistent records that load straight into a spreadsheet, a database or a compliance tool
Who Uses UK Legislation Data?
- Regtech and compliance teams — keep a register of new and changed UK law against the obligations you track
- Policy and public affairs monitors — watch what a department, devolved parliament or subject area enacted this month
- Legal publishers and legal AI teams — build a clean index of the statute book to link, cite and train against
- Law firms and in-house counsel — find every instrument touching a subject, then follow the amendment trail
- Researchers — study legislative volume by year, type and nation
How the UK Legislation Scraper Works
- Choose the legislation types and an optional year range, or leave the types empty to walk the whole statute book, primary legislation first and newest first.
- The scraper lists every matching Act, instrument or measure.
- For each one it reads the dates, extent and subject headings, unless you turn that option off for a faster title-and-reference listing.
- With amendments switched on, it also reads which legislation each item amends and is amended by.
- Every item is saved as one structured record.
Input
{"legislationTypes": ["uksi"],"yearFrom": 2024,"yearTo": 2024,"includeDetail": true,"includeAmendments": false,"maxItems": 500}
| Field | Type | Default | Description |
|---|---|---|---|
legislationTypes | Array | all | Which types to collect, for example ukpga (UK Public General Acts), uksi (UK Statutory Instruments), asp (Acts of the Scottish Parliament), wsi (Welsh Statutory Instruments). Empty means every type. |
yearFrom | Integer | none | Earliest year to include. |
yearTo | Integer | none | Latest year to include. |
titleContains | String | none | Keep only items whose title contains this text, for example "data protection". |
includeDetail | Boolean | true | Add dates, extent, subjects, paragraph count and PDF link. Turn off for a faster listing. |
includeAmendments | Boolean | false | Add the amends and amended_by lists. Slower, because it adds work per record. |
maxAmendmentPages | Integer | 2 | Pages of changes to read per direction (up to 50 changes per page). Records are flagged amendments_truncated when more exist. |
maxItems | Integer | 10 | Maximum number of items to save. |
Example: Acts of the Scottish Parliament passed in 2020
{"legislationTypes": ["asp"],"yearFrom": 2020,"yearTo": 2020,"maxItems": 50}
Output
One record per Act, instrument or measure:
{"id": "uksi/2020/1","title": "The Police Appeals Tribunals Rules 2020","type": "uksi","type_name": "UnitedKingdomStatutoryInstrument","year": 2020,"number": "1","citation": "2020 No. 1","legislation_url": "https://www.legislation.gov.uk/uksi/2020/1","full_text_url": "https://www.legislation.gov.uk/uksi/2020/1/data.xml","description": "These Rules set out the circumstances in which a member of a police force ... may appeal to a police appeals tribunal.","made_date": "2020-01-06","coming_into_force_date": "2020-02-01","laid_date": "2020-01-10","subjects": ["POLICE, ENGLAND AND WALES"],"version_status": "revised","version_date": "2025-05-28","repealed": false,"extent": "E+W","territorial_application": null,"category": "secondary","minor_type": "rule","total_paragraphs": 28,"pdf_url": "https://www.legislation.gov.uk/uksi/2020/1/pdfs/uksi_20200001_en.pdf","explanatory_document_url": "https://www.legislation.gov.uk/uksi/2020/1/pdfs/uksiem_20200001_en.pdf","explanatory_document_type": "UK Explanatory Memorandum","isbn": "9780111191835","published": "2020-01-10T00:00:00+00:00","last_updated": "2025-06-10T12:00:00+01:00","amends": [{ "id": "uksi/2012/2630", "title": "The Police Appeals Tribunals Rules 2012", "url": "https://www.legislation.gov.uk/uksi/2012/2630", "effects": 1, "effect_types": ["revoked"] }],"amended_by": [],"amendments_truncated": false}
| Field | Description |
|---|---|
id | Stable identifier in the form type/year/number. |
title | Short title. |
title_welsh | Welsh-language title of bilingual Welsh legislation. |
type, type_name | Type code and full type name. |
year, number | Year and number within the year (older items use regnal references). |
citation | Official citation as printed, such as 2020 c. 1 or 2020 No. 1. |
legislation_url | Canonical page for the item. |
full_text_url | Full text as structured XML. |
description | Long title or summary. |
made_date | Date of Royal Assent, enactment or making. |
coming_into_force_date | First coming-into-force date (Statutory Instruments). |
laid_date | Date laid before Parliament (Statutory Instruments). |
subjects | Subject headings. |
version_status | Status of the current text: enacted, made, final or revised. |
version_date | Date the current version of the text is valid from. |
repealed | true when the whole item is marked repealed. |
extent | Territorial extent codes. |
territorial_application | Where an instrument applies when narrower than its extent. |
category, minor_type | primary or secondary, and the instrument kind. |
total_paragraphs | Number of provisions in the text. |
pdf_url | Official PDF as published. |
explanatory_document_* | Explanatory Notes or Memorandum PDF and its kind, when published. |
amends, amended_by | Counterpart legislation with change counts and kinds (only with includeAmendments). |
Some fields are empty where the publisher does not record them. Many recently made Statutory Instruments have no making date or extent yet, and amends/amended_by stay empty unless you turn amendments on.
Tips
- Whole statute book: leave
legislationTypesempty and raisemaxItems. The corpus is several hundred thousand items, so long runs are normal. Narrow by type and year to refresh just the part you track. - Keeping up with new law: filter to the current year and schedule a weekly run.
- Speed: switch
includeDetailoff for a plain reference list of titles and links. - Amendments: use a small
maxItemsfirst. Heavily amended Acts have hundreds of changes, andamendments_truncatedtells you when a list was cut at your page limit.
FAQ
Does it need an account or API key? No. It reads the public statute book.
Is the text itself included? Each record links the official full text as structured XML and the published PDF. The record carries the metadata, not the whole body of the Act.
Does it show whether an Act has been repealed?
version_status reports the state of the current text, and amended_by shows the legislation that changed or repealed an item. It does not give a single in-force or repealed flag.
Is the data current?
Yes. Records reflect the publisher's statute book at the time of the run, and last_updated shows when each item last changed.
Can I schedule it? Yes. Use Apify schedules to run weekly, filtered to the types and years you follow.