UK Legislation Point-in-Time History
Pricing
from $20.00 / 1,000 section processeds
UK Legislation Point-in-Time History
Fetch the full amendment history of any UK Act or Statutory Instrument: every point-in-time version, with computed diffs between amendments.
Pricing
from $20.00 / 1,000 section processeds
Rating
0.0
(0)
Developer
Mitchel Davis
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Share
What does UK Legislation Point-in-Time History do?
This Actor fetches the full amendment history of any UK Act of Parliament or
Statutory Instrument directly from legislation.gov.uk,
the National Archives' official legal database. Give it an act URL — e.g.
https://www.legislation.gov.uk/ukpga/2015/15 (Consumer Rights Act 2015) — and it
automatically discovers every section inside the act, then returns, for each section:
- the current legal text
- every historical point-in-time version, exactly as the law read on each amendment date
- a computed diff summary between consecutive versions (what changed, when, by how much)
No API key, no login, no proxy needed — this runs against a fully open government data source. Use it via the Apify Console, the API, or directly from an MCP client (Claude, Cursor, Windsurf) since this Actor supports Apify's MCP integration.
Why use UK Legislation Point-in-Time History?
- Legal tech & compliance tooling — build a "what does the law say as of this date" feature without maintaining your own scraper against a government XML API.
- AI agents & RAG pipelines — ingest clean, structured UK statute text (not raw XML) for retrieval-augmented generation over legal questions.
- Legislative research — track how a specific provision has evolved since enactment, with exact boundary dates and character-level change summaries.
- Data journalism — quantify how much a law has been amended, and when the amendments happened, without manually diffing PDFs.
How to use UK Legislation Point-in-Time History
- Find the act you want on legislation.gov.uk and
copy its base URL (type/year/number), e.g.
https://www.legislation.gov.uk/ukpga/2015/15. - Paste it into the Act or Statutory Instrument URL input field.
- (Optional) Restrict to specific sections, e.g.
["9", "62"], or leave empty to process the whole act (subject to the Max sections safety cap). - Run the Actor. Results stream into the dataset as each section finishes.
- Export the dataset as JSON, CSV, or Excel, or pull it via the API.
Input
| Field | Type | Description |
|---|---|---|
actUrl | string | Required. The act/SI's legislation.gov.uk URL. |
sections | array of strings | Specific section numbers to fetch. Leave empty to auto-discover every section in the act. |
maxSections | integer | Cap on auto-discovered sections (default 5, 0 = no cap). |
includeFullHistory | boolean | Fetch every point-in-time version (default) vs. just the current text and change dates. |
maxRequestsPerSecond | number | Politeness rate limit against the source. Default and maximum 0.2 (one request every 5 s), matching legislation.gov.uk's robots.txt Crawl-delay: 5. |
See the Input tab for the full JSON schema.
Output
Each dataset item is one section of the act:
{"act_title": "Consumer Rights Act 2015","section": "9","title": "Consumer Rights Act 2015 s.9 — Goods to be of satisfactory quality","version_count": 4,"current_text": "Every contract to supply goods is to be treated as including a term that the quality of the goods is satisfactory...","versions": [{ "valid_from": "2015-10-01", "text": "..." },{ "valid_from": "2024-01-01", "text": "..." }],"changes": [{ "date": "2015-10-01", "type": "INITIAL", "summary": "First recorded version, in force from 2015-10-01." },{ "date": "2024-01-01", "type": "REENACTED", "summary": "New version boundary with no change to visible text." }],"license": "OGL-3.0","attribution": "Contains public sector information licensed under the Open Government Licence v3.0. Source: legislation.gov.uk (The National Archives)."}
You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.
Data table
| Field | Description |
|---|---|
act_title | The full title of the Act or SI |
section | Section number |
title | Act + section number + section heading |
current_text | The current in-force text of the section |
versions | Every point-in-time version, each with its valid_from boundary date |
changes | One entry per version boundary: type (INITIAL/AMENDED/REENACTED) and a plain-language summary |
license / attribution | Required Open Government Licence attribution — include this if you redistribute the data |
Pricing / Cost estimation
This Actor uses Apify pay-per-event pricing: $0.005 per run plus $0.02 per section processed (current text + every point-in-time version + computed diffs). The default input (5 sections) costs $0.105. A 100-section act costs about $2.01. legislation.gov.uk itself is free and keyless.
Speed: requests are capped at one every 5 seconds to respect the site's robots.txt, so expect roughly 25 seconds per section (about 40 minutes for a 100-section act).
Tips
- For a quick single-section check, pass an explicit
sectionsarray — this skips the contents-document discovery step entirely and is the fastest path. - For large acts (500+ sections), raise
maxSectionsdeliberately rather than processing the whole act by default, since some Acts (tax codes, the Companies Act) run into the thousands of sections. - Set
includeFullHistorytofalseif you only need the current text plus the list of amendment dates — this roughly halves the number of requests made.
FAQ, disclaimers & support
- Is this legal advice? No. This Actor returns the text of the law as published by the National Archives. It performs no interpretation, summarization, or "what should you do" analysis. Always verify against the primary source (linked in every record) before relying on it for a legal decision.
- Data licence. All output is UK Crown/Parliamentary copyright material reused under the Open Government Licence v3.0, which permits commercial and non-commercial reuse provided the required attribution (included in every record) is preserved.
- Known limitations. Very large acts (1000+ sections) may hit the
maxSectionscap by default — raise it explicitly if you need the whole act. Schedules and explanatory notes are not currently included, only numbered sections. - Found a bug or need a feature? Open an issue on the Actor's Issues tab.
Built this actor and want to ship your own Apify pay-per-event actor without the silent-$0-charge gotchas? I packaged the working PPE billing pattern (Actor.charge() done right, a pricing calculator, and the 5-minute-health-test fix) into a small starter kit: https://busybusiness.gumroad.com/l/lnvqhh — $19, one-time.