# Food Hygiene Ratings Scraper (`anyxsolutions/food-hygiene-ratings-scraper`) Actor

Scrape UK food hygiene ratings for restaurants, cafés, takeaways, pubs, hotels and shops. Filter by name, postcode, council, business type and rating. Get address, postcode, coordinates, rating and date, inspection scores and the council's contact details. Open data, no login or proxy.

- **URL**: https://apify.com/anyxsolutions/food-hygiene-ratings-scraper.md
- **Developed by:** [Anyx Solutions](https://apify.com/anyxsolutions) (community)
- **Categories:** Lead generation, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

![banner](https://anyx.solutions/banners/food-hygiene-ratings-scraper.png)

## Food Hygiene Ratings Scraper

**UK food hygiene ratings for every restaurant, café, takeaway, pub, hotel and food shop — with address, postcode, coordinates, inspection scores and the council's contact details — as clean JSON.**

Every food business in the UK that serves or sells food to the public is inspected by its local
council and given a food hygiene rating: 0 to 5 in England, Wales and Northern Ireland, Pass or
Improvement Required in Scotland. This Actor scrapes UK food hygiene ratings from
ratings.food.gov.uk by business name, address or postcode, local authority, country, business type
and rating, or from any ratings.food.gov.uk search, local authority or business URL. Each business
comes back with its FHRS id, name, business type, address lines, postcode, latitude and longitude,
rating and rating date, the three inspection scores (hygiene, structural, confidence in
management) with their descriptions, the inspecting council with its email and website, the
region and a link to its page on ratings.food.gov.uk. It is open data published by the Food
Standards Agency: no login, no API key and no proxy. Built for sales and lead-generation teams
selling to restaurants and cafés, food-delivery platforms, insurers, property and retail
analysts, journalists and researchers.

### ⚡ Quick start

```json
{
  "startUrls": [
    {
      "url": "https://ratings.food.gov.uk/business-search?business-name-search=pizza&address-search=london"
    }
  ],
  "maxItems": 5
}
```

### 🧩 Input

| Field                | Type    | Required | Default                      | Description                                                                                                                                                                                                                                                                                                     |
| -------------------- | ------- | -------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `startUrls`          | array   | no       | —                            | ratings.food.gov.uk pages: a search (`https://ratings.food.gov.uk/business-search?business-name-search=pizza&address-search=london`), a local authority search (`https://ratings.food.gov.uk/authority-search-landing/528`) or a business page (`https://ratings.food.gov.uk/business/1158712/pizza-pilgrims`). |
| `businessName`       | string  | no       | —                            | Find businesses whose name contains these words, such as `Costa` or `pizza`.                                                                                                                                                                                                                                    |
| `address`            | string  | no       | —                            | Find businesses at an address, town or postcode, such as `Manchester`, `SE1` or `SE1 2ER`.                                                                                                                                                                                                                      |
| `localAuthorities`   | array   | no       | —                            | Only return businesses inspected by these councils, such as `Southwark`, `Manchester` or `City of Edinburgh`. Each council runs as its own search.                                                                                                                                                              |
| `country`            | string  | no       | —                            | Only return businesses in `England`, `Northern Ireland`, `Scotland` or `Wales`. Ignored when local authorities are set.                                                                                                                                                                                         |
| `businessType`       | string  | no       | —                            | Only return one business type, such as `restaurant-cafe-canteen`, `takeaway-sandwich-shop`, `pub-bar-nightclub` or `hotel-bed-breakfast-guest-house`.                                                                                                                                                           |
| `rating`             | string  | no       | —                            | Only return one rating: `0` to `5`, `Pass` or `ImprovementRequired` (Scotland), `AwaitingPublication`, `AwaitingInspection` or `Exempt`.                                                                                                                                                                        |
| `ratingComparison`   | string  | no       | `"equal"`                    | How a 0 to 5 rating is matched: `equal`, `atLeast` (that rating or better) or `atMost` (that rating or worse).                                                                                                                                                                                                  |
| `sortBy`             | string  | no       | `"relevance"`                | Order of the filter search: `relevance`, `ratingHighest`, `ratingLowest`, `nameAsc` or `nameDesc`.                                                                                                                                                                                                              |
| `maxItems`           | integer | no       | —                            | Maximum number of businesses per URL or local authority. The input form starts at 5; leave it empty for every matching business.                                                                                                                                                                                |
| `proxyConfiguration` | object  | no       | `{ "useApifyProxy": false }` | Proxy settings. Food hygiene ratings are open data and need no proxy.                                                                                                                                                                                                                                           |

Add ratings.food.gov.uk URLs, search filters, or both. The filters (business name, address,
local authorities, country, business type and rating) build a search of their own, one per local
authority; URLs keep the filters written in their own address. The easiest way to build a search
URL is to run the search on [ratings.food.gov.uk](https://ratings.food.gov.uk/) and paste the
address bar.

### 📤 Output

Each business is one dataset row. A business reached through two pages of the same search is
returned once.

#### Fields

| Field                               | Type    | Description                                                                                                      |
| ----------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------- |
| `fhrsId`                            | number  | The business's id in the Food Hygiene Rating Scheme, unique across the UK.                                       |
| `businessName`                      | string  | Business name.                                                                                                   |
| `businessType`                      | string  | Business type, such as `Restaurant/Cafe/Canteen` or `Takeaway/sandwich shop`.                                    |
| `businessTypeId`                    | number  | Id of the business type.                                                                                         |
| `addressLine1`                      | string  | First address line.                                                                                              |
| `addressLine2`                      | string  | Second address line.                                                                                             |
| `addressLine3`                      | string  | Third address line.                                                                                              |
| `addressLine4`                      | string  | Fourth address line, usually the town.                                                                           |
| `postcode`                          | string  | Postcode. `null` for businesses run from a private address.                                                      |
| `address`                           | string  | The address lines and postcode in one line.                                                                      |
| `latitude`                          | number  | Latitude. `null` when the business has no published location.                                                    |
| `longitude`                         | number  | Longitude.                                                                                                       |
| `ratingValue`                       | string  | The rating: `0` to `5`, `Pass`, `Improvement Required`, `AwaitingInspection`, `AwaitingPublication` or `Exempt`. |
| `ratingNumber`                      | number  | The rating as a number, for 0 to 5 ratings; `null` otherwise.                                                    |
| `ratingKey`                         | string  | The rating's key, such as `fhrs_5_en-gb`.                                                                        |
| `ratingDate`                        | string  | Date of the inspection the rating comes from (`YYYY-MM-DD`). `null` for a business not yet rated.                |
| `newRatingPending`                  | boolean | Whether a newer rating is waiting to be published, for example during an appeal.                                 |
| `hygieneScore`                      | number  | Food hygiene and safety score: 0 is best, 25 is worst. Only in England, Wales and Northern Ireland.              |
| `hygieneDescription`                | string  | What the hygiene score means, such as `Good` or `Improvement necessary`.                                         |
| `structuralScore`                   | number  | Structure and cleaning score: 0 is best, 25 is worst.                                                            |
| `structuralDescription`             | string  | What the structural score means.                                                                                 |
| `confidenceInManagementScore`       | number  | Confidence in management score: 0 is best, 30 is worst.                                                          |
| `confidenceInManagementDescription` | string  | What the confidence in management score means.                                                                   |
| `schemeType`                        | string  | `FHRS` (England, Wales, Northern Ireland) or `FHIS` (Scotland).                                                  |
| `rightToReply`                      | string  | The business's published reply to its rating, when it has one.                                                   |
| `localAuthorityName`                | string  | The council that inspected the business.                                                                         |
| `localAuthorityCode`                | string  | The council's code.                                                                                              |
| `localAuthorityEmail`               | string  | The council's food safety team email.                                                                            |
| `localAuthorityWebsite`             | string  | The council's website.                                                                                           |
| `localAuthorityBusinessId`          | string  | The council's own reference for the business.                                                                    |
| `region`                            | string  | Region of the council, such as `London`, `North West`, `Wales` or `Scotland`.                                    |
| `url`                               | string  | The business's page on ratings.food.gov.uk.                                                                      |

<details><summary>Example output</summary>

```json
{
  "fhrsId": 1226939,
  "businessName": "Pizza Pilgrims",
  "businessType": "Restaurant/Cafe/Canteen",
  "businessTypeId": 1,
  "addressLine1": "Kiosk 2013A",
  "addressLine2": "Westfield London Shopping Centre",
  "addressLine3": "Ariel Way",
  "addressLine4": "London",
  "postcode": "W12 7GE",
  "address": "Kiosk 2013A, Westfield London Shopping Centre, Ariel Way, London, W12 7GE",
  "latitude": 51.5075798034668,
  "longitude": -0.221279993653297,
  "ratingValue": "5",
  "ratingNumber": 5,
  "ratingKey": "fhrs_5_en-gb",
  "ratingDate": "2025-05-29",
  "newRatingPending": false,
  "hygieneScore": 5,
  "hygieneDescription": "Good",
  "structuralScore": 5,
  "structuralDescription": "Good",
  "confidenceInManagementScore": 5,
  "confidenceInManagementDescription": "Good",
  "schemeType": "FHRS",
  "rightToReply": null,
  "localAuthorityName": "Hammersmith and Fulham",
  "localAuthorityCode": "513",
  "localAuthorityEmail": "foodandsafety@lbhf.gov.uk",
  "localAuthorityWebsite": "http://www.lbhf.gov.uk",
  "localAuthorityBusinessId": "2019/00421/COMB",
  "region": "London",
  "url": "https://ratings.food.gov.uk/business/1226939/pizza-pilgrims-ariel-way"
}
```

</details>

### 💡 Use cases

- **Lead generation for hospitality suppliers** — list every restaurant, café, takeaway or pub in a council, town or postcode district, with its address, postcode and coordinates, for food, drink, equipment, POS, delivery or cleaning sales.
- **Sales targeting by hygiene score** — find businesses rated 2 or lower that may need cleaning, pest-control, training or refit services, or those rated 5 to showcase as partners.
- **Food-delivery and marketplace onboarding** — check the current rating of restaurants before listing them, and monitor changes.
- **Insurance and risk** — add hygiene ratings and inspection dates to underwriting and portfolio reviews of food businesses.
- **Location and market analysis** — map restaurant density, cuisine mix and hygiene standards by council or region.
- **Journalism and research** — compare hygiene standards across councils, chains or business types over time.

### ❓ FAQ

- **Do I need an account or an API key?** No. The Food Standards Agency publishes the ratings as open data, and the Actor needs no login, key or proxy.
- **Which areas are covered?** England, Wales and Northern Ireland (the Food Hygiene Rating Scheme, 0 to 5) and Scotland (the Food Hygiene Information Scheme, Pass or Improvement Required): over half a million businesses.
- **Why are some scores or coordinates empty?** Scores are published only in England, Wales and Northern Ireland, and not when a council uploads a re-score. A business run from a private address has no published address details or location.
- **Is a lower score better?** Yes. The three inspection scores are points against the business: 0 is best. The rating itself runs the other way, 5 being best.
- **How do I find a council's name?** Use its name as ratings.food.gov.uk lists it, such as `Southwark` or `Edinburgh (City of)`; the everyday form (`City of Edinburgh`) also works. A name the Actor cannot place stops the run with a clear message.
- **How fresh is the data?** Councils upload new ratings continuously, and every run reads the live data. Ratings change after each inspection, so always show the rating date alongside a rating.
- **Can I use the FSA rating stickers or logos?** No. The data is free to reuse, but the rating images and the FSA logo are trademarks with their own rules, and nothing here implies the Food Standards Agency endorses a business or a product.

Contains public sector information published by the Food Standards Agency and licensed under the
[Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).

### 🔗 More scrapers by Anyx

- [Google Maps Email Extractor](https://apify.com/anyxsolutions/google-maps-email-extractor)
- [Yellow Pages Scraper](https://apify.com/anyxsolutions/yellowpages-scraper)
- [Trustpilot Scraper](https://apify.com/anyxsolutions/trustpilot-scraper)
- [Web Content Scraper](https://apify.com/anyxsolutions/web-content-scraper)

### 🤝 Anyx Solutions

We build custom scrapers and data-extraction pipelines.

- Email: tantosthor@gmail.com

# Actor input Schema

## `startUrls` (type: `array`):

Public ratings.food.gov.uk pages: a search (https://ratings.food.gov.uk/business-search?business-name-search=pizza\&address-search=london), a local authority search (https://ratings.food.gov.uk/authority-search-landing/528) or a business page (https://ratings.food.gov.uk/business/1158712/pizza-pilgrims).

## `businessName` (type: `string`):

Find businesses whose name contains these words, for example Costa or pizza.

## `address` (type: `string`):

Find businesses at an address, town or postcode, for example Manchester, SE1 or SE1 2ER.

## `localAuthorities` (type: `array`):

Only return businesses inspected by these councils, one per line, for example Southwark, Manchester or City of Edinburgh. Each council runs as its own search.

## `country` (type: `string`):

Only return businesses in this UK country. Ignored when local authorities are set.

## `businessType` (type: `string`):

Only return businesses of this type, such as restaurants and cafés, takeaways, pubs or hotels.

## `rating` (type: `string`):

Only return businesses with this rating: 0 to 5 in England, Wales and Northern Ireland, Pass or Improvement Required in Scotland, or a status such as Awaiting Inspection or Exempt.

## `ratingComparison` (type: `string`):

How a 0 to 5 rating is matched: exactly, that rating or better, or that rating or worse. Statuses are always matched exactly.

## `sortBy` (type: `string`):

Order of results for the filter search: best match, rating (highest or lowest first) or business name (A to Z or Z to A).

## `maxItems` (type: `integer`):

Maximum number of businesses to return per URL or local authority. Leave empty for every matching business.

## `proxyConfiguration` (type: `object`):

Proxy settings. Food hygiene ratings are open data and need no proxy.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://ratings.food.gov.uk/business-search?business-name-search=pizza&address-search=london"
    }
  ],
  "ratingComparison": "equal",
  "sortBy": "relevance",
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://ratings.food.gov.uk/business-search?business-name-search=pizza&address-search=london"
        }
    ],
    "maxItems": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("anyxsolutions/food-hygiene-ratings-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": [{ "url": "https://ratings.food.gov.uk/business-search?business-name-search=pizza&address-search=london" }],
    "maxItems": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("anyxsolutions/food-hygiene-ratings-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://ratings.food.gov.uk/business-search?business-name-search=pizza&address-search=london"
    }
  ],
  "maxItems": 5
}' |
apify call anyxsolutions/food-hygiene-ratings-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,anyxsolutions/food-hygiene-ratings-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/NTwMcQ6afaqXj6kOE/builds/pHFQw3hGDSt0VSROS/openapi.json
