# UK Food Hygiene Ratings Scraper: FSA API to CSV (`mrslm_data/uk-food-hygiene-ratings`) Actor

Export UK food hygiene ratings, inspection dates, scores and addresses. $0.90 per 1,000 establishments plus $0.00005 per start.

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

## Pricing

from $0.72 / 1,000 establishments

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

## UK Food Hygiene Ratings Scraper: FSA API to CSV

**Export UK food hygiene data for $0.90 per 1,000 establishments, plus $0.00005 per start. Silver: $0.81 per 1,000; Gold: $0.72 per 1,000.**

Search the Food Standards Agency ratings API for establishments in England, Wales, Northern Ireland and Scotland. Results can include the rating, inspection date, scores and address.

Filter by business name, location or rating, then download the results as JSON, CSV or Excel.

Every food business in England, Wales, Northern Ireland and Scotland is inspected by its local council and rated publicly through the Food Standards Agency. That is over 500,000 premises, from takeaways to supermarkets, each with an address, a rating and the date of the last inspection.

### Quick start

1. Press **Start**. The form is already filled with this example input, so the first run returns real rows in under a minute:

```json
{
  "businessNames": [
    "pizza"
  ],
  "locations": [
    "Manchester"
  ],
  "maxResults": 100
}
```

2. Swap in your own values, or call the Actor through the Apify API, Make, Zapier, n8n or the Python/JS clients with the same JSON.
3. Download the results as JSON, CSV or Excel from the **Output** tab, or schedule the run to repeat.

### Example inputs

Search by business name and location:

```json
{
  "businessNames": ["pizza"],
  "locations": ["Manchester"],
  "maxResults": 100
}
```

Find establishments with selected ratings in a town:

```json
{
  "locations": ["Leeds"],
  "ratings": ["0", "1"],
  "maxResults": 100
}
```

Search for a business with a Scottish rating:

```json
{
  "businessNames": ["cafe"],
  "locations": ["Glasgow"],
  "ratings": ["pass"]
}
```

### Sample row (real run, trimmed)

```json
{
  "fhrsId": 1910664,
  "businessName": "Berkeley House",
  "nameWithheld": false,
  "businessType": "Caring Premises",
  "ratingValue": "5",
  "ratingNumeric": 5,
  "ratingDate": "2026-01-21",
  "newRatingPending": false,
  "scheme": "FHRS",
  "hygieneScore": 0,
  "structuralScore": 0,
  "confidenceInManagementScore": 5,
  "address": "Berkeley Close, Stroud, Gloucestershire",
  "postcode": "GL5 4SA",
  "latitude": 51.7462683,
  "longitude": -2.24779045,
  "localAuthority": "Stroud",
  "localAuthorityCode": "128",
  "localAuthorityWebsite": "http://www.stroud.gov.uk",
  "localAuthorityFoodTeamEmail": "environmental.health@stroud.gov.uk",
  "rightToReply": null,
  "ratingUrl": "https://ratings.food.gov.uk/business/1910664"
}
```

Also included: FHRS ID, numeric rating, new-rating-pending flag, scheme (FHRS or Scotland's FHIS), hygiene, structural and confidence-in-management scores, latitude and longitude, council code, website and food team e-mail (a council address), and the right-to-reply text.

### Who uses this

- **Food-delivery, POS and supplier sales teams**: list restaurants and takeaways in a town, with fresh inspection dates.
- **Consumers, journalists and local sites**: find the lowest-rated places in an area.
- **Insurers, landlords and analysts**: check hygiene history and map food businesses.

### How to use it

1. Enter business names, an address or postcode, or council names, and pick business types and ratings.
2. Use "Rating comparison" = this rating or lower with rating 1 to get only poor ratings.
3. Run, export, or schedule weekly to catch new inspections.

### Pricing

- **Establishment: $0.90 per 1,000 saved** (Silver $0.81, Gold $0.72)
- Plus $0.00005 per run. You pay only for establishments saved after your filters. Searches with no matches are free.

### FAQ

**Where does the data come from?** From the official Food Standards Agency ratings API (api.ratings.food.gov.uk), published under the Open Government Licence.

**Is any personal data included?** Contact details are not in the data. Home-based and mobile businesses that are registered under a person's own name (e.g. a childminder) are output with the name withheld (null) and nameWithheld = true, so you still get the rating and area without the person's name.

**How fresh is it?** Live. Councils upload new inspection results to the FSA continuously, usually within a few weeks of the visit.

**Can I get only new records each day?** Yes. Use the date window input and schedule the Actor; each run returns what is new in that window.

**Does the Actor cover Scotland?** Yes. The FSA API includes Scottish Food Hygiene Information Scheme records as well as records from England, Wales and Northern Ireland.

**Can I filter establishments by rating?** Yes. Use the ratings input to select one or more ratings.

**Which export formats are available?** You can download results from Apify as JSON, CSV or Excel.

### Is it legal?

This Actor only reads official open-data APIs that the publisher offers to everyone without a login or key. It obeys robots.txt, stays under the published rate limits, and never tries to get past logins, paywalls, captchas or bot checks. Contact details are not in the data. Home-based and mobile businesses that are registered under a person's own name (e.g. a childminder) are output with the name withheld (null) and nameWithheld = true, so you still get the rating and area without the person's name. You are responsible for how you use the data: follow the source's licence and terms and the privacy and marketing laws that apply to you (GDPR, CAN-SPAM, PECR, etc.). This tool is independent and not affiliated with or endorsed by the data publisher.

# Actor input Schema

## `businessNames` (type: `array`):

Name or part of it, e.g. pizza, Greggs, Wetherspoon. One per line.

## `locations` (type: `array`):

Words in the address, a town or a postcode, e.g. Manchester, SW1A, Leeds LS1.

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

Council names, e.g. Westminster, Cardiff, Glasgow City. Best way to cover a whole area.

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

Default: all.

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

Default: any rating.

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

How a single numeric rating is applied.

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

Order of results.

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

Safety cap on saved establishments. 0 = no cap. Your max cost per run is always respected.

## Actor input object example

```json
{
  "businessNames": [
    "pizza"
  ],
  "locations": [
    "Manchester"
  ],
  "ratingComparison": "equal",
  "sortBy": "relevance",
  "maxResults": 100
}
```

# Actor output Schema

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

All establishments as a dataset (JSON, CSV, Excel and more via the API or Console).

## `summary` (type: `string`):

Matches and saved rows per search, failures and the stop reason.

# 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 = {
    "businessNames": [
        "pizza"
    ],
    "locations": [
        "Manchester"
    ],
    "maxResults": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("mrslm_data/uk-food-hygiene-ratings").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 = {
    "businessNames": ["pizza"],
    "locations": ["Manchester"],
    "maxResults": 100,
}

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

```

## MCP server setup

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

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/YGqHQ6iTKdOyE2eWn/builds/fZS7x7Hg9t8cvrJT9/openapi.json
