# UK Food Hygiene Ratings Scraper · FSA Register (`automation_craft/uk-food-hygiene-ratings-scraper`) Actor

Search the official UK food hygiene register: 600,000+ restaurants, takeaways, pubs, hotels, shops and caterers across England, Wales, Scotland and NI. Filter by rating, council, business type or map radius. Addresses, geocodes, scores and inspection dates. Pay only for results.

- **URL**: https://apify.com/automation\_craft/uk-food-hygiene-ratings-scraper.md
- **Developed by:** [Automation Craft](https://apify.com/automation_craft) (community)
- **Categories:** Lead generation, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## UK Food Hygiene Ratings Scraper (FSA Register)

Search the **official UK Food Standards Agency hygiene register** — 600,000+ restaurants, cafes, takeaways, pubs, hotels, supermarkets, schools, caterers and food manufacturers across **England, Wales, Scotland and Northern Ireland** — and export clean JSON/CSV/Excel.

No API keys. No proxies to configure. Press Start, get data. **You only pay for establishments actually returned** — empty searches cost nothing.

### What you can do with it

- **Build lead lists** of every food business in a town, council area or map radius — with full address, geocodes and council contact.
- **Find businesses that need help**: filter for 0, 1 and 2-rated establishments — the exact prospect list for hygiene consultants, pest control, cleaning services, training providers and kitchen-equipment suppliers.
- **Vet suppliers and franchise sites**: check ratings, score breakdowns and inspection dates before you sign.
- **Monitor your own estate**: pull every branch by name (e.g. `Greggs`) and catch rating changes and pending re-inspections.
- **Enrich datasets**: match by name/postcode and add official hygiene ratings to your own restaurant or property data.

### Search options (combine freely)

| Input | Example | What it does |
| --- | --- | --- |
| `name` | `pizza`, `Greggs` | Match business names |
| `address` | `LS1`, `Manchester`, `M4 3AQ` | Match street, town, or any postcode/prefix |
| `localAuthorities` | `["Leeds", "Birmingham"]` | Everything a council covers (name or numeric id) |
| `ratings` | `["0", "1", "2"]` | Only these hygiene ratings |
| `businessTypes` | `["Restaurant/Cafe/Canteen"]` | Only these kinds of business |
| `country` | `Scotland` | One UK country only |
| `latitude` + `longitude` + `radiusMiles` | `53.801, -1.549, 2` | Map radius search, sorted nearest-first with distances |
| `sortBy` | `rating (low to high)` | Relevance, rating, name or distance ordering |
| `maxResults` | `500` | Hard cap on results (and on what you pay) |

Run with completely empty input `{}` and you get a live demo (50 pizza businesses).

### Output

One record per establishment:

```json
{
    "type": "establishment",
    "fhrsId": 1451191,
    "name": "Pizza Pizza",
    "businessType": "Takeaway/sandwich shop",
    "ratingValue": "5",
    "ratingNumeric": 5,
    "ratingDate": "2025-01-20",
    "newRatingPending": false,
    "scheme": "FHRS",
    "scores": { "hygiene": 5, "structural": 5, "confidenceInManagement": 5 },
    "addressLine1": "124 Dib Lane",
    "addressLine2": "Roundhay",
    "addressLine3": "Leeds",
    "addressLine4": null,
    "postcode": "LS8 3AY",
    "fullAddress": "124 Dib Lane, Roundhay, Leeds, LS8 3AY",
    "latitude": 53.823107,
    "longitude": -1.486815,
    "distanceMiles": null,
    "localAuthority": {
        "name": "Leeds",
        "code": "413",
        "email": "food.safety@leeds.gov.uk",
        "website": "http://www.leeds.gov.uk/"
    },
    "localAuthorityBusinessId": "21/00957/COMM",
    "phone": null,
    "pageUrl": "https://ratings.food.gov.uk/business/1451191",
    "searchedName": "pizza",
    "searchedAddress": null,
    "searchedAuthority": null
}
```

Notes on ratings:

- **England, Wales & NI (FHRS)**: `ratingValue` is `0`–`5`; `scores` breaks it down into hygiene / structural / confidence-in-management (lower component scores are better; they are the inspector's demerit points).
- **Scotland (FHIS)**: `ratingValue` is `Pass` or `ImprovementRequired`; `ratingNumeric` and `scores` are `null` — Scotland's scheme simply doesn't publish them.
- Non-inspected statuses also appear where relevant: `AwaitingInspection`, `AwaitingPublication`, `Exempt`.

Every run also pushes one free `summary` item (counts, warnings, API calls) — and free `status` items explain any query that returned nothing.

### Pricing — pay per result, honestly

- One small fee per **establishment record** actually delivered.
- **$0 for empty searches**, unknown council names, API hiccups, the summary and all status items.
- Duplicate establishments across overlapping filters are deduplicated — you never pay twice for the same business in one run.
- `maxResults` is a hard spending cap.

### ✅ What this Actor CAN do

- Search all four UK nations from the FSA's official, continuously-updated register.
- Filter by rating (including Scotland's Pass/Improvement Required), business type, council, country and map radius.
- Return full address, coordinates, distance, component scores, inspection date, council contact details and a link to the official rating page.
- Export CSV/Excel/JSON directly from the dataset. Typical speed: hundreds of records per second of runtime.

### ❌ What this Actor CANNOT do

- **Inspection report documents** — the register publishes ratings and scores, not the inspector's written report (request those from the council; each record includes the council's email).
- **Owner/operator personal contact details** — `phone` is only present when the register publishes it (rare). Council contact details are always included; establishment emails are not published at all.
- **Rating history** — the register only exposes each establishment's current rating.
- Non-UK data, and food businesses that a council hasn't registered/inspected yet.

Data source: Food Standards Agency Food Hygiene Rating Scheme via the official public API (`api.ratings.food.gov.uk`), published under the Open Government Licence v3.0. This Actor is not affiliated with or endorsed by the FSA. Please use the data in line with the OGL and the FSA's terms.

# Actor input Schema

## `name` (type: `string`):

Match against business names, e.g. `pizza`, `Greggs`, `Costa`. Combine freely with the other filters.

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

Match against the address: a postcode (`LS1 2JG`), partial postcode (`LS1`), street or town (`Manchester`).

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

Restrict to one or more councils, by name (`Leeds`, `Bath and North East Somerset`) or numeric id. One API query is run per council — great for pulling every establishment a council covers.

## `ratings` (type: `array`):

Only return establishments with these ratings. England/Wales/NI use `0`–`5` (FHRS); Scotland uses `Pass` / `ImprovementRequired` (FHIS). Also valid: `AwaitingInspection`, `AwaitingPublication`, `Exempt`. Leave empty for all ratings.

## `businessTypes` (type: `array`):

Only return these kinds of businesses. Leave empty for all types.

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

Restrict to one UK country.

## `latitude` (type: `string`):

Center latitude for a radius search, e.g. `53.801` (Leeds). Needs `longitude` too; results get a `distanceMiles` field and sort nearest-first.

## `longitude` (type: `string`):

Center longitude for a radius search, e.g. `-1.549` (Leeds).

## `radiusMiles` (type: `integer`):

Radius for the map search in miles (default 2, max 30).

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

Result order. `distance` needs a map search; map searches default to `distance` automatically.

## `maxResults` (type: `integer`):

Hard cap on establishments returned (and charged). Default 500.

## Actor input object example

```json
{
  "name": "pizza",
  "localAuthorities": [],
  "maxResults": 50
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `establishments` (type: `string`):

No description

## `resultsCsv` (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 = {
    "name": "pizza",
    "localAuthorities": [],
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation_craft/uk-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 = {
    "name": "pizza",
    "localAuthorities": [],
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("automation_craft/uk-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 '{
  "name": "pizza",
  "localAuthorities": [],
  "maxResults": 50
}' |
apify call automation_craft/uk-food-hygiene-ratings-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation_craft/uk-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/6AlUwj3vllPXuwhtT/builds/K5uWXlGVTd6r9rCzr/openapi.json
