> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# GOV.UK

> The UK government's GOV.UK site as data: the Content API returns any www.gov.uk page as JSON, and the Search API searches, filters and aggregates all GOV.UK content.

![](https://mintcdn.com/webrouter/gPu3tCeozwRcDBjt/logo/data-apis/gov-uk.svg?fit=max\&auto=format\&n=gPu3tCeozwRcDBjt\&q=85\&s=4d1d1d0b1f735bc8d4d64a2dfe3597bb)

[Web Catalog · Government](https://docs.webrouter.net/data-apis.md?category=government)

No key needed

Endpoints

2

Auth

None

[Vendor docs](https://content-api.publishing.service.gov.uk/)

## Notes

* Free and keyless; no onboarding or agreement.
* Content API: at most 10 requests per second per client; above that requests queue and may time out.
* The Content API covers HTML pages on [www.gov.uk](http://www.gov.uk) only (not other gov.uk subdomains, not attachments or images, not dynamic pages such as search results) and is marked beta.
* Responses are JSON.

## Endpoints

GET

Search GOV.UK content

Documents on GOV.UK matching a query and filters, with title, description, link and other chosen fields.

[Open](#gov-uk-search)

GET

Get a GOV.UK page as JSON

The structured content and metadata of one www\.gov.uk page, by its path.

[Open](#gov-uk-content-get)

### Search GOV.UK content

GET

`/api/search.json`

`gov-uk.search`

Documents on GOV.UK matching a query and filters, with title, description, link and other chosen fields.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`q`</td><td>string</td><td>query</td><td>Search query; any UTF-8 text. Example `taxes`</td></tr>
    <tr><td>`count`</td><td>integer</td><td>query</td><td>Results to return: default 10, maximum 1500; 0 returns only aggregates. Example `10`</td></tr>
    <tr><td>`start`</td><td>integer</td><td>query</td><td>0-based offset into the results, for paging. Example `0`</td></tr>
    <tr><td>`order`</td><td>string</td><td>query</td><td>Field to sort on, '-' prefix for descending (e.g. -public\_timestamp). Default: relevance with q, most viewed in 14 days without. Example `-public_timestamp`</td></tr>
    <tr><td>`fields`</td><td>array</td><td>query</td><td>Fields to return instead of the default set, e.g. title, description, link. Example `["title", "description", "link"]`</td></tr>
    <tr><td>`filter_organisations`</td><td>array</td><td>query</td><td>Only documents tagged to any of these organisation slugs. Example `["cabinet-office"]`</td></tr>
    <tr><td>`reject_organisations`</td><td>array</td><td>query</td><td>Exclude documents tagged to these organisation slugs. Example `["government-digital-service"]`</td></tr>
    <tr><td>`filter_format`</td><td>string</td><td>query</td><td>Only documents of this format, e.g. transaction, person. Example `transaction`</td></tr>
    <tr><td>`filter_content_store_document_type`</td><td>string</td><td>query</td><td>Only documents of this content store document type. Example `transaction`</td></tr>
    <tr><td>`filter_public_timestamp`</td><td>string</td><td>query</td><td>Date range on publication time: 'from:\<date>', 'to:\<date>' or both comma-separated; ISO dates, UTC, inclusive. Example `from:2020-01-01,to:2020-12-31`</td></tr>
    <tr><td>`aggregate_organisations`</td><td>string</td><td>query</td><td>Group matches by organisation: a limit, then optional comma-separated options (scope:, order:, examples:, example\_scope:, example\_fields:). Example `10`</td></tr>
  </tbody>
</table>

[Vendor docs](https://github.com/alphagov/search-api/blob/main/docs/using-the-search-api.md) · Same job: [Andi AI Search](https://docs.webrouter.net/data-apis/andi.md#andi-search), [Apify](https://docs.webrouter.net/data-apis/apify.md#apify-store-search), [Context.dev](https://docs.webrouter.net/data-apis/branddev.md#branddev-web-search), [Brave Search](https://docs.webrouter.net/data-apis/bravesearch.md#bravesearch-videos-search), [BytePlus Searchinfinity](https://docs.webrouter.net/data-apis/byteplus-search.md#byteplus-search-web-search), [Crawl4AI Cloud](https://docs.webrouter.net/data-apis/crawl4ai.md#crawl4ai-search)

```python Python theme={null}
router.call_data_api("gov-uk.search", {'q': 'taxes', 'count': 10, 'start': 0, 'order': '-public_timestamp', 'fields': ['title', 'description', 'link'], 'filter_organisations': ['cabinet-office'], 'reject_organisations': ['government-digital-service'], 'filter_format': 'transaction', 'filter_content_store_document_type': 'transaction', 'filter_public_timestamp': 'from:2020-01-01,to:2020-12-31', 'aggregate_organisations': '10'})
```

```text MCP theme={null}
call_data_api(endpoint="gov-uk.search", params={"q": "taxes", "count": 10, "start": 0, "order": "-public_timestamp", "fields": ["title", "description", "link"], "filter_organisations": ["cabinet-office"], "reject_organisations": ["government-digital-service"], "filter_format": "transaction", "filter_content_store_document_type": "transaction", "filter_public_timestamp": "from:2020-01-01,to:2020-12-31", "aggregate_organisations": "10"})
```

> [!NOTE]
>
> * Unknown parameters or invalid values return HTTP 422.
> * Any field can be filtered with filter\_\<field> or excluded with reject\_\<field>; filter\_any\_/filter\_all\_ variants exist for multivalued fields. Only the common ones are named here; others need a raw call.
> * A start past the end returns no results and no error.

### Get a GOV.UK page as JSON

GET

`/api/content/{page_path}`

`gov-uk.content.get`

The structured content and metadata of one www\.gov.uk page, by its path.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`page_path` required</td><td>string</td><td>path</td><td>The page's path on www\.gov.uk without the leading slash, as one segment (e.g. take-pet-abroad for https\://www\.gov.uk/take-pet-abroad). Example `take-pet-abroad`</td></tr>
  </tbody>
</table>

[Vendor docs](https://content-api.publishing.service.gov.uk/) · Same job: [Andi AI Search](https://docs.webrouter.net/data-apis/andi.md#andi-fetch), [Context.dev](https://docs.webrouter.net/data-apis/branddev.md#branddev-web-scrape), [Brave Search](https://docs.webrouter.net/data-apis/bravesearch.md#bravesearch-llm-context), [BytePlus Searchinfinity](https://docs.webrouter.net/data-apis/byteplus-search.md#byteplus-search-fetch), [cloro](https://docs.webrouter.net/data-apis/cloro.md#cloro-google-product), [Context7](https://docs.webrouter.net/data-apis/context7.md#context7-page-fetch)

```python Python theme={null}
router.call_data_api("gov-uk.content.get", {'page_path': 'take-pet-abroad'})
```

```text MCP theme={null}
call_data_api(endpoint="gov-uk.content.get", params={"page_path": "take-pet-abroad"})
```

> [!NOTE]
>
> * The path value is URL-encoded as a single segment, so a nested page path (with slashes) needs a raw call to /api/content/\<path>.
> * Some items are placeholders or redirects to a catch-all item.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.