v1
latestOpenAPI 3.0.02026-07-141321.3 KBLookup GOV.UK content by path
This is the primary interface to lookup the content required to render a page on GOV.UK
It accepts an input of the path of the page you are looking up. For example, if you were looking up travel advice for Thailand which is hosted on GOV.UK at https://www.gov.uk/foreign-travel-advice/thailand you would make a request to https://www.gov.uk/api/content/foreign-travel-advice/thailand.
If the content is available at the requested path you will receive a ContentItem containing the structured data for that page.
In the GOV.UK context, content schemas are structured rules that define what a specific type of content can contain and how it's organised. Think of them as a strict blueprint or a template for every piece of information published on GOV.UK. These schemas ensure that all content is consistent, predictable, and machine-readable.
Each schema is a formal definition, written in JSON Schema, that specifies the underlying structure for a content type. For example, a schema for a "News Article" would define all the possible fields for that article, such as:
- title: A mandatory text field with a maximum character limit.
- summary: A mandatory short description.
- body: The main content of the article, which itself must conform to the rules of Govspeak (GOV.UK's version of Markdown).
- publication_date: A mandatory field that must be in a valid date format.
- image: An optional field that must contain specific sub-fields like a URL and alt text.
- related_links: A list where each item must have a title and a URL.
By enforcing these rules, schemas guarantee that every news article across GOV.UK has the same fundamental structure.
Path parameters
The path to the content on GOV.UK e.g for https://www.gov.uk/vat-rates you'd use vat-rates
Response
A content item is available at that path.
Example response
{
"$ref": "#/components/examples/ContentItemExample"
}