Food hygiene ratings are among the most recognised public data in the UK. Delivery platforms, booking sites, supplier checks and local directories all show them. The Food Standards Agency (FSA) publishes them through a free API, which is straightforward to call and surprisingly easy to present badly. This guide covers the details that matter when you build on it.

The API in brief

The FSA’s ratings API covers England, Wales, Northern Ireland and Scotland. It needs no account or API key, and returns JSON or XML. Every request must include an x-api-version header with the version you are using; without it, the API does not return data. You can search establishments by name, address and other filters, and each establishment has its own identifier, which is the right key to store rather than a name or address.

Two schemes, not one

England, Wales and Northern Ireland use the Food Hygiene Rating Scheme, a scale from 0 (urgent improvement necessary) to 5 (very good). Scotland uses the Food Hygiene Information Scheme, run by Food Standards Scotland, which gives a result of Pass or Improvement Required instead of a number. Code that assumes every rating is a number will either break or quietly hide Scottish businesses. Use the scheme type returned with each record, and design your interface to show both.

Not every result is a rating

Some establishments have a status rather than a score. A new business, or one that has changed hands, may be awaiting inspection. Some low-risk premises, such as newsagents or chemists, are exempt. Treat these as statuses in their own right. Showing “awaiting inspection” as a blank, or worse as zero, misrepresents a business that has done nothing wrong.

For the 0 to 5 scheme, records can also include the component scores behind a rating, covering hygiene, the structure of the premises and confidence in management. Scottish records do not carry the same breakdown, so do not make your interface depend on it.

A rating is a snapshot

Each rating reflects the business at its last inspection, and inspection frequency depends on risk, so a rating can be several years old. Always show the rating date beside the rating. Businesses can appeal a rating, request a re-inspection after making improvements, and publish a right to reply, so a recent change on the official site may take a little while to reach your copy of the data. Cache results for hours, not weeks.

Matching the right business

Searching by name often returns several branches of a chain, or businesses with similar names in different towns. Match on the establishment identifier once you have it, and use the address and postcode to confirm the first match. Trading names also differ from registered company names, so linking a rating to a Companies House record needs care: a café trading as “The Corner Kitchen” might be run by a company with an entirely different name.

Presenting ratings fairly

Ratings affect real businesses. In Wales and Northern Ireland businesses must display their rating at their premises, and in Wales they must also give it when asked; in England display is encouraged but voluntary. If you publish ratings, show them as the FSA or Food Standards Scotland presents them, include the date, link to the official record, and avoid inventing composite scores or labels such as “unsafe”. The FSA publishes official rating images and guidance for displaying ratings online.

How GovBridge handles it

GovBridge provides food hygiene search by business name and address through the FSA API, returning the rating, scheme type and establishment details in the same consistent JSON format as its other sources, and caching results for six hours. A search costs one credit, and the developer preview includes 500 free credits at www.govbridge.co.uk. If you are building hygiene ratings into a directory, booking or supplier-check product, email hello@yugsolutions.co.uk.