BYTETOOLS

UK Food Hygiene Ratings API

Free UK Food Standards Agency API with no key: food hygiene ratings for every registered restaurant, cafe, takeaway and shop in the UK. Tested curl example.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-19

What is the UK Food Hygiene Ratings API?

The Food Hygiene Rating Scheme API from the UK Food Standards Agency is free and key-free, providing official hygiene inspection ratings for every registered food business in the UK, searchable by name, location or authority.

This API exposes the official food hygiene ratings displayed on those green-and-black stickers in UK shop windows. Every registered food business is covered, with its rating, inspection date and the local authority that assessed it.

One integration detail catches everyone out: the API requires an `x-api-version: 2` header. Without it you get an error rather than data, which is unusual enough that it is worth setting explicitly in your client.

Quick facts

Base URL
https://api.ratings.food.gov.uk
Authentication
No API key, but the header `x-api-version: 2` is mandatory on every request.
Rate limit
No published limit; fair use expected.
Pricing
Free under the Open Government Licence.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the UK Food Hygiene Ratings API

Every request below was executed against the live API on 2026-08-19, and the response shown is the real body it returned — not an illustration.

1. List local authorities publishing ratings

GET https://api.ratings.food.gov.uk/Authorities/basic

curl
curl 'https://api.ratings.food.gov.uk/Authorities/basic' \
  -H 'x-api-version: 2'
JavaScript (fetch)
const res = await fetch("https://api.ratings.food.gov.uk/Authorities/basic", {
  headers: {
    "x-api-version": "2",
  },
});
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

headers = {
    "x-api-version": "2",
}

res = requests.get("https://api.ratings.food.gov.uk/Authorities/basic", headers=headers, timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
{
  "authorities": [
    {
      "LocalAuthorityId": 197,
      "LocalAuthorityIdCode": "760",
      "Name": "Aberdeen City",
      "EstablishmentCount": 2202,
      "SchemeType": 2,
      "links": [
        {
          "rel": "self",
          "href": "https://api.ratings.food.gov.uk/authorities/197"
        }
      ]
    },
    {
      "LocalAuthorityId": 198,
      "LocalAuthorityIdCode": "761",
      "Name": "Aberdeenshire",
      "EstablishmentCount": 2783,
      "SchemeType": 2,
      "links": [
        {
          "rel": "self",
          "href": "https://api.ratings.food.gov.uk/authorities/198"
        }
      ]
    },
    {
      "LocalAuthorityId": 277,
      "LocalAuthorityIdCode": "323",
      "Name": "Adur",
      "EstablishmentCount": 463,
      "SchemeType": 1,
      "links": [
        {
          "rel": "self",
          "href": "https://api.ratings.food.gov.uk/authorities/277"
        }
      ]
    },
    {
      "LocalAuthorityId": 48,
      "LocalAuthorityIdCode": "062",
      "Name": "Amber Valley",
      "EstablishmentCount": 1078,
      "SchemeType": 1,
      "links": [
        {
          "rel": "self",
          "href": "https://api.ratings.food.gov.uk/authorities/48"
        }
      ]
    },
    {
      "LocalAuthorityId": 334,
      "LocalAuthorityIdCode": "551",
      "Name": "Anglesey",
      "EstablishmentCount": 763,
      "SchemeType": 1,
      "links": [
        {
          "rel": "self",
          "href": "https://api.ratings.food.gov.uk/authorities/334"
        }
      ]
    },
    {
      "LocalAuthorityId": 199,
      "LocalAuthorityIdCod

Parameters

ParameterTypeRequiredDescription
x-api-versionheaderRequiredMust be set to 2 or the request fails. 2
namestringOptionalBusiness name search on /Establishments. greggs
addressstringOptionalAddress or postcode search. SW1A 1AA
localAuthorityIdintegerOptionalRestrict to one local authority. 197
pageSize / pageNumberintegerOptionalPagination controls. 20

Response fields

authorities[].Namestring
Local authority name.
authorities[].EstablishmentCountinteger
Number of registered businesses in that authority.
establishments[].BusinessNamestring
Trading name of the business.
establishments[].RatingValuestring
Hygiene rating, 0 to 5 in England, or a pass/improvement scheme in Scotland.
establishments[].RatingDatestring
Date of the inspection that produced the rating.
establishments[].scoresobject
Sub-scores for hygiene, structural and confidence in management.

What you can build with the UK Food Hygiene Ratings API

  • Show hygiene ratings alongside restaurant listings
  • Build a food safety lookup for a local area
  • Monitor rating changes for a chain of premises
  • Support consumer and journalism research on food standards

Common errors and how to fix them

Error without x-api-version

The version header is mandatory.

Fix: Send `x-api-version: 2` on every request; this is the single most common failure.

RatingValue is text, not a number

Scotland uses Pass/Improvement Required rather than 0-5.

Fix: Handle both schemes; do not parse RatingValue as an integer unconditionally.

UK Food Hygiene Ratings API — frequently asked questions

Is the UK food hygiene ratings API free?

Yes, free with no API key under the Open Government Licence. It does require the header x-api-version: 2 on every request.

Why do my requests fail with no obvious error?

You are almost certainly missing the x-api-version header. The API rejects requests without it, and the message is not always clear.

Does it cover Scotland and Northern Ireland?

Yes, but Scotland uses a different scheme — Pass or Improvement Required rather than a 0-5 score. Your code must handle both formats.

How current are the ratings?

They reflect the most recent inspection, which can be months or years old. The RatingDate field tells you when it was assessed — always display it alongside the rating.

Tools that pair with this API

UK Food Hygiene Ratings is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-19; always check the official documentation before relying on this API in production, as terms and limits can change.