Skip to main content

NHS Website Content API
migration assistant

API Request

Use this tool to see how you need to update your code to successfully continue making calls to our new NHS Website Content API.

Select a sample NHS website page from the drop-down menu below. This will update the API endpoint in the code example further down this page.

{{ nhsWebsiteUrlAriaLiveText }}

Open the selected page in a new browser tab

{{ languageAriaLiveText }}

Code example

The code example will be shown using the programming language of your choice.

We have highlighted the differences between the old and the new API calls using {{ languageFormatted }}.

Sub domain and path (Highlighted in yellow)

The sub domain and path to the endpoint has changed.

Header key (Highlighted in orange)

The header key for authentication has changed.

Header value (Highlighted in green)

Your header value for authentication will be new.

Old v1 API {{ languageFormatted }} code


            

New v2 API {{ languageFormatted }} code

{{ environmentAriaLiveText }}

The integration test environment can be used to test your API calls and get an API response. This environment is rate limited and should not be used in your production application. An integration test API key can be generated in your developer account on the NHS developer and integration hub.

The production environment should be used in your production application. The rate limit in this environment should be more than enough to meet your needs. You will need to onboard your product with us to get a production API key (this will be different to your integration test API key), and can be generated in your developer account on the NHS developer and integration hub.


            

Want to try in Postman? Save and use this Postman collection.