# This is an OpenAPI Specification (https://swagger.io/specification/) # for the nhs-website-content-api owned by NHS England (https://digital.nhs.uk/) openapi: "3.0.0" info: title: "NHS Website Content API v2" version: "Computed and injected at build time by `scripts/set_version.py`" description: | ## Overview ### Spec change demo This API provides content from the [NHS website](https://www.nhs.uk) as JSON, to be consumed programmatically and used by your application. Before April 2025, the Conditions A to Z contained a broad mix of content including conditions, symptoms, tests, treatments, and baby-related information. This has been reorganized into a new Health A to Z hub with content logically grouped into dedicated sections. The April 2025 update introduces new endpoints for 'health-a-to-z', 'health-a-to-z/conditions', 'symptoms', 'tests-and-treatments', 'baby' and 'social-care-and-support' that reflect the reallocation of these pages to new A to Z pages on the website. You can reuse the content from the following sections of the NHS website: * Health A to Z ([Website](https://www.nhs.uk/health-a-to-z/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/health-a-to-z)) * Health A to Z - Common topics ([Website](https://www.nhs.uk/health-a-to-z/conditions/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/health-a-to-z/conditions)) * Conditions A to Z ([Website](https://www.nhs.uk/conditions/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/conditions)) * Symptoms A to Z ([Website](https://www.nhs.uk/symptoms/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/symptoms)) * Tests and treatments A to Z ([Website](https://www.nhs.uk/tests-and-treatments/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/tests-and-treatments)) * Medicines A to Z ([Website](https://www.nhs.uk/medicines/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/medicines)) * Mental health ([Website](https://www.nhs.uk/mental-health/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/mental-health)) * Live Well ([Website](https://www.nhs.uk/live-well/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/live-well)) * Pregnancy ([Website](https://www.nhs.uk/pregnancy/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/pregnancy)) * NHS services ([Website](https://www.nhs.uk/nhs-services/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/nhs-services)) * Contraception ([Website](https://www.nhs.uk/contraception/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/contraception)) * Vaccinations ([Website](https://www.nhs.uk/vaccinations/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/vaccinations)) * Women's health ([Website](https://www.nhs.uk/womens-health/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/womens-health)) * Social care and support ([Website](https://www.nhs.uk/social-care-and-support/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/social-care-and-support)) * Baby ([Website](https://www.nhs.uk/baby/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/baby)) You cannot use this API to: * [find services near you](https://www.nhs.uk/nhs-services/services-near-you/) * get Ratings and Reviews of NHS services. If you are migrating from our [old NHS website APIs](https://developer.api.nhs.uk/nhs-api), we have a [migration guide](https://developer.api.nhs.uk/support/migration/guide) to help walk you through the process and a [migration assistant](https://developer.api.nhs.uk/support/migration/assistant) to illustrate the differences in how your API requests will need to be updated. ## Updates | Version | Date | Changes | |------------|-----|--------------| | 2.2.0 | April 2025 | Introduce `symptoms` and `tests-and-treatments` endpoints | ## Who can use this API Anyone can use this API for any purpose, so long as they have agreed to the [Online connection agreement](https://digital.nhs.uk/developer/guides-and-documentation/online-connection-agreement) during the [onboarding process](https://digital.nhs.uk/developer/guides-and-documentation/onboarding-process) and they include an [attribution](#overview--attribution) as outlined below. ## Attribution Any syndicated content must incorporate the following attribution (credit) to the NHS website: Content supplied by the NHS website The logo should be clearly visible and in line with the associated content on every web page that contains the syndicated content. You should also link this logo to the relevant page on the NHS website that the content has been supplied from. ``` Content supplied by the NHS website ``` The logo image URL is supplied as part of the JSON response under author: ``` "author": { "url": "https://www.nhs.uk", "logo": "https://assets.nhs.uk/nhsuk-cms/images/nhs-attribution.width-510.png", "email": "nhswebsite.servicedesk@nhs.net", "@type": "Organization", "name": "NHS website" } ``` If you are displaying NHS syndicated content in a context where a functional link back to the article on the NHS website is not possible then you should use the following attribution (credit): ```

From www.nhs.uk

