Firecrawl Alexandria

legislation.gov.uk

UK legislation from legislation.gov.uk (The National Archives): search and listing feeds across every legislation type (UK Public General Acts, Statutory Instruments, Scottish, Welsh and Northern Ireland legislation, retained EU law), title-to-identifier lookup, tables of contents, the text of one provision or structural division (section, article, regulation, part, chapter, schedule) in its current, enacted/made or point-in-time version, and the changes-to-legislation register. Reads the site's stateless XML/Atom representations (CLML data.xml, Atom data.feed) under the Open Government Licence v3.0.

Other sites in this stack:GOV.UKCompanies HouseIPO trade marks
1 ready-made skill uses legislation.gov.uk

Try legislation.gov.uk now.

Choose an example or ask your own question.

legislation.gov.uk
TRY ASKING
1Request
numberRequired

number

stringRequired

Legislation type code, e.g. `ukpga`, `uksi`, `asp`, `wsi`, `nisr`, `eur`.

numberRequired

year

string

`enacted` (Acts) or `made` (instruments) for the original text, or a `YYYY-MM-DD` point-in-time date. Omit for the current text.

5 credits
Codefollows the fields above
const result = await firecrawl.scrape({
  alexandria: {
    provider: "legislation-gov-uk",
    capability: "legislation/get_contents",
    options: {
      number: 21,
      type: "ukpga",
      year: 2008,
    },
  },
});
2Response example

This is a sample shape. Press Run to see live data from legislation.gov.uk.

document_class
UnitedKingdomPublicGeneralAct
document_uri
http://www.legislation.gov.uk/ukpga/2008/21
enactment_date
2008-11-13
html_url
https://www.legislation.gov.uk/ukpga/2008/21/contents
id_uri
http://www.legislation.gov.uk/id/ukpga/2008/21
identifier
ukpga/2008/21
long_title
An Act to enable local planning authorities to set requirements for energy use and energy efficiency in local plans.
modified
2026-04-30
number_of_provisions
3
observed_at_ms
1790487996764
restrict_extent
E+W
source_url
https://www.legislation.gov.uk/ukpga/2008/21/contents/data.xml
title
Planning and Energy Act 2008
valid
2026-03-25
version
current
depthdocument_uriextentid_urilevelnumberrefstart_datetitle
0legislation.gov.uk/ukpga/2008/21/section/1E+Wlegislation.gov.uk/id/ukpga/2008/21/section/1item1section-1Energy policies
0legislation.gov.uk/ukpga/2008/21/section/2E+Wlegislation.gov.uk/id/ukpga/2008/21/section/2item2section-2Interpretation
0legislation.gov.uk/ukpga/2008/21/section/3E+Wlegislation.gov.uk/id/ukpga/2008/21/section/3item3section-3Short title and extent
Browse the library
//
Get started
//
Give your agent legislation.gov.uk.
One API key for the live web and every provider in Alexandria.
Are you an AI agent? See setup options