---
title: "Metric search"
method: GET
path: "/metrics"
---

# Metric search

`GET /metrics`

## Request

- Base URL: `https://api.coronavirus.data.gov.uk/generic`
- URL: `https://api.coronavirus.data.gov.uk/generic/metrics`
- Auth: none declared. Required headers: `Accept`
- TypeScript: <https://skmtc.dev/uk-health-security-agency/apis/generic-api/docs/metrics/get.ts> (a function with typed inputs; its response is checked against the schema)

## Query parameters

- `search` string
- `category` 'Cases' | 'Testing' | 'Healthcare' | 'Deaths' | 'Vaccinations'
- `tags` string
- `exact` boolean

## Headers

- `Accept` 'application/json', required

## Response `200`

- object[]
  - `last_update` string, required
  - `metric` string, required
  - `metric_name` string, required
  - `category` string, required
  - `deprecated` string, nullable
  - `doc_last_modified` string, nullable
  - `tags` string[], required

## Other responses

- `400`: Bad request. Reason provided in response body where possible.
- `404`: Not found.
- `429`: Too many requests - request has been throttled.
- `500`: Server error

## Changes

- **2021-11-24** `fc08101228dd`: 1 info
  - added the optional property `items/doc_last_modified` to the response with the `200` status
- **2021-11-24** `1e2ad86d4357`: 1 info
  - added the new optional `query` request parameter `exact`
- **2021-11-22** `5e256a1f0f74`: 2 breaking, 1 warning, 2 info
  - the mandatory response header `phe-website-request` removed for the status `200`
  - the mandatory response header `x-phe-media-type` removed for the status `200`
  - the optional response header `phe-server-loc` removed for the status `200`
  - added the optional property `items/deprecated` to the response with the `200` status
  - …1 more
- **2021-11-22** `44611f090a79`: 3 breaking, 2 warning
  - the mandatory response header `ukhsa-website-request` removed for the status `200`
  - the mandatory response header `x-ukhsa-media-type` removed for the status `200`
  - removed the required property `items/last_update` from the response with the `200` status
  - the optional response header `ukhsa-server-loc` removed for the status `200`
  - …1 more
- **2021-11-22** `3f9e454142d3`: 2 info
  - added the new optional `query` request parameter `category`
  - added the new optional `query` request parameter `tags`

[Operation history](https://skmtc.dev/uk-health-security-agency/apis/generic-api/changes/metrics/get.md)

---

[API](https://skmtc.dev/uk-health-security-agency/apis/generic-api.md) - [All operations](https://skmtc.dev/uk-health-security-agency/apis/generic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/uk-health-security-agency/apis/generic-api/revisions/ac434e5ddc2c?raw)
