# UK Food Hygiene Ratings & Restaurant Leads Scraper (`logiover/uk-food-hygiene-ratings-scraper`) Actor

Export hundreds of thousands of UK restaurants, takeaways, retailers and food businesses from the official Food Standards Agency API. Includes hygiene ratings, inspection dates, addresses, coordinates, business types and management scores.

- **URL**: https://apify.com/logiover/uk-food-hygiene-ratings-scraper.md
- **Developed by:** [Logiover](https://apify.com/logiover) (community)
- **Categories:** Lead generation
- **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/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 & Restaurant Leads Scraper

Export restaurants, takeaways, pubs, hotels, caterers, supermarkets, schools, care facilities, manufacturers, and other food businesses from the official UK Food Standards Agency ratings service. The Actor provides a clean national dataset with hygiene ratings, inspection dates, business types, addresses, coordinates, local-authority information, and component inspection scores.

The official service covers hundreds of thousands of establishments across England, Wales, Scotland, and Northern Ireland and is updated by local authorities. This Actor uses the documented Food Hygiene Ratings API and always supplies a local-authority filter, avoiding the CPU-intensive unfiltered query that the API correctly rejects.

### What you can use it for

- Build restaurant, takeaway, hospitality, retail, or catering lead lists.
- Find low-rated businesses for compliance, training, cleaning, pest-control, maintenance, and food-safety services.
- Find highly rated venues for directories, maps, consumer research, and location intelligence.
- Monitor recent ratings or establishments with a new rating pending.
- Segment businesses by nation, local authority, business type, rating, or name.
- Enrich commercial property, franchise, delivery, POS, supplier, insurance, and hospitality datasets.
- Create geographic analyses using official latitude and longitude values.

### Data included

Each result includes the official FHRS identifier, local-authority business ID, business name and type, rating value and date, scheme type, full address, available phone number, local authority contact information, latitude and longitude, and the direct business rating page.

Where the authority publishes component scores, the Actor keeps:

- hygiene score
- structural score
- confidence-in-management score

The UK schemes differ. England, Wales, and Northern Ireland commonly publish numeric 0–5 ratings. Scotland uses values such as `Pass` and `Improvement Required`. The original `RatingValue`, `RatingKey`, and `SchemeType` are preserved so those systems are not incorrectly mixed.

### Input

The default run returns up to 1,000 establishments sampled across multiple local authorities. Set `maxResults` as high as 500,000 for a near-national export.

Available filters:

- `regions`: England, Scotland, Wales, and/or Northern Ireland
- `localAuthorities`: exact authority names, friendly names, API IDs, or authority codes
- `businessTypes`: exact official business-type labels
- `ratingValues`: exact rating values, including numeric strings or Scottish labels
- `minimumRating`: minimum numeric FHRS rating from 0 to 5
- `nameContains`: case-insensitive business-name fragment
- `newRatingPendingOnly`: only records awaiting publication of a new rating

Example: London restaurant and takeaway leads rated 0–2 can be requested by listing the individual rating values:

```json
{
  "maxResults": 10000,
  "regions": ["England"],
  "localAuthorities": ["Westminster", "Camden", "Tower Hamlets"],
  "businessTypes": ["Restaurant/Cafe/Canteen", "Takeaway/sandwich shop"],
  "ratingValues": ["0", "1", "2"]
}
```

Example: Scottish businesses requiring improvement:

```json
{
  "maxResults": 5000,
  "regions": ["Scotland"],
  "ratingValues": ["Improvement Required"]
}
```

### Output example

```json
{
  "fhrsId": "1234567",
  "businessName": "Example Kitchen",
  "businessType": "Restaurant/Cafe/Canteen",
  "ratingValue": "5",
  "ratingDate": "2026-07-20",
  "address": { "line1": "10 High Street", "postCode": "SW1A 1AA" },
  "localAuthority": { "name": "Westminster", "region": "England" },
  "scores": { "hygiene": 0, "structural": 0, "confidenceInManagement": 0 },
  "latitude": 51.5,
  "longitude": -0.12
}
```

Results are stored in the default Apify dataset and are available as JSON, CSV, Excel, XML, or through the Apify API and integrations.

### Performance and reliability

The FSA rejects national establishment searches without a meaningful filter. The Actor first downloads the official authority directory, then requests establishments one authority at a time. Page sizes are chosen from `maxResults` to keep the default dataset geographically useful while allowing high-volume exports. Requests retry transient failures, dataset items are written in batches, and pagination follows the API-provided page counts.

Filters that the national API cannot apply uniformly are checked locally. Rare combinations may therefore scan many establishments before producing the requested number of matches.

### Data source and responsible use

Ratings and business details come from the Food Standards Agency on behalf of UK local authorities. A rating describes food-hygiene standards observed at the relevant inspection; it is not a review of food quality. Publication schedules and field coverage vary by authority. Empty contact fields remain empty, and missing inspection scores remain `null`.

Follow FSA open-data terms and applicable privacy and marketing laws. Direct questions about a business rating to the responsible local authority. This Actor is not affiliated with or endorsed by the Food Standards Agency.

### Pricing

Pay-per-event pricing charges a small Actor-start event and one result event for each saved establishment. `maxResults` gives you a predictable upper bound; scanned but non-matching source rows are not charged as results.

### Changelog

#### 2026-08-03 — 1.0.0

- Initial release.
- Verified live API v2 authority and establishment responses.
- Added authority-aware national pagination, all four UK regions, scheme-safe ratings, component scores, geocodes, retries, batch writes, and dataset overview.

# Actor input Schema

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

Maximum matching establishments to save. Raise up to 500,000 for a UK-wide export.

## `regions` (type: `array`):

Optional FSA regions. Empty means all available regions.

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

Optional exact authority names, friendly names, numeric IDs or authority codes, for example Westminster or 511.

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

Optional exact FSA types such as Restaurant/Cafe/Canteen, Takeaway/sandwich shop or Retailers - other.

## `ratingValues` (type: `array`):

Optional exact values. Numeric FHRS ratings use 0–5; Scotland uses Pass, Improvement Required and related values.

## `minimumRating` (type: `integer`):

Optional minimum 0–5 rating. Non-numeric Scottish scheme values are excluded when this is set.

## `nameContains` (type: `string`):

Optional case-insensitive business-name fragment.

## `newRatingPendingOnly` (type: `boolean`):

Only keep establishments flagged as awaiting publication of a new rating.

## Actor input object example

```json
{
  "maxResults": 1000,
  "regions": [],
  "localAuthorities": [],
  "businessTypes": [],
  "ratingValues": [],
  "nameContains": "",
  "newRatingPendingOnly": false
}
```

# Actor output Schema

## `results` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/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 = {}

# Run the Actor and wait for it to finish
run = client.actor("logiover/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 '{}' |
apify call logiover/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,logiover/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/NWrY5kAIdNxWx5RQ3/builds/YaaNGLafetfrLJBgH/openapi.json
