Marketplace
No threads yet
Live

search_uk

legislation.gov.uk

Search official UK legislation on http://legislation.gov.uk by title, year, number, and type. Returns relevance-ordered paginated records with identifiers and all non-empty source metadata and links.

Parameters5
Runs12
Updated10d ago
Operational12 runs · 100% succeeded
30 days agotoday

Playground

Runs on Notte and spends your workspace credits — what comes back is the live response, not a sample.

What is search_uk?

Search official UK legislation on http://legislation.gov.uk by title, year, number, and type. Returns relevance-ordered paginated records with identifiers and all non-empty source metadata and links. It runs on Notte's browser infrastructure and returns structured JSON, so you can call it like any other API — pass title, year, number, type, page and get the result back without maintaining a scraper.

Response

{
  "page": 0,
  "query": {},
  "results": [
    {
      "type": "<string>",
      "year": "<string>",
      "links": [
        {}
      ],
      "title": "<string>",
      "number": "<string>",
      "type_code": "<string>",
      "identifier": "<string>",
      "record_fields": {},
      "legislation_id": "<string>",
      "source_metadata": {}
    }
  ],
  "ordering": "<string>",
  "page_size": 0,
  "start_index": 0,
  "total_pages": 0,
  "total_results": 0
}

Call it

curl --location 'https://us-prod.notte.cc/functions/62783133-3153-4d72-82e2-522baa8ab4a5/runs/start' \
--header 'x-notte-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
    "function_id": "62783133-3153-4d72-82e2-522baa8ab4a5",
    "variables": {
        "title": "data protection",
        "year": "",
        "number": "",
        "type": "primary+secondary",
        "page": 1
    }
}'

Ask an agent

Paste this into Claude Code, Cursor or any MCP client to have an agent call this function for you.

prompt
Use the Anything API MCP server (https://anything.notte.cc/mcp).

Call run(function_id="62783133-3153-4d72-82e2-522baa8ab4a5") — the "search_uk" function, which search official UK legislation on http://legislation.gov.uk by title, year, number, and type. Returns relevance-ordered paginated records with identifiers and all non-empty source metadata and links..

It takes title (str), year (str), number (str), type (str), page (int). Return the result as structured JSON.