-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnhs-website-content-api.yaml
More file actions
1198 lines (1029 loc) · 73.6 KB
/
nhs-website-content-api.yaml
File metadata and controls
1198 lines (1029 loc) · 73.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# 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:
<img src="https://assets.nhs.uk/nhsuk-cms/images/nhs-attribution.width-510.png" alt="Content supplied by the NHS website" width="510" height="99" style="width: 250px; height: 49px;" />
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.
```
<a href="https://www.nhs.uk/PATH_TO_THE_ORIGINAL_CONTENT_ON_THE_NHS_WEBSITE" target="_blank">
<img src="https://assets.nhs.uk/nhsuk-cms/images/nhs-attribution.width-510.png" alt="Content supplied by the NHS website" width="510" height="99" style="width: 250px; height: 49px;" />
</a>
```
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):
```
<p>From <a href="https://www.nhs.uk/" target="_blank">www.nhs.uk<a/></p>
```
## 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.
<div class="nhsd-m-expander" style="margin-bottom: 1rem;">
<details>
<summary class="nhsd-m-expander__heading-container" aria-label="List of health aspects" >
<div>
<span class="nhsd-m-expander__icon nhsd-!t-margin-right-1">
<span class="nhsd-a-icon nhsd-a-icon--size-xs" style="margin: 0;">
<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" focusable="false" viewBox="0 0 16 16">
<path d="M12,8l-6.5,7L4,13.5L9.2,8L4,2.5L5.5,1L12,8z"/>
</svg>
</span>
</span>
<p class="nhsd-m-expander__heading nhsd-t-body">List of health aspects</p>
</div>
</summary>
<div class="nhsd-m-expander__content-container">
<p>Here are the 31 health aspects that we currently have available for modularisation, in order of frequency of use:</p>
<ul>
<li>OverviewHealthAspect</li>
<li>SymptomsHealthAspect</li>
<li>TreatmentsHealthAspect</li>
<li>CausesHealthAspect</li>
<li>MedicalHelpNonurgentHealthAspect</li>
<li>SelfCareHealthAspect</li>
<li>MedicalHelpUrgentHealthAspect</li>
<li>MedicalHelpEmergencyHealthAspect</li>
<li>DiagnosisHealthAspect</li>
<li>PreventionHealthAspect</li>
<li>SideEffectsHealthAspect</li>
<li>LivingWithHealthAspect</li>
<li>SuitabilityHealthAspect</li>
<li>InteractionsHealthAspect</li>
<li>UsageOrScheduleHealthAspect</li>
<li>PregnancyHealthAspect</li>
<li>RisksOrComplicationsHealthAspect</li>
<li>PrognosisHealthAspect</li>
<li>BenefitsHealthAspect</li>
<li>ContagiousnessHealthAspect</li>
<li>WhatHappensHealthAspect</li>
<li>PreparationHealthAspect</li>
<li>ResultsHealthAspect</li>
<li>TypesHealthAspect</li>
<li>ContraindicationsHealthAspect</li>
<li>GettingAccessHealthAspect</li>
<li>WarningHealthAspect</li>
<li>EffectivenessHealthAspect</li>
<li>HowItWorksHealthAspect</li>
<li>IngredientsHealthAspect</li>
</ul>
</div>
</details>
</div>
### 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)
<strong>NOTE:</strong> 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)
<div class="nhsd-m-expander" style="margin-bottom: 1rem;">
<details>
<summary class="nhsd-m-expander__heading-container" aria-label="The sandbox environment includes the following 77 mocked endpoints" >
<div>
<span class="nhsd-m-expander__icon nhsd-!t-margin-right-1">
<span class="nhsd-a-icon nhsd-a-icon--size-xs" style="margin: 0;">
<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" focusable="false" viewBox="0 0 16 16">
<path d="M12,8l-6.5,7L4,13.5L9.2,8L4,2.5L5.5,1L12,8z"/>
</svg>
</span>
</span>
<p class="nhsd-m-expander__heading nhsd-t-body">The sandbox environment includes the following 77 mocked endpoints</p>
</div>
</summary>
<div class="nhsd-m-expander__content-container">
<h4>API v2 root</h4>
<ul>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/</a> (Not a valid endpoint)</li>
</ul>
<h4>Manifest pages</h4>
<ul>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/manifest/pages/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/manifest/pages/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/manifest/pages/?page=1" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/manifest/pages/?page=1</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/manifest/pages/?page=2" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/manifest/pages/?page=2</a></li>
</ul>
<h4>Health A to Z</h4>
<ul>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/health-a-to-z/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/health-a-to-z/</a></li>
</ul>
<h4>Conditions A to Z - Common topics</h4>
<ul>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/health-a-to-z/conditions/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/health-a-to-z/conditions/</a></li>
</ul>
<h4>Conditions (Health A to Z)</h4>
<ul>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/?category=a" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/?category=a</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/?category=a&genre=condition" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/?category=a&genre=condition</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/?category=a&genre=hub" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/?category=a&genre=hub</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/?category=b" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/?category=b</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/?category=z" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/?category=z</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/?page=1" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/?page=1</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/?page=2" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/?page=2</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/?page=29" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/?page=29</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/acanthosis-nigricans/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/acanthosis-nigricans/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/achalasia/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/achalasia/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/acne/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/acne/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/acne/?modules=true">https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/acne/?modules=true</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/angiography/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/angiography/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/cancer/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/cancer/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/zika/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/conditions/zika/</a></li>
</ul>
<h4>Symptoms A-Z</h4>
<ul>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/symptoms" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/symptoms/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/symptoms/?category=a" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/symptoms/?category=a</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/symptoms/?category=b" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/symptoms/?category=b</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/symptoms/?page=1" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/symptoms/?page=1</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/symptoms/?page=6" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/symptoms/?page=6</a></li>
</ul>
<h4>Tests and Treatments A-Z</h4>
<ul>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/tests-and-treatments" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/tests-and-treatments/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/tests-and-treatments/?category=a" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/tests-and-treatments/?category=a</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/tests-and-treatments/?category=b" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/tests-and-treatments/?category=b</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/tests-and-treatments/?page=1" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/tests-and-treatments/?page=1</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/tests-and-treatments/?page=7" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/tests-and-treatments/?page=7</a></li>
</ul>
<h4>Medicines</h4>
<ul>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/medicines/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/medicines/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/medicines/?category=a" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/medicines/?category=a</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/medicines/?category=b" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/medicines/?category=b</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/medicines/?category=z" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/medicines/?category=z</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/medicines/?page=1" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/medicines/?page=1</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/medicines/?page=11" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/medicines/?page=11</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/medicines/aciclovir/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/medicines/aciclovir/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/medicines/acrivastine/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/medicines/acrivastine/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/medicines/acrivastine/?modules=true" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/medicines/acrivastine/?modules=true</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/medicines/zopiclone/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/medicines/zopiclone/</a></li>
</ul>
<h4>Mental health</h4>
<ul>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/mental-health/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/mental-health/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/mental-health/advice-for-life-situations-and-events/support-for-workplace-bullying/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/mental-health/advice-for-life-situations-and-events/support-for-workplace-bullying/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/mental-health/conditions/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/mental-health/conditions/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/mental-health/feelings-symptoms-behaviours/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/mental-health/feelings-symptoms-behaviours/</a></li>
</ul>
<h4>Live Well</h4>
<ul>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/live-well/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/live-well/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/live-well/alcohol-advice/alcohol-support/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/live-well/alcohol-advice/alcohol-support/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/live-well/exercise/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/live-well/exercise/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/live-well/healthy-weight/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/live-well/healthy-weight/</a></li>
</ul>
<h4>Pregnancy</h4>
<ul>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/pregnancy/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/pregnancy/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/pregnancy/finding-out/finding-out-you-are-pregnant/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/pregnancy/finding-out/finding-out-you-are-pregnant/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/pregnancy/having-a-baby-if-you-are-lgbt-plus/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/pregnancy/having-a-baby-if-you-are-lgbt-plus/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/pregnancy/trying-for-a-baby/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/pregnancy/trying-for-a-baby/</a>"</li>
</ul>
<h4>NHS Services</h4>
<ul>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/nhs-services/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/nhs-services/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/nhs-services/gps/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/nhs-services/gps/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/nhs-services/gps/how-to-register-with-a-gp-surgery/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/nhs-services/gps/how-to-register-with-a-gp-surgery/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/nhs-services/prescriptions-and-pharmacies/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/nhs-services/prescriptions-and-pharmacies/</a></li>
</ul>
<h4>Contraception</h4>
<ul>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/contraception/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/contraception/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/contraception/methods-of-contraception/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/contraception/methods-of-contraception/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/contraception/methods-of-contraception/combined-pill/what-is-it/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/contraception/methods-of-contraception/combined-pill/what-is-it/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/contraception/methods-of-contraception/condoms/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/contraception/methods-of-contraception/condoms/</a></li>
</ul>
<h4>Vaccinations</h4>
<ul>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/vaccinations/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/vaccinations/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/vaccinations/nhs-vaccinations-and-when-to-have-them/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/vaccinations/nhs-vaccinations-and-when-to-have-them/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/vaccinations/6-in-1-vaccine/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/vaccinations/6-in-1-vaccine/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/vaccinations/travel-vaccinations/available-travel-vaccines/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/vaccinations/travel-vaccinations/available-travel-vaccines/</a></li>
</ul>
<h4>Women's health</h4>
<ul>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/womens-health/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/womens-health/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/womens-health/periods/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/womens-health/periods/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/womens-health/anaemia/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/womens-health/anaemia/</a></li>
</ul>
<h4>Social care and support</h4>
<ul>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/social-care-and-support/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/social-care-and-support/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/social-care-and-support/introduction-to-care-and-support/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/social-care-and-support/introduction-to-care-and-support/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/social-care-and-support/money-work-and-benefits/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/social-care-and-support/money-work-and-benefits/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/social-care-and-support/care-after-a-hospital-stay/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/social-care-and-support/care-after-a-hospital-stay/</a></li>
</ul>
<h4>Baby</h4>
<ul>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/baby/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/baby/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/baby/caring-for-a-newborn/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/baby/caring-for-a-newborn/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/baby/support-and-services/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/baby/support-and-services/</a></li>
<li><a href="https://sandbox.api.service.nhs.uk/nhs-website-content/baby/first-aid-and-safety/" target="_blank">https://sandbox.api.service.nhs.uk/nhs-website-content/baby/first-aid-and-safety/</a></li>
</ul>
</div>
</details>
</div>
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:
[](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