Unofficial. Written from running a daily download of every council since November 2026. Last checked 20 November 2026.
The Food Standards Agency (FSA) publishes the Food Hygiene Rating Scheme (FHRS) as a free, open API. It covers around 615,000 food businesses across England, Wales and Northern Ireland, plus Scotland's Food Hygiene Information Scheme (FHIS). No key or sign-up is needed. This guide covers what the official documentation leaves out: the limits and quirks you only find by downloading the whole thing.
Every request goes to https://api.ratings.food.gov.uk and needs two headers. Without
x-api-version: 2 you get a 404 ("The API 'Authorities' doesn't exist").
curl -H "x-api-version: 2" -H "Accept: application/json" \
"https://api.ratings.food.gov.uk/Authorities/basic"
| Endpoint | What it returns |
|---|---|
/Authorities/basic | Every local authority (council), under authorities, each with a LocalAuthorityId and Name. About 360 of them. |
/Establishments?localAuthorityId=&pageNumber=&pageSize= | The businesses for one council, under establishments, with paging details in meta (totalCount, totalPages). |
Fetching council by council is the most reliable way to get the full register. Each establishment has a
FHRSID (the stable business ID), BusinessName, BusinessType, address
lines, PostCode, RatingValue, RatingDate, SchemeType,
NewRatingPending and a geocode with latitude and longitude.
pageSize is capped at 5,000. Ask for more and you silently get 5,000, with no error. Large
councils need several pages. Check your work: the number of rows you collect should equal
meta.totalCount, with no duplicate FHRSIDs. If not, fetch the council again rather
than trust a partial result.
import requests, time
H = {"x-api-version": "2", "Accept": "application/json",
"User-Agent": "your-app/1.0 (you@example.com)"}
BASE = "https://api.ratings.food.gov.uk"
def council(auth_id):
rows, page = [], 1
while True:
r = requests.get(f"{BASE}/Establishments", headers=H, timeout=60,
params={"localAuthorityId": auth_id, "pageNumber": page, "pageSize": 5000})
r.raise_for_status()
data = r.json()
rows += data["establishments"]
if page >= int(data["meta"]["totalPages"]):
break
page += 1
time.sleep(0.25) # be polite
ids = {e["FHRSID"] for e in rows}
assert len(rows) == int(data["meta"]["totalCount"]) == len(ids), "incomplete, retry"
return rows
RatingValue is a string, and two schemes share the field:
0 to 5, where 5 is very good.Improvement Required, Pass and Pass and Eat Safe, in that order.AwaitingInspection and Exempt. These appear
both with and without spaces (Awaiting Inspection), so normalise before comparing.RatingDate of 1901-01-01 means "no date", not a real inspection.Some businesses, often run from home, have no address lines in the data. Treat them carefully: a sole trader's name and address can be personal data under UK GDPR.
The API only shows each business as it is today. There is no history and no change log, so you can't ask it
which businesses opened last week, which closed, or whose rating dropped. To answer that you have to download
everything every day and compare. A new FHRSID also isn't always a new opening: it may be a new
operator taking over premises, or the same business re-registered.
The data is published under the Open Government Licence v3.0. Anything you build with it should carry: "Contains public sector information licensed under the Open Government Licence v3.0." Don't imply that the FSA endorses your product.