# UK Food Hygiene Scraper — Ratings & Businesses (`hipersoft/uk-food-hygiene-scraper`) Actor

Fetch UK Food Standards Agency food hygiene ratings in bulk: search businesses by name, address or postcode and get each establishment's rating, address, scores, local authority and location. Clean structured JSON, CSV or Excel for food, compliance, lead generation and n8n.

- **URL**: https://apify.com/hipersoft/uk-food-hygiene-scraper.md
- **Developed by:** [hiper soft](https://apify.com/hipersoft) (community)
- **Categories:** Other, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.0005 / establishment scraped

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?

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 Scraper — Ratings & Businesses

UK Food Hygiene Scraper pulls **official food hygiene ratings** for food businesses across England, Wales, Scotland and Northern Ireland as clean, structured data. Search by business name, town or postcode, filter by business type or exact rating, and get back one row per establishment — its rating, full address, hygiene/structural/management scores, local authority and map coordinates. Export to JSON, CSV, Excel or XML. Built for food and hospitality research, compliance checks, lead generation and automation workflows.

### What does this UK Food Hygiene Scraper do?

Give it a business name, a location, or both, and it returns every matching establishment as structured data:

- **Search by name** — look up a chain or a single venue by business name (partial matches supported).
- **Filter by location** — narrow results to a town, street or full/partial postcode.
- **Filter by business type** — restrict to restaurants, takeaways, pubs, retailers, mobile caterers and more.
- **Filter by rating** — return only 5-star venues, 0-star venues, or any specific rating.
- **Bulk export** — page through thousands of matching businesses in a single run, capped by **Max items**.

### What data can you get?

| Field | Description |
| --- | --- |
| `fhrsId` | Unique food-hygiene establishment ID. |
| `businessName` | Name of the food business. |
| `businessType` | Type of business (e.g. Restaurant/Cafe/Canteen, Takeaway). |
| `businessTypeId` | Numeric business-type ID. |
| `ratingValue` | The published hygiene rating (e.g. `5`, `4`, `AwaitingInspection`). |
| `ratingKey` | Machine-readable rating key (e.g. `fhrs_5_en-gb`). |
| `ratingDate` | Date the rating was given. |
| `addressLine1`–`addressLine4` | The establishment's address lines. |
| `postcode` | Postcode of the business. |
| `latitude` / `longitude` | Map coordinates, where available. |
| `localAuthority` | The local authority that inspected the business. |
| `scores` | Sub-scores: `hygiene`, `structural` and `management`. |
| `url` | Link to the business's public rating page. |

### What you get

Each establishment is one clean dataset record. Export the full table to JSON, CSV, Excel or XML, or pull it programmatically.

```json
{
  "fhrsId": 1226939,
  "businessName": "Pizza Pilgrims",
  "businessType": "Restaurant/Cafe/Canteen",
  "businessTypeId": 1,
  "ratingValue": "5",
  "ratingKey": "fhrs_5_en-gb",
  "ratingDate": "2025-05-29T00:00:00",
  "addressLine1": "Kiosk 2013A",
  "addressLine2": "Westfield London Shopping Centre",
  "addressLine3": "Ariel Way",
  "addressLine4": "London",
  "postcode": "W12 7GE",
  "latitude": 51.50758,
  "longitude": -0.22128,
  "localAuthority": "Hammersmith and Fulham",
  "scores": { "hygiene": 5, "structural": 5, "management": 5 },
  "url": "https://ratings.food.gov.uk/business/en-GB/1226939"
}
```

### Use cases

- Check the current hygiene rating of any UK food business before working with it.
- Build a directory of restaurants, takeaways or retailers in a town or postcode area.
- Generate qualified leads — every result includes name, address, local authority and location.
- Monitor rating changes across a chain, a supplier list or a delivery catchment.
- Enrich a compliance, insurance or due-diligence dataset with official ratings.

### How to use the UK Food Hygiene Scraper

1. Add the UK Food Hygiene Scraper to your Apify account and open its input.
2. Enter a **Business name** and/or an **Address or postcode**.
3. Optionally set a **Business type ID** or a **Rating key** to filter further.
4. Set **Max items** to cap how many establishments you collect.
5. Click **Run**, then export the results as JSON, CSV, Excel or XML, or pull them via the Apify API.

### Input

```json
{
  "name": "pizza",
  "address": "London",
  "maxItems": 200
}
```

| Field | Description |
| --- | --- |
| `name` | Business name to search for (partial matches supported). |
| `address` | Town, street or full/partial postcode. |
| `businessType` | Optional FSA business-type ID to filter by. |
| `ratingKey` | Optional exact rating filter (e.g. `fhrs_5_en-gb`). |
| `maxItems` | Maximum number of establishments to return. |

### Need more business & location data?

- [Google Maps Scraper](https://apify.com/hipersoft/google-maps-scraper) — places, contact details and reviews.
- [Website Contact Scraper](https://apify.com/hipersoft/website-contact-scraper) — emails, phones and socials from any site.
- [Checkatrade Scraper](https://apify.com/hipersoft/checkatrade-scraper) — UK trade businesses and reviews.

### FAQ

**Which businesses are covered?**
Food businesses registered with UK local authorities under the national food hygiene rating scheme — restaurants, cafes, takeaways, pubs, hotels, schools, supermarkets, mobile caterers, distributors and more, across England, Wales, Scotland and Northern Ireland.

**What do the ratings mean?**
Most businesses carry a rating from 5 (very good) down to 0 (urgent improvement needed). Some show `AwaitingInspection` or `Exempt`, and Scottish businesses use a Pass / Improvement Required scheme. Each record also includes the underlying hygiene, structural and management sub-scores.

**How do I filter to a specific area?**
Put a town, street or postcode in the **Address or postcode** field. You can combine it with a business name and a rating filter in the same run.

**What export formats are supported?**
JSON, CSV, Excel and XML, plus programmatic access through the Apify API.

**How does billing work?**
You pay per establishment scraped, so cost scales with the number of records you actually collect. See the **Pricing** tab for current rates.

**Can I use this with n8n?**
Yes. Run the UK Food Hygiene Scraper from [n8n](https://n8n.io) with the Apify node — trigger a run, pass your search terms, and read the dataset items straight into your workflow. It also works with Make, Zapier and the Apify API.

**Can I connect this to other tools?**
The UK Food Hygiene Scraper connects with almost any cloud service or web app thanks to [integrations on the Apify platform](https://apify.com/integrations). It works with [Make](https://apify.com/integrations/make), [Zapier](https://apify.com/integrations/zapier), [Slack](https://docs.apify.com/platform/integrations/slack), [Airbyte](https://docs.apify.com/platform/integrations/airbyte), [GitHub](https://docs.apify.com/platform/integrations/github), [Google Drive](https://docs.apify.com/platform/integrations/drive) and [many more](https://apify.com/integrations), plus the [Apify API](https://docs.apify.com/api/v2), JavaScript/Python clients and MCP. Or use [webhooks](https://docs.apify.com/platform/integrations/webhooks) to trigger an action whenever a run finishes.

### Related Actors

- [Google Maps Scraper](https://apify.com/hipersoft/google-maps-scraper)
- [Website Contact Scraper](https://apify.com/hipersoft/website-contact-scraper)
- [Checkatrade Scraper](https://apify.com/hipersoft/checkatrade-scraper)

### Notes

Original clean-room implementation. Reads only publicly available food hygiene rating information. Not affiliated with, endorsed by or connected to the Food Standards Agency.

# Actor input Schema

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

Business name to search for (e.g. "pizza", "Greggs", "Costa"). Partial matches are supported. Leave empty to match any business and filter by address, business type or rating instead.

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

Town, street or full/partial postcode to narrow the search (e.g. "London", "Manchester", "SW1A"). Leave empty to search across the whole UK.

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

Optional FSA Business Type ID to filter by, e.g. 1 (Restaurant/Cafe/Canteen), 7844 (Pub/bar/nightclub), 7846 (Retailers), 7838 (Mobile caterer), 7841 (Distributors/Transporters). Leave empty to include all business types.

## `ratingKey` (type: `string`):

Optional exact rating filter (FSA rating key), e.g. "fhrs\_5\_en-gb" (5 stars), "fhrs\_0\_en-gb" (0 stars) or "fhis\_pass\_en-gb" (Scotland pass). Leave empty to include all ratings.

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

Maximum number of establishments to return. Results are paged in batches of 100 until this cap is reached or there are no more matches.

## Actor input object example

```json
{
  "name": "pizza",
  "address": "London",
  "businessType": "1",
  "ratingKey": "fhrs_5_en-gb",
  "maxItems": 200
}
```

# Actor output Schema

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

The results as dataset items.

# 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",
    "address": "London"
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/uk-food-hygiene-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",
    "address": "London",
}

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/uk-food-hygiene-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",
  "address": "London"
}' |
apify call hipersoft/uk-food-hygiene-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hipersoft/uk-food-hygiene-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/VOM0NeIvjFafpM0cC/builds/IqunicbR2Qxfc3kOC/openapi.json
