GOV.UK Content API
GOV.UK Content API makes it possible to access the data used to render content on https://www.gov.uk (hereafter referred to as GOV.UK). For any page hosted on GOV.UK you can use the path to access the content and associated metadata for a page.
GOV.UK Content API is accessed via HTTP and returns data in a JSON format. The reference documentation details the endpoints and the response format.
What you can do with this API
This API is useful for applications that incorporate content from GOV.UK and for keeping that content up to date. It provides a more accessible and predictable interface than what can be achieved through scraping HTML pages.
You can navigate between content within this API by utilising links. For example, for a page you could access the government organisation that published the page and then navigate to feature policies of that organisation.
What you can’t do with this API
The content within this API is limited to pages hosted on
www.gov.uk and does not include other websites that are
subdomains of gov.uk.
This API includes only the pages on GOV.UK that are available as HTML and does not allow direct access to attachments or images. These files however are associated with their HTML content and can be accessed.
Not all content is available. For example, content that is generated dynamically (such as through a search) is not available. Some types of content may still be being migrated to utilise this API and these could appear as placeholder documents without any content or as redirections to a catch-all content item that represents a group of unmigrated content.
If you wish to access historic content this can currently be done through the National Archives.
Who can use this API
Anyone can use this API for any purpose. There is no need for onboarding or signing any agreements.