UK Legislation Section Retrieval — legislation.gov.uk
Pricing
from $13.40 / 1,000 completed section retrievals
UK Legislation Section Retrieval — legislation.gov.uk
Retrieve individual sections of UK legislation from the official legislation.gov.uk service.
Pricing
from $13.40 / 1,000 completed section retrievals
Rating
0.0
(0)
Developer
NexGen Watch
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
📚 UK Legislation Section Retrieval — legislation.gov.uk
Retrieve individual sections of UK legislation from the official legislation.gov.uk service. Give it section references; get back, for each, the Act title, section heading, extent, and the section text — the primary source a legal, compliance or policy workflow needs, with a link to the official page.
Output is one section_record row per result; billing is pay-per-event, the value event being one completed section retrieval (a $0.02 start fee per run, then $0.02 per completed section retrieval). Source: www.legislation.gov.uk.
No login, no API key and no CAPTCHA solving are involved: the source is read logged-out with an identified contact User-Agent.
📊 Sample Output
Real rows from run KWr98tFwpJTagUjYF on build 0.1.10 (2026-09-17), the same input as the Quick start below — every value is as the source published it (emails masked, long text shortened):
| input | exists | legislation_type | act_title | section_heading | extent |
|---|---|---|---|---|---|
| ukpga/2010/15/1 | True | ukpga | Equality Act 2010 | Socio-economic inequalities | E+W+S+N.I. |
| ukpga/1998/42/section/6 | True | ukpga | Human Rights Act 1998 | Public authorities | E+W+S+N.I. |
The run finished with the status message: NORMAL: 2 retrieved (0 unavailable, 0 unparseable) of 2 | section-record billable=2 | section-record charged=2
✅ What you get
Each row is flat JSON with these fields (from the dataset schema and the sample run; a field the source does not publish for a given row is null):
record_type(string) — e.g.section_recordinput(string/null) — e.g.ukpga/2010/15/1exists(boolean/null) — e.g.Truelegislation_type(string/null) — e.g.ukpgayear(string/null) — e.g.2010number(string/null) — e.g.15section(string/null) — e.g.1act_title(string/null) — e.g.Equality Act 2010section_heading(string/null) — e.g.Socio-economic inequalitiesextent(string/null) — e.g.E+W+S+N.I.text_blocks(integer/null) — e.g.62section_text(string/null) — e.g.An authority to which this section applies must, when making decisions of a strasource(string/null) — e.g.https://www.legislation.gov.uk/ukpga/2010/15/section/1unavailable_reason(string/null) — null in every sample row
⚙️ Sample inputs
1. Quick start — the Store example (this is what the sample above came from)
{"sections": ["ukpga/2010/15/1","ukpga/1998/42/section/6"]}
The sample run charged exactly: 1 × $0.02 apify-actor-start + 2 × $0.02 section-record = $0.06 on the Free tier — every delivered row was billed.
2. A smaller, narrowed run
{"sections": ["ukpga/2010/15/1","ukpga/1998/42/section/6"]}
A bounded run for checking the field shape before scheduling.
3. A full-size run
{"sections": ["ukpga/2010/15/1","ukpga/1998/42/section/6"]}
The same input run on a schedule; each run is billed only for what it delivers.
🧾 JSON sample record
One real record from run KWr98tFwpJTagUjYF, exactly as it lands in the dataset (emails masked, long text shortened):
{"record_type": "section_record","input": "ukpga/2010/15/1","exists": true,"legislation_type": "ukpga","year": "2010","number": "15","section": "1","act_title": "Equality Act 2010","section_heading": "Socio-economic inequalities","extent": "E+W+S+N.I.","text_blocks": 62,"section_text": "An authority to which this section applies must, when making decisions of a strategic nature about how to exercise its functions, have due regard to the desirability of exercising them in a way that is designed to reduce the inequalities of","source": "https://www.legislation.gov.uk/ukpga/2010/15/section/1","unavailable_reason": null}
🔧 How it works
Transport. Requests go through Apify residential proxy because the source refuses datacenter egress. Every request carries an identified contact User-Agent. Pacing: CRAWL_DELAY_SEC=5.0.
Charging. Each completed section retrieval is charged at the moment it is pushed (section-record); a row that fails to charge is not delivered, so the dataset count always equals the charged count.
What is and is not a retrieval
A completed retrieval is one reference the service resolved — an existing section (with its text) or a well-formed reference the service returns 404 for ("no such section", which is a sourced answer). Both are charged. A malformed reference or a service outage is not a retrieval and is not charged; those rows appear in the "issues" view. A run that retrieves nothing fails loud and charges nothing.
Source & pacing
The official legislation.gov.uk service, queried anonymously (no key). The actor honours the site's Crawl-delay: 5 (one request every 5 seconds) and bounds a run to 40 sections.
What is not done. No login, no cookie or CAPTCHA bypass, no private or personal-account data, no browser automation.
💰 Pricing example
| Event | Free | Bronze | Silver | Gold |
|---|---|---|---|---|
Actor Start (apify-actor-start) | $0.02 | $0.02 | $0.02 | $0.02 |
Completed section retrieval (section-record) | $0.02 | $0.02 | $0.02 | $0.01 |
Worked at the live Free-tier price:
- 2 completed section retrievals: $0.02 start + 2 × $0.02 = $0.06
- 25 completed section retrievals: $0.02 start + 25 × $0.02 = $0.52
- 100 completed section retrievals: $0.02 start + 100 × $0.02 = $2.02
A run that delivers zero rows charges the $0.02 start fee only. A BLOCKED run (source refused) fails loud and charges no value event. The start fee is charged once per GB of run memory; the default run memory is 1024 MB.
Yield on the sample run: NORMAL: 2 retrieved (0 unavailable, 0 unparseable) of 2 | section-record billable=2 | section-record charged=2.
⚖️ Legal & ToS
This actor reads public, logged-out pages and feeds published by www.legislation.gov.uk. It collects only what the source publishes to any visitor, identifies itself with a contact User-Agent, and does not access accounts, private data or anything behind authentication. Use the output in line with the source's terms and your local law; the intended use is B2B research and monitoring.
❓ FAQ
Q: Do I need an API key or a login?
A: No. The source (www.legislation.gov.uk) is read logged-out; the input schema has no key field and the actor carries no secrets.
Q: Why did my run return 0 rows?
A: Read the run's status message. GENUINE_EMPTY means the source was read and had nothing in scope for your input; BLOCKED means the source refused and the run failed without billing a value event — retry later or narrow the input. A zero-row run bills the start fee only.
Q: How fresh is the data?
A: Every run reads the source live at run time; nothing is cached between runs. Put it on a schedule for a continuous feed.
Q: What formats can I export?
A: The dataset downloads as JSON, CSV, Excel, XML or RSS from the run's Dataset tab or the Apify API, and any run can push to a webhook or integration.
Q: How is this different from the other public records lookups actors?
A: Same output shape and billing model; this one covers www.legislation.gov.uk. The siblings under Related Actors cover the other sources or slices — run several on one schedule for a combined feed.
Q: Are there rate limits?
A: The actor paces itself against the source (CRAWL_DELAY_SEC=5.0); there is no per-buyer limit beyond your Apify plan's concurrency.
🆘 Troubleshooting
- Run FAILED with BLOCKED → the source refused the request or changed its page shape → nothing was billed beyond the start fee; retry after a while, and if it persists open an Issue with the run id.
- Fewer rows than expected → the source had fewer items in scope → widen the input.
- Input validation error on start → a field is outside the schema's allowed values → start from the Quick start block and change one field at a time.
- Run TIMED-OUT → a very wide request on a slow day → raise the run timeout in Run options or narrow the input; what was delivered before the timeout is still in the dataset.
- Residential proxy unavailable → the actor falls back to a direct request, which the source refuses → the run fails loud and bills nothing; make sure your plan includes residential proxy.
🔗 Related Actors
- OSHA Safety Search — establishment inspection records — OSHA Safety Search — establishment inspection records
- US Federal Register Rule Event Watch — Rules, proposed rules and notices as they publish in the Federal Register
- 🏢 About NexGenData — NexGen Watch is NexGenData's fleet of 256 public monitoring and lookup actors built on official sources, pay-per-result. Browse the catalog at apify.com/nexgenwatch.
⭐ Found this useful?
If this actor saved you a manual check, a quick review on the Apify Store helps other teams find it. Feature request or a source that changed? Open it from the Issues tab — every one is read.
