get_uk_section_text
legislation.gov.ukGet the readable text for a specific section, part, or schedule of UK legislation from http://legislation.gov.uk using the official XML source. Returns provision text with annotation markers plus full amendment/commentary annotation entries.
Playground
Runs on Notte and spends your workspace credits — what comes back is the live response, not a sample.
What is get_uk_section_text?
Get the readable text for a specific section, part, or schedule of UK legislation from http://legislation.gov.uk using the official XML source. Returns provision text with annotation markers plus full amendment/commentary annotation entries. It runs on Notte's browser infrastructure and returns structured JSON, so you can call it like any other API — pass legislation_id, section_path, include_annotations, timeout_seconds and get the result back without maintaining a scraper.
Response
{
"text": "<string>",
"paragraphs": [
"<string>"
],
"source_url": "<string>",
"annotations": [
{
"text": "<string>",
"label": "<string>",
"attributes": {},
"annotation_id": "<string>",
"annotation_type": "<string>"
}
],
"section_path": "<string>",
"source_title": "<string>",
"provision_tag": "<string>",
"legislation_id": "<string>",
"annotation_count": 0,
"provision_id_uri": "<string>",
"source_attributes": {},
"provision_attributes": {},
"provision_document_uri": "<string>",
"referenced_annotation_ids": [
"<string>"
]
}Call it
curl --location 'https://us-prod.notte.cc/functions/50569923-9fec-49f4-9ed9-ce5475493821/runs/start' \
--header 'x-notte-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"function_id": "50569923-9fec-49f4-9ed9-ce5475493821",
"variables": {
"legislation_id": "ukpga/2018/12",
"section_path": "section/1",
"include_annotations": true,
"timeout_seconds": 25
}
}'Ask an agent
Paste this into Claude Code, Cursor or any MCP client to have an agent call this function for you.
Use the Anything API MCP server (https://anything.notte.cc/mcp). Call run(function_id="50569923-9fec-49f4-9ed9-ce5475493821") — the "get_uk_section_text" function, which get the readable text for a specific section, part, or schedule of UK legislation from http://legislation.gov.uk using the official XML source. Returns provision text with annotation markers plus full amendment/commentary annotation entries.. It takes legislation_id (str), section_path (str), include_annotations (bool), timeout_seconds (int). Return the result as structured JSON.