WhatMoved

A practical guide to the Food Standards Agency food hygiene rating API

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.

Base URL and headers

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"

The two endpoints you need

EndpointWhat it returns
/Authorities/basicEvery 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.

Paging: the 5,000 row cap

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

Rating values

RatingValue is a string, and two schemes share the field:

Dates

Withheld addresses

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.

What the API can't tell you

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.

That's what WhatMoved does. We download every council every morning, keep the history from 1 November 2026, and publish the differences as a food hygiene rating change feed API: openings, takeovers, closures, rating drops and rises, and re-inspections, filterable by council, postcode and date. There's a free tier, a free weekly report for the whole UK, and a page for every council.

Licence and attribution

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.