UK Legislation Scraper - Acts and Statutory Instruments avatar

UK Legislation Scraper - Acts and Statutory Instruments

Pricing

from $0.80 / 1,000 record scrapeds

Go to Apify Store
UK Legislation Scraper - Acts and Statutory Instruments

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

BowTiedRaccoon

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Features

Limited permissions

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

  1. 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.
  2. The scraper lists every matching Act, instrument or measure.
  3. For each one it reads the dates, extent and subject headings, unless you turn that option off for a faster title-and-reference listing.
  4. With amendments switched on, it also reads which legislation each item amends and is amended by.
  5. Every item is saved as one structured record.

Input

{
"legislationTypes": ["uksi"],
"yearFrom": 2024,
"yearTo": 2024,
"includeDetail": true,
"includeAmendments": false,
"maxItems": 500
}
FieldTypeDefaultDescription
legislationTypesArrayallWhich 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.
yearFromIntegernoneEarliest year to include.
yearToIntegernoneLatest year to include.
titleContainsStringnoneKeep only items whose title contains this text, for example "data protection".
includeDetailBooleantrueAdd dates, extent, subjects, paragraph count and PDF link. Turn off for a faster listing.
includeAmendmentsBooleanfalseAdd the amends and amended_by lists. Slower, because it adds work per record.
maxAmendmentPagesInteger2Pages of changes to read per direction (up to 50 changes per page). Records are flagged amendments_truncated when more exist.
maxItemsInteger10Maximum 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
}
FieldDescription
idStable identifier in the form type/year/number.
titleShort title.
title_welshWelsh-language title of bilingual Welsh legislation.
type, type_nameType code and full type name.
year, numberYear and number within the year (older items use regnal references).
citationOfficial citation as printed, such as 2020 c. 1 or 2020 No. 1.
legislation_urlCanonical page for the item.
full_text_urlFull text as structured XML.
descriptionLong title or summary.
made_dateDate of Royal Assent, enactment or making.
coming_into_force_dateFirst coming-into-force date (Statutory Instruments).
laid_dateDate laid before Parliament (Statutory Instruments).
subjectsSubject headings.
version_statusStatus of the current text: enacted, made, final or revised.
version_dateDate the current version of the text is valid from.
repealedtrue when the whole item is marked repealed.
extentTerritorial extent codes.
territorial_applicationWhere an instrument applies when narrower than its extent.
category, minor_typeprimary or secondary, and the instrument kind.
total_paragraphsNumber of provisions in the text.
pdf_urlOfficial PDF as published.
explanatory_document_*Explanatory Notes or Memorandum PDF and its kind, when published.
amends, amended_byCounterpart 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 legislationTypes empty and raise maxItems. 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 includeDetail off for a plain reference list of titles and links.
  • Amendments: use a small maxItems first. Heavily amended Acts have hundreds of changes, and amendments_truncated tells 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.