Access our data
Welcome to the UKHSA data dashboard API developer's guide. Here, you'll find concise instructions for interacting with our API and comprehensive Swagger documentation detailing endpoint information, parameters, and example responses.
Data structure
Last updated on Thursday, 21 March 2024 at 02:45pm
The full URL is constructed as follows:
GET /themes/{theme}/sub_themes/{sub_theme}/topics/{topic}/geography_types/{geography_type}/geographies/{geography}/metrics/{metric}
The following path parameters are required:
themethe largest overall topical subgroup of data for exampleinfectious_diseasesub_themea topical subgroup associated with the parent theme. for examplerespiratorytopiccategorical subgroup associated with the selectedthemeandsub_theme. For example atopicofCOVID-19would only be available for athemeofinfectious_diseaseand asub_themeofrespiratorygeography_typethe overarching area type for the intended geography for exampleNationgeographythe selected area under thegeography_type. For exampleEnglandmetricthe type of data being selected. For exampleCOVID-19_testing_PCRcountByDay
Each intermediate part of the URL will provide a list of entities which are available for the cumulative selections.
For example, to retrieve a list of metrics which are available under the COVID-19 dataset for the overall geography of England:
GET /themes/infectious_disease/sub_themes/respiratory/topics/COVID-19/geography_types/Nation/geographies/England/metrics
If you are looking for data associated with a particular metric for a given geography, you will have to traverse the API from the beginning and make the selections by following the hierarchy to determine which entities are available for the intended selections. This is because the returned entities are relevant to the previous selections only.
For example, a selected topic of Parainfluenza will not have the same geographies available to it as COVID-19.
For more detailed information regarding each metric. Please see the metrics documentation.