``` ## Modularised content The standard content available through our syndication service is based on the full pages on the NHS website. With our modularised content, you can instead choose to use shorter, more specific sections of content (called "modules") from our pages. This means you can show your users only the content that's most relevant to them. You can also use this content more easily in services like apps and voice assistants. ### Benefits of our modularised content 1. **More relevant content for users** — Users do not always want or need full pages of content. With our modularised content, you can choose exactly what your users get. 2. **Suitable for a range of services** — Short, specific content modules can be used more easily than full web pages in services like apps, chatbots and voice assistants. 3. **Clinical assurance** — Each module is checked by NHS clinicians before being made available and carries the trusted NHS brand. ### Available labels / health aspects We create modules by adding labels (health aspects) to sections of content on our web pages. For example, on our medical condition pages we have labels (health aspects) for sections on "Overview", "Symptoms", "Treatments", "Causes" and more. These labels (health aspects) are based on international standards for structured data from [Schema.org](https://schema.org/HealthAspectEnumeration). Before being made available, each module is checked by our clinical team to make sure it remains accurate and safe to use in isolation.

List of health aspects

Here are the 31 health aspects that we currently have available for modularisation, in order of frequency of use:

  • OverviewHealthAspect
  • SymptomsHealthAspect
  • TreatmentsHealthAspect
  • CausesHealthAspect
  • MedicalHelpNonurgentHealthAspect
  • SelfCareHealthAspect
  • MedicalHelpUrgentHealthAspect
  • MedicalHelpEmergencyHealthAspect
  • DiagnosisHealthAspect
  • PreventionHealthAspect
  • SideEffectsHealthAspect
  • LivingWithHealthAspect
  • SuitabilityHealthAspect
  • InteractionsHealthAspect
  • UsageOrScheduleHealthAspect
  • PregnancyHealthAspect
  • RisksOrComplicationsHealthAspect
  • PrognosisHealthAspect
  • BenefitsHealthAspect
  • ContagiousnessHealthAspect
  • WhatHappensHealthAspect
  • PreparationHealthAspect
  • ResultsHealthAspect
  • TypesHealthAspect
  • ContraindicationsHealthAspect
  • GettingAccessHealthAspect
  • WarningHealthAspect
  • EffectivenessHealthAspect
  • HowItWorksHealthAspect
  • IngredientsHealthAspect
### Getting modularised content To get modularised content, you can use the boolean `modules` query parameter in the [conditions/*](#get-/conditions/*) and [medicines/*](#get-/medicines/*) endpoints. This will return the modularised version of the page (if there is one). If the requested page has not been modularised, the full page will be returned. You can get a list of which pages have (and have not) been modularised and which health aspects they contain by calling the `/manifest/pages/` endpoint. ## Schema page types Throughout the NHS website we have a couple of page models which are defined using the `@type` property. It is a good thing to implement each page type into your product, as multiple page types can be used within in a single genre (conditions, live-well, medicines, etc). 1. **WebPage** — This is the default type and is [defined by Schema.org](https://schema.org/WebPage) 2. **MedicalWebPage** — A web page that provides medical information and is [defined by Schema.org](https://schema.org/MedicalWebPage) Here is a list of properties for each schema page type we are currently using: | WebPage | MedicalWebPage | | ---------------- | ------------------- | | @context | @context | | @type | @type | | name | name | | copyrightHolder | copyrightHolder | | license | license | | author | author | | about | about | | description | description | | url | url | | genre | genre | | keywords | keywords | | dateModified | dateModified | | lastReviewed | lastReviewed | | breadcrumb | breadcrumb | | hasPart | hasPart | | relatedLink | relatedLink | | contentSubTypes | contentSubTypes | | mainEntityOfPage | mainEntityOfPage | | | alternativeHeadline | It is worth noting that the `genre` property is what we use to define which section the article sits in, and the `@type` is used to define how that article is structured. ## API status This API has moved from the [NHS website developer portal](https://developer.api.nhs.uk/). It is currently [in production](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses). ## Service level This API is a [bronze service](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#service-levels). ## Technology This API is [RESTful](https://digital.nhs.uk/developer/guides-and-documentation/our-api-technologies#basic-rest). Page objects conform to global [schema.org](https://schema.org/) standards. ## Network access This API is available on the internet and, indirectly, on the [Health and Social Care Network (HSCN)](https://digital.nhs.uk/services/health-and-social-care-network). To use this API with [NHS smartcards](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/nhs-smartcards-for-developers), the end user needs an HSCN connection, although internet-facing alternatives to smartcards are available. For more details see [Network access for APIs](https://digital.nhs.uk/developer/guides-and-documentation/network-access-for-apis). ## Security and authorisation This API use the [Application-restricted RESTful API - API key authentication](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/application-restricted-restful-apis-api-key-authentication) security pattern, meaning we authenticate the calling application but not the end user. When calling the Integration Test environment or Production environment, you must provide a valid `apikey` in your request header. To obtain an API key for each of these environments you must sign in to the [NHS Digital Onboarding Service - Developer account](https://onboarding.prod.api.platform.nhs.uk/Index) and register your application to be granted [environment access](https://onboarding.prod.api.platform.nhs.uk/MyApplications). Your API keys will look something like: `XW7DGBVQzO0yPKdPbRXeqITzbdJ1jNh7` (example apikey) NOTE: You will not need the 'Secret', and you don't need to specify a 'Public key URL' or a 'Callback URL' to use this API. ## Errors We use standard HTTP status codes to show whether an API request succeeded or not. They are usually in the range: * 200 to 299 if it succeeded, including code 202 if it was accepted by an API that needs to wait for further action * 400 to 499 if it failed because of a client error by your application * 500 to 599 if it failed because of an error on our server. Errors specific to each endpoint are shown in the endpoints section, under response. See our [reference guide](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#http-status-codes) for more on errors. ## Environments and testing | Environment | Base URL | | ----------------- | ---------------------------------------------------------------------- | | Sandbox | `https://sandbox.api.service.nhs.uk/nhs-website-content/` | | Development | Not used | | Integration test | `https://int.api.service.nhs.uk/nhs-website-content/` | | Production | `https://api.service.nhs.uk/nhs-website-content/` | ### Sandbox environment Our [sandbox environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#sandbox-testing): * is for early developer testing * only covers a limited set of scenarios * is open access, so does not allow you to test authorisation (you do not need to provide an `apikey` in the request header) * is [rate limited](#overview--usage-caps)

