# legislation.gov.uk API: Get UK law section

> Gets the latest available revised text of a section of a UK Act from legislation.gov.uk, or the Act's section contents when no section is given. The outstanding-changes flag describes the Act and may include changes outside the selected section.

Unofficial. Not affiliated with or endorsed by legislation.gov.uk.

- Page: https://fous.com/methods/legislation.gov.uk/get-law-section
- Method: `legislation.gov.uk/get_law_section`, version 1
- Website: legislation.gov.uk
- Returns: title, year, chapter, section heading and text, in force, extent, outstanding changes, version date, link, contents
- Effect: read (it gets data and changes nothing)
- Sign-in: none needed
- Cost: 1 credit per completed run (1¢ with pay as you go); failed runs are free
- Verified: Nov 2, 2026

## Inputs

| Field | Type | Required | In the run below | Description |
|---|---|---|---|---|
| `act` | string | yes | `"Equality Act 2010"` | Act title, with year if known; for example, Equality Act 2010. A legislation.gov.uk Act link or ID also works. |
| `section` | string | no |  | Section number, such as 13. Leave blank to get the Act contents. Default "". |

## Output

From a run on Oct 31, 2026, shortened. Its input:

```json
{
  "act": "Equality Act 2010"
}
```

Its output:

```json
{
  "link": "https://www.legislation.gov.uk/ukpga/2010/15/contents",
  "text": null,
  "year": 2010,
  "title": "Equality Act 2010",
  "extent": null,
  "heading": null,
  "contents": [
    {
      "link": "https://www.legislation.gov.uk/ukpga/2010/15/section/1",
      "number": "1",
      "heading": "Public sector duty regarding socio-economic inequalities"
    },
    {
      "link": "https://www.legislation.gov.uk/ukpga/2010/15/section/2",
      "number": "2",
      "heading": "Power to amend section 1"
    },
    {
      "link": "https://www.legislation.gov.uk/ukpga/2010/15/section/3",
      "number": "3",
      "heading": "Enforcement"
    }
  ],
  "in_force": null,
  "version_date": null,
  "chapter_number": 15,
  "section_number": null,
  "prospective_note": null,
  "changes_still_to_be_applied": null
}
```

## Run it

From code, with a Fous API key in `FOUS_API_KEY`; the answer's `data` holds the output:

```bash
curl https://api.fous.com/v1/runs \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"legislation.gov.uk/get_law_section","input":{"act":"Equality Act 2010"}}'
```

From an AI agent connected to the Fous MCP server: its `run` with the same method and input. To connect one, give it `set up https://fous.com/SKILL.md`.

## Ask your agent

- What does section 13 of the Equality Act 2010 say right now? I need the current revised wording on direct discrimination.
- Pull up the table of contents for the Data Protection Act 2018 so I can see how the sections are organised.
- Is section 21 of the Housing Act 1988 still in force, and does it extend to Scotland? Check legislation.gov.uk for the latest version.
- Get me the up-to-date text of s.1 of the Theft Act 1968, including whether there are any outstanding amendments not yet applied to the Act.
- I need the revised version of section 98 of the Employment Rights Act 1996 from legislation.gov.uk, plus the version date and a link to it.

## Input schema

```json
{
  "type": "object",
  "required": [
    "act"
  ],
  "properties": {
    "act": {
      "type": "string",
      "description": "Act title, with year if known; for example, Equality Act 2010. A legislation.gov.uk Act link or ID also works."
    },
    "section": {
      "type": "string",
      "default": "",
      "description": "Section number, such as 13. Leave blank to get the Act contents."
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "required": [
    "title",
    "year",
    "chapter_number",
    "section_number",
    "heading",
    "text",
    "in_force",
    "prospective_note",
    "extent",
    "changes_still_to_be_applied",
    "version_date",
    "link",
    "contents"
  ],
  "properties": {
    "link": {
      "type": "string"
    },
    "text": {
      "type": [
        "string",
        "null"
      ]
    },
    "year": {
      "type": "integer"
    },
    "title": {
      "type": "string"
    },
    "extent": {
      "type": [
        "string",
        "null"
      ]
    },
    "heading": {
      "type": [
        "string",
        "null"
      ]
    },
    "contents": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "required": [
          "number",
          "heading",
          "link"
        ],
        "properties": {
          "link": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "heading": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "in_force": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "version_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "chapter_number": {
      "type": "integer"
    },
    "section_number": {
      "type": [
        "string",
        "null"
      ]
    },
    "prospective_note": {
      "type": [
        "string",
        "null"
      ]
    },
    "changes_still_to_be_applied": {
      "type": [
        "boolean",
        "null"
      ]
    }
  },
  "additionalProperties": false
}
```

## See more

- [legislation.gov.uk API: Search UK legislation](https://fous.com/methods/legislation.gov.uk/search-legislation.md): Search UK legislation by topic or title, with optional type and year filters. Closest title matches appear first; broader text matches fill remaining places.
- [Congress.gov API: Get bill](https://fous.com/methods/congress.gov/get-bill.md): Gets the status, official summary, titles, actions and related bills for one U.S. bill on Congress.gov, found by popular name, title, number or link. A missing summary or text is returned as null.
- [European Union API: Get EU law article](https://fous.com/methods/eur-lex.europa.eu/get-law-article.md): Gets the official text and key dates of one article of an EU regulation or directive from EUR-Lex, in the latest consolidated version when there is one, in any official EU language.
- [BBC News API: Read article](https://fous.com/methods/bbc.com/read-article.md): Reads the text and details of a BBC News article from its link or headline. Live coverage pages return the latest entries available.
- [BBC News API: List headlines](https://fous.com/methods/bbc.com/list-headlines.md): Lists the article headlines shown on a BBC News section page, in page order, with summary, publish time, authors, image and link.
- [The Guardian API: List headlines](https://fous.com/methods/theguardian.com/list-headlines.md): Lists the stories on a Guardian section front (top stories, world, UK, US, business, environment, technology, sport or culture) in page order, with the summary and image shown on the front, the publication time (as displayed, else from the story page), and each story's section and authors from its page.
- [eCFR API: Get regulation sections](https://fous.com/methods/ecfr.gov/get-regulation.md): Finds current eCFR regulation sections for a topic or an exact CFR citation. Returns each section's text, last amendment date and the date the title is current through.
- [The Guardian API: Read article](https://fous.com/methods/theguardian.com/read-article.md): Reads one public Guardian article by link or headline and returns its details and available full-text paragraphs. Live blogs return the latest entries shown on the page; some older articles may be unavailable.
- [All legislation.gov.uk methods](https://fous.com/methods/legislation.gov.uk.md)
