UK Gov't Covid API

Just had a quick play around with the Generic API that powers the gov’t Covid dashboard among other things. (that may use the alternate endpoint(s), but appears to be the same data)

There are some issues with the OpenAPI spec not lining up with the API, but I’ve just plumbed in the region type and region code (yes, you need both) for Mendip and picked out a few interesting metric types.

See: Available Metrics for Mendip

A few possibly useful metrics for quick lookups on current local conditions/direction of change:

Most metrics lag behind in terms of availability of data, hence some of the dates in the example URIs above are older.

If there’s no data available for a given region/date, the endpoints return a 204-no content response code.

A slightly topic-drifty followup, there was a big outage to the dashboard a few days before you posted this, with an interesting writeup here. Which includes in the comments:

Again, you’re looking at it from the outside - which is always easier. We don’t always have the resources to do all the nice things that are written in textbooks. I created this service from the scratch in two weeks, and have since been working on average 16 hours a day to maintain it.