The sandbox environment includes the following 77 mocked endpoints

API v2 root

Manifest pages

Health A to Z

Conditions A to Z - Common topics

Conditions (Health A to Z)

Symptoms A-Z

Tests and Treatments A-Z

Medicines

Mental health

Live Well

Pregnancy

NHS Services

Contraception

Vaccinations

Women's health

Social care and support

Baby

For details of sandbox test scenarios, or to try out the sandbox using our 'Try this API' feature, see the documentation for each endpoint. Alternatively, you can try out the sandbox using our Postman collection: [![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/36572637-700d4550-5fd8-495d-8a4a-8e7c84324497) ### Integration test environment Our [integration test environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing): * is for formal integration testing * includes authorisation via an API Key, which can be obtained from the [NHS Digital Onboarding Service - Developer account](https://onboarding.prod.api.platform.nhs.uk/Index). This will be different from your Production environment API key. * has a restricted [rate limit](#overview--usage-caps) Here is an example cURL request, calling the integration test environment ``` curl -X GET 'https://int.api.service.nhs.uk/nhs-website-content/conditions/' \ -H 'Content-Type: application/json' \ -H 'apikey: YOUR_INTEGRATION_TEST_ENVIRONMENT_APIKEY_GOES_HERE' ``` For more details see [integration testing with our RESTful APIs](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing-with-our-restful-apis). ### Production environment Our production environment: * requires you to get your [application/product onboarded](#overview--onboarding) and approved by us * is to be used by your production application * includes authorisation via an API Key, which can be obtained from the [NHS Digital Onboarding Service - Developer account](https://onboarding.prod.api.platform.nhs.uk/Index). This will be different from your Integration test environment API key. * has a higher [rate limit](#overview--usage-caps) Here is an example cURL request, calling the production environment ``` curl -X GET 'https://api.service.nhs.uk/nhs-website-content/conditions/' \ -H 'Content-Type: application/json' \ -H 'apikey: YOUR_PRODUCTION_ENVIRONMENT_APIKEY_GOES_HERE' ``` ## Onboarding You need to get your software approved by us before it can go live with this API. We call this onboarding. During this process you will be asked agree to the [Online connection agreement](https://digital.nhs.uk/developer/guides-and-documentation/online-connection-agreement). You can [submit your application/product for onboarding](https://onboarding.prod.api.platform.nhs.uk/Products) using the [Digital Onboarding Service](https://onboarding.prod.api.platform.nhs.uk/Index) Once all your onboarding responses have been approved, we will enable the 'NHS Website Content API' for your Production application. ## Caching Caching of all responses from the NHS website content API is recommended, and you should do so where possible, unless otherwise notified to you by NHS Digital. The cached data should be refreshed no less than once every 7 days. If instructed to refresh cached NHS website content, you must do so immediately. ## Usage caps Calls to this API are rate limited as follows: | Environment | Rate limit | | ----------------- | ------------------------------- | | Sandbox | 60 requests per minute | | Integration test | 120 requests per minute | | Production | 1200 requests per minute | ## Developer Community If you require any assistance understanding or using the NHS Website Content API please visit [our dedicated category](https://developer.community.nhs.uk/c/nhs-website-content-api/41) within the [Developer Community](https://developer.community.nhs.uk/). This is where you can post your questions and get help from both NHS developer support staff and other community members. When starting a new topic, we recommend you select the category `NHS Website Content API`. contact: name: "NHS Website Content API v2 Support" url: "https://digital.nhs.uk/developer/help-and-support" email: api.management@nhs.net servers: - url: "https://sandbox.api.service.nhs.uk/nhs-website-content" description: Sandbox environment. - url: "https://int.api.service.nhs.uk/nhs-website-content" description: Integration test environment. - url: "https://api.service.nhs.uk/nhs-website-content" description: Production environment. security: - apikey: [] paths: /manifest/pages: parameters: - $ref: "#/components/parameters/page" get: summary: Get details about all the pages operationId: get-manifest-pages description: | ## Overview Use this endpoint to get details of all the pages available via the NHS Website Content API v2. This includes details such as name, description, url, webpage, modification date and whether the page has been modularised. Passing in no parameters returns the first page of results. The response is limited to 100 results and is paginated. responses: "200": description: | A valid query for manifest pages. content: application/json: schema: $ref: components/schemas/ManifestPages.json example: $ref: components/examples/ManifestPages.json "4XX": description: | An error occurred as follows: | HTTP status | Error code | Description | | ----------- | -------------------------- | --------------------------------------------- | | 401 | ACCESS_DENIED | API key missing, invalid or expired, or calling application not configured for this operation. | | 403 | ACCESS_DENIED | User cannot perform this action. | | 404 | RESOURCE_NOT_FOUND | Page not found. | | 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | /health-a-to-z: get: summary: Get content from the Health A to Z hub. operationId: get-health-a-to-z description: | ## Overview The [Health A to Z hub](https://www.nhs.uk/health-a-to-z/) contains a number of navigational and content pages. The content of the page can be taken from the `mainEntityOfPage` part of the response. This includes the navigational links to child pages. At the top level, modularised content of child pages is highlighted by the `hasPart` field. In child pages, only the individual page is shown. responses: "200": description: | A valid query for the Live Well pages. content: application/json: schema: $ref: components/schemas/WebPage.json example: $ref: components/examples/HealthAToZHubPage.json "4XX": description: | An error occurred as follows: | HTTP status | Error code | Description | | ----------- | -------------------------- | --------------------------------------------- | | 401 | ACCESS_DENIED | API key missing, invalid or expired, or calling application not configured for this operation. | | 403 | ACCESS_DENIED | User cannot perform this action. | | 404 | RESOURCE_NOT_FOUND | Page not found. | | 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | /health-a-to-z/conditions: get: summary: Get the Conditions A to Z - Common topics hub page operationId: get-conditions-common-topics description: | ## Overview Use this endpoint to get the [Conditions A to Z: common topics](https://www.nhs.uk/health-a-to-z/conditions/) hub page, which contains grouped links to common health conditions. responses: "200": description: | A valid query for the Conditions A to Z: common topics hub page. content: application/json: schema: $ref: components/schemas/WebPage.json example: $ref: components/examples/ConditionsCommonTopicsHubPage.json "4XX": description: | An error occurred as follows: | HTTP status | Error code | Description | | ----------- | -------------------------- | --------------------------------------------- | | 401 | ACCESS_DENIED | API key missing, invalid or expired, or calling application not configured for this operation. | | 403 | ACCESS_DENIED | User cannot perform this action. | | 404 | RESOURCE_NOT_FOUND | Page not found. | | 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | /conditions: parameters: - $ref: "#/components/parameters/page" - $ref: "#/components/parameters/category" - $ref: "#/components/parameters/orderBy" - $ref: "#/components/parameters/startDate" - $ref: "#/components/parameters/endDate" - $ref: "#/components/parameters/order" - $ref: "#/components/parameters/synonyms" get: summary: Get all pages in the Conditions A to Z operationId: get-conditions description: | ## Overview Use this endpoint to get details of pages in the [Conditions A to Z](https://www.nhs.uk/conditions/). Passing in no parameters returns all pages under 'conditions'. The response is limited to 25 child pages and is paginated. There are a number of query parameters that filter the results. ## Ordering by dates The `orderBy` parameter can be `dateModified`, `lastReviewed` and `nextReview`. By default if any of the `orderBy` parameters are chosen the results are sorted by newest first. However, the `orderBy` parameter can be used with the `startDate` and `endDate` parameters to filter down to the desired date. `startDate` and `endDate` should be given in the YYYY-MM-DD format. For example `https://api.service.nhs.uk/nhs-website-content/conditions?startDate=2022-01-01&orderBy=dateModified` responses: "200": description: | A valid query for the conditions. content: application/json: schema: $ref: components/schemas/WebPage.json example: $ref: components/examples/ConditionsHealthAToZ.json "4XX": description: | An error occurred as follows: | HTTP status | Error code | Description | | ----------- | -------------------------- | --------------------------------------------- | | 401 | ACCESS_DENIED | API key missing, invalid or expired, or calling application not configured for this operation. | | 403 | ACCESS_DENIED | User cannot perform this action. | | 404 | RESOURCE_NOT_FOUND | Page not found. | | 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | /conditions/*: parameters: - $ref: "#/components/parameters/modules" get: summary: Get details of a condition page operationId: get-condition-page description: | ## Overview There is an endpoint for each page under the Health A to Z, for example https://www.nhs.uk/conditions/chickenpox. This can be used to get specific information about individual topics. There is only one query parameter for these pages: | Query parameter | Description | Type | | ----------------- | ---------------------------------------------------------------------- | ----------- | | modules | If topic is modularised, only return these modules | boolean | # Modularisation We modularise some of our content, meaning that individual parts of the page can be reused. If a page is modularised, content appears in the `hasPart` field. responses: "200": description: | A valid query which returns a page object for the chosen page content: application/json: schema: $ref: components/schemas/WebPage.json example: $ref: components/examples/ConditionsContentPage.json "4XX": description: | An error occurred as follows: | HTTP status | Error code | Description | | ----------- | -------------------------- | --------------------------------------------- | | 401 | ACCESS_DENIED | API key missing, invalid or expired, or calling application not configured for this operation. | | 403 | ACCESS_DENIED | User cannot perform this action. | | 404 | RESOURCE_NOT_FOUND | Page not found. | | 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | /symptoms: parameters: - $ref: "#/components/parameters/page" - $ref: "#/components/parameters/category" - $ref: "#/components/parameters/orderBy" - $ref: "#/components/parameters/startDate" - $ref: "#/components/parameters/endDate" - $ref: "#/components/parameters/order" get: summary: Get all pages in the Symptoms A to Z operationId: get-symptoms description: | ## Overview Use this endpoint to get details of pages in the [Symptoms A to Z](https://www.nhs.uk/symptoms). Passing in no parameters returns all pages under 'symptoms'. The response is limited to 25 child pages and is paginated. There are a number of query parameters that filter the results. ## Ordering by dates The `orderBy` parameter can be `dateModified`, `lastReviewed` and `nextReview`. By default if any of the `orderBy` parameters are chosen the results are sorted by newest first. However, the `orderBy` parameter can be used with the `startDate` and `endDate` parameters to filter down to the desired date. `startDate` and `endDate` should be given in the YYYY-MM-DD format. For example `https://api.service.nhs.uk/nhs-website-content/symptoms?startDate=2022-01-01&orderBy=dateModified` responses: "200": description: | A valid query for symptoms. content: application/json: schema: $ref: components/schemas/WebPage.json example: $ref: components/examples/SymptomsAToZ.json "4XX": description: | An error occurred as follows: | HTTP status | Error code | Description | | ----------- | -------------------------- | --------------------------------------------- | | 401 | ACCESS_DENIED | API key missing, invalid or expired, or calling application not configured for this operation. | | 403 | ACCESS_DENIED | User cannot perform this action. | | 404 | RESOURCE_NOT_FOUND | Page not found. | | 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | /tests-and-treatments: parameters: - $ref: "#/components/parameters/page" - $ref: "#/components/parameters/category" - $ref: "#/components/parameters/orderBy" - $ref: "#/components/parameters/startDate" - $ref: "#/components/parameters/endDate" - $ref: "#/components/parameters/order" get: summary: Get all pages in the Tests and Treatments A to Z operationId: get-tests-and-treatments description: | ## Overview Use this endpoint to get details of pages in the [tests-and-treatments A to Z](https://www.nhs.uk/tests-and-treatments). Passing in no parameters returns all pages under 'tests-and-treatments'. The response is limited to 25 child pages and is paginated. There are a number of query parameters that filter the results. ## Ordering by dates The `orderBy` parameter can be `dateModified`, `lastReviewed` and `nextReview`. By default if any of the `orderBy` parameters are chosen the results are sorted by newest first. However, the `orderBy` parameter can be used with the `startDate` and `endDate` parameters to filter down to the desired date. `startDate` and `endDate` should be given in the YYYY-MM-DD format. For example `https://api.service.nhs.uk/nhs-website-content/tests-and-treatments?startDate=2022-01-01&orderBy=dateModified` responses: "200": description: | A valid query for tests-and-treatments. content: application/json: schema: $ref: components/schemas/WebPage.json example: $ref: components/examples/TestsAndTreatmentsAToZ.json "4XX": description: | An error occurred as follows: | HTTP status | Error code | Description | | ----------- | -------------------------- | --------------------------------------------- | | 401 | ACCESS_DENIED | API key missing, invalid or expired, or calling application not configured for this operation. | | 403 | ACCESS_DENIED | User cannot perform this action. | | 404 | RESOURCE_NOT_FOUND | Page not found. | | 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | /medicines: parameters: - $ref: "#/components/parameters/page" - $ref: "#/components/parameters/category" - $ref: "#/components/parameters/orderBy" - $ref: "#/components/parameters/startDate" - $ref: "#/components/parameters/endDate" - $ref: "#/components/parameters/order" get: summary: Get all pages in the Medicines A to Z operationId: get-medicines description: | ## Overview Use this endpoint to get details of pages in the [Medicines A to Z](https://www.nhs.uk/medicines). Passing in no parameters returns all pages under 'medicines'. The response is limited to 25 child pages and is paginated. There are a number of query parameters that filter the results. ## Ordering by dates The `orderBy` parameter can be `dateModified`, `lastReviewed` and `nextReview`. By default if any of the `orderBy` parameters are chosen the results are sorted by newest first. However, the `orderBy` parameter can be used with the `startDate` and `endDate` parameters to filter down to the desired date. `startDate` and `endDate` should be given in the YYYY-MM-DD format. For example `https://api.service.nhs.uk/nhs-website-content/medicines?startDate=2022-01-01&orderBy=dateModified` responses: "200": description: | A valid query for medicines. content: application/json: schema: $ref: components/schemas/WebPage.json example: $ref: components/examples/MedicinesAToZ.json "4XX": description: | An error occurred as follows: | HTTP status | Error code | Description | | ----------- | -------------------------- | --------------------------------------------- | | 401 | ACCESS_DENIED | API key missing, invalid or expired, or calling application not configured for this operation. | | 403 | ACCESS_DENIED | User cannot perform this action. | | 404 | RESOURCE_NOT_FOUND | Page not found. | | 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | /medicines/*: parameters: - $ref: "#/components/parameters/modules" get: summary: Get specific medicine page operationId: get-medicine-page description: | ## Overview There is an endpoint for each page under the Medicines A to Z, for example https://www.nhs.uk/medicines/acrivastine. This can be used to get specific information about individual medicines. There is only one query parameter for these pages: | Query parameter | Description | Type | | ----------------- | ---------------------------------------------------------------------- | ----------- | | modules | If topic is modularised, only return these modules | boolean | # Modularisation We modularise some of our content, meaning that individual parts of the page can be reused. If a page is modularised, content appears in the `hasPart` field. responses: "200": description: | A valid query for medicines. content: application/json: schema: $ref: components/schemas/WebPage.json example: $ref: components/examples/MedicinesContentPage.json "4XX": description: | An error occurred as follows: | HTTP status | Error code | Description | | ----------- | -------------------------- | --------------------------------------------- | | 401 | ACCESS_DENIED | API key missing, invalid or expired, or calling application not configured for this operation. | | 403 | ACCESS_DENIED | User cannot perform this action. | | 404 | RESOURCE_NOT_FOUND | Page not found. | | 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | /mental-health: get: summary: Get content from the mental health hub operationId: get-mental-health description: | ## Overview The [mental health hub](https://www.nhs.uk/mental-health/) contains a number of navigational and content pages. The content of the page is taken from the `mainEntityOfPage` part of the response. This includes the navigational links to child pages. At the top level, modularised content of child pages is highlighted by the `hasPart` field. In child pages, only the individual page is shown. responses: "200": description: | A valid query for the mental health hub. content: application/json: schema: $ref: components/schemas/WebPage.json example: $ref: components/examples/MentalHealthHubPage.json "4XX": description: | An error occurred as follows: | HTTP status | Error code | Description | | ----------- | -------------------------- | --------------------------------------------- | | 401 | ACCESS_DENIED | API key missing, invalid or expired, or calling application not configured for this operation. | | 403 | ACCESS_DENIED | User cannot perform this action. | | 404 | RESOURCE_NOT_FOUND | Page not found. | | 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | /live-well: get: summary: Get content from the Live Well hub. operationId: get-live-well description: | ## Overview The [Live Well hub](https://www.nhs.uk/live-well/) contains a number of navigational and content pages. The content of the page can be taken from the `mainEntityOfPage` part of the response. This includes the navigational links to child pages. At the top level, modularised content of child pages is highlighted by the `hasPart` field. In child pages, only the individual page is shown. responses: "200": description: | A valid query for the Live Well pages. content: application/json: schema: $ref: components/schemas/WebPage.json example: $ref: components/examples/LiveWellHubPage.json "4XX": description: | An error occurred as follows: | HTTP status | Error code | Description | | ----------- | -------------------------- | --------------------------------------------- | | 401 | ACCESS_DENIED | API key missing, invalid or expired, or calling application not configured for this operation. | | 403 | ACCESS_DENIED | User cannot perform this action. | | 404 | RESOURCE_NOT_FOUND | Page not found. | | 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | /pregnancy: get: summary: Get content from the pregnancy hub operationId: get-pregnancy description: | ## Overview The [pregnancy hub](https://www.nhs.uk/pregnancy/) contains a number of navigational and content pages. The content of the page can be taken from `mainEntityOfPage`. This includes the navigational patterns to child pages. At the top level, child modularised content is highlighted by the `hasPart` field. In child pages, only the individual page is highlighted. responses: "200": description: | A valid query for the pregnancy hub. content: application/json: schema: $ref: components/schemas/WebPage.json example: $ref: components/examples/PregnancyHubPage.json "4XX": description: | An error occurred as follows: | HTTP status | Error code | Description | | ----------- | -------------------------- | --------------------------------------------- | | 401 | ACCESS_DENIED | API key missing, invalid or expired, or calling application not configured for this operation. | | 403 | ACCESS_DENIED | User cannot perform this action. | | 404 | RESOURCE_NOT_FOUND | Page not found. | | 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | /nhs-services: get: summary: Get content from the NHS services hub operationId: get-nhs-services description: | ## Overview The [NHS services hub](https://www.nhs.uk/nhs-services/) contains a number of navigational and content pages. The content of the page can be taken from `mainEntityOfPage`. This includes the navigational patterns to child pages. At the top level, child modularised content is highlighted by the `hasPart` field. In child pages, only the individual page is highlighted. responses: "200": description: | A valid query for the NHS services hub. content: application/json: schema: $ref: components/schemas/WebPage.json example: $ref: components/examples/NhsServicesHubPage.json "4XX": description: | An error occurred as follows: | HTTP status | Error code | Description | | ----------- | -------------------------- | --------------------------------------------- | | 401 | ACCESS_DENIED | API key missing, invalid or expired, or calling application not configured for this operation. | | 403 | ACCESS_DENIED | User cannot perform this action. | | 404 | RESOURCE_NOT_FOUND | Page not found. | | 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | /contraception: get: summary: Get content from the contraception hub operationId: get-contraception description: | ## Overview The [contraception hub](https://www.nhs.uk/contraception/) contains a number of navigational and content pages. The content of the page is taken from the `mainEntityOfPage` part of the response. This includes the navigational links to child pages. At the top level, modularised content of child pages is highlighted by the `hasPart` field. In child pages, only the individual page is shown. responses: "200": description: | A valid query for the contraception pages. content: application/json: schema: $ref: components/schemas/WebPage.json example: $ref: components/examples/ContraceptionHubPage.json "4XX": description: | An error occurred as follows: | HTTP status | Error code | Description | | ----------- | -------------------------- | --------------------------------------------- | | 401 | ACCESS_DENIED | API key missing, invalid or expired, or calling application not configured for this operation. | | 403 | ACCESS_DENIED | User cannot perform this action. | | 404 | RESOURCE_NOT_FOUND | Page not found. | | 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | /vaccinations: get: summary: Get content from the vaccinations hub operationId: get-vaccinations description: | ## Overview The [vaccinations hub](https://www.nhs.uk/vaccinations/) contains a number of navigational and content pages. The content of the page is taken from the `mainEntityOfPage` part of the response. This includes the navigational links to child pages. At the top level, modularised content of child pages is highlighted by the `hasPart` field. In child pages, only the individual page is shown. responses: "200": description: | A valid query for the vaccinations pages. content: application/json: schema: $ref: components/schemas/WebPage.json example: $ref: components/examples/VaccinationsHubPage.json "4XX": description: | An error occurred as follows: | HTTP status | Error code | Description | | ----------- | -------------------------- | --------------------------------------------- | | 401 | ACCESS_DENIED | API key missing, invalid or expired, or calling application not configured for this operation. | | 403 | ACCESS_DENIED | User cannot perform this action. | | 404 | RESOURCE_NOT_FOUND | Page not found. | | 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | /womens-health: get: summary: Get content from the women's health hub operationId: get-womens-health description: | ## Overview The [women's health hub](https://www.nhs.uk/womens-health/) contains a number of navigational and content pages. The content of the page is taken from the `mainEntityOfPage` part of the response. This includes the navigational links to child pages. At the top level, modularised content of child pages is highlighted by the `hasPart` field. In child pages, only the individual page is shown. responses: "200": description: | A valid query for the women's health pages. content: application/json: schema: $ref: components/schemas/WebPage.json example: $ref: components/examples/WomensHealthHubPage.json "4XX": description: | An error occurred as follows: | HTTP status | Error code | Description | | ----------- | -------------------------- | --------------------------------------------- | | 401 | ACCESS_DENIED | API key missing, invalid or expired, or calling application not configured for this operation. | | 403 | ACCESS_DENIED | User cannot perform this action. | | 404 | RESOURCE_NOT_FOUND | Page not found. | | 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | /baby: get: summary: Get content from the baby hub operationId: get-baby description: | ## Overview The [baby hub](https://www.nhs.uk/baby/) contains a number of navigational and content pages. The content of the page can be taken from `mainEntityOfPage`. This includes the navigational patterns to child pages. At the top level, child modularised content is highlighted by the `hasPart` field. In child pages, only the individual page is highlighted. responses: "200": description: | A valid query for the baby hub. content: application/json: schema: $ref: components/schemas/WebPage.json example: $ref: components/examples/BabyHubPage.json "4XX": description: | An error occurred as follows: | HTTP status | Error code | Description | | ----------- | -------------------------- | --------------------------------------------- | | 401 | ACCESS_DENIED | API key missing, invalid or expired, or calling application not configured for this operation. | | 403 | ACCESS_DENIED | User cannot perform this action. | | 404 | RESOURCE_NOT_FOUND | Page not found. | | 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | /social-care-and-support: get: summary: Get content from the Social care and support guide hub operationId: get-social-care-and-support description: | ## Overview The [Social care and support guide hub](https://www.nhs.uk/social-care-and-support/) contains a number of navigational and content pages. The content of the page can be taken from `mainEntityOfPage`. This includes the navigational patterns to child pages. At the top level, child modularised content is highlighted by the `hasPart` field. In child pages, only the individual page is highlighted. responses: "200": description: | A valid query for the social care and support guide hub. content: application/json: schema: $ref: components/schemas/WebPage.json example: $ref: components/examples/SocialCareAndSupportHubPage.json "4XX": description: | An error occurred as follows: | HTTP status | Error code | Description | | ----------- | -------------------------- | --------------------------------------------- | | 401 | ACCESS_DENIED | API key missing, invalid or expired, or calling application not configured for this operation. | | 403 | ACCESS_DENIED | User cannot perform this action. | | 404 | RESOURCE_NOT_FOUND | Page not found. | | 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | components: securitySchemes: apikey: type: apiKey in: header name: apikey parameters: startDate: name: startDate in: query description: Earliest date filter, works with orderBy. Format must be YYYY-MM-DD. required: false schema: type: string example: "2020-01-01" endDate: name: endDate in: query description: Latest date filter, works with orderBy. Format must be YYYY-MM-DD. required: false schema: type: string example: "2021-01-01" order: name: order in: query description: Order by "newest" or "oldest". required: false schema: type: string example: "newest" page: name: page in: query description: Page number, used to filter paginated results. required: false schema: type: string example: "1" category: name: category in: query description: Filters child pages by letters "A" to "Z". required: false schema: type: string example: "A" orderBy: name: orderBy in: query description: Works alongside startDate and endDate. Options are "dateModified", "lastReviewed" and "nextReview". required: false schema: type: string example: "lastReviewed" synonyms: name: synonyms in: query description: Include multiple listings for pages with more than one name. required: false schema: type: boolean example: true modules: name: modules in: query description: If topic is modularised, only return these modules. required: false schema: type: boolean example: true