# UK Food Hygiene Ratings (FSA) — Scraper & API (`powerfully_goliath/uk-food-hygiene`) Actor

Search the official UK Food Hygiene Rating Scheme by business name, postcode, council, business type, rating, rating date or distance. Tidy rows with rating, address, geo, inspection scores and council contact. No API key. Pay per result.

- **URL**: https://apify.com/powerfully_goliath/uk-food-hygiene.md
- **Developed by:** [Richie Ellis](https://apify.com/powerfully_goliath) (community)
- **Categories:** Lead generation, Other
- **Security:** 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 establishment returneds

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/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 (FSA) — Scraper & API

Get **official UK food hygiene ratings** for restaurants, takeaways, cafés, pubs, shops,
schools and every other food business in England, Wales, Northern Ireland and Scotland.
Search by **business name, postcode, town, council, business type, rating, inspection date
or distance from a point**, and get back tidy, spreadsheet-ready rows.

The data comes straight from the **Food Standards Agency's own Food Hygiene Rating Scheme
API**, published under the Open Government Licence. Nothing is scraped from web pages, so
there are **no blocks, no captchas, no proxies** and **no API key** to set up.

**Pay only for the results you get: $1.50 per 1,000 establishments.**

***

### What you can do with it

- **Lead generation**: every new takeaway or café rated in your area in the last 30 days.
  Useful for food suppliers, EPOS and delivery-app sales teams, pest control, cleaning,
  food-safety consultants and insurers.
- **Compliance and due diligence**: check the rating of every site in a franchise, a
  supplier list or an acquisition target.
- **Find poorly rated premises**: everything rated 0–2 in one council, for consultants
  who help businesses improve.
- **Market research and maps**: every pub in Westminster, or all premises within a mile
  of a postcode, with latitude and longitude.
- **Monitoring**: schedule a weekly run and compare ratings over time.

### Input

Use any mix of filters. Each one narrows the search.

| Field | What it does |
|---|---|
| **Business name** | Whole or part of the trading name, e.g. `Greggs` or `Pizza`. |
| **Address, town or postcode** | `LS1 4DT`, `LS1`, `Harehills Lane` or `Leeds`. |
| **Local authorities** | Council names as the FSA lists them (`Leeds`, `Westminster`, `Cardiff`, `Belfast City`, `Aberdeen City`). Each council is searched in turn. |
| **Business types** | Restaurant/Cafe/Canteen, Takeaway/sandwich shop, Pub/bar/nightclub, Retailers, Hotels, Schools, Mobile caterers and the rest of the FSA's 14 types. |
| **Hygiene rating** + **Rating match** | `5`, `4` … `0` (exactly, at least, or at most), or Scotland's `Pass` / `Improvement Required`, `Awaiting inspection`, `Exempt`. |
| **Rated on or after / before** | An inspection-date window. Accepts `2026-01-01` or relative values like `30 days`. |
| **Latitude, longitude, radius** | Everything within N miles of a point, sortable by distance. |
| **FHRS IDs** | Look up specific businesses by their FSA ID. |
| **Maximum results** | A hard cap. You are never charged for more than this. |

#### Example input

Takeaways in Leeds rated 2 or lower:

```json
{
  "localAuthorities": ["Leeds"],
  "businessTypes": ["Takeaway/sandwich shop"],
  "rating": "2",
  "ratingOperator": "atMost",
  "maxItems": 200
}
```

Everything inspected in the last 30 days within 2 miles of Leeds station, nearest first:

```json
{
  "latitude": 53.7951,
  "longitude": -1.5476,
  "radiusMiles": 2,
  "ratedSince": "30 days",
  "sortBy": "distance",
  "maxItems": 500
}
```

### Output

One row per establishment, in the run's dataset. Download it as **CSV, Excel, JSON, XML
or HTML**, or read it through the Apify API.

```json
{
  "fhrsId": 323546,
  "businessName": "Bamboo Takeaway",
  "businessType": "Takeaway/sandwich shop",
  "ratingValue": "2",
  "ratingDate": "2025-11-04",
  "newRatingPending": false,
  "schemeType": "FHRS",
  "fullAddress": "257 Harehills Lane, Harehills, Leeds, LS8 3RG",
  "postcode": "LS8 3RG",
  "localAuthority": "Leeds",
  "localAuthorityEmail": "food.safety@leeds.gov.uk",
  "latitude": 53.8113,
  "longitude": -1.511455,
  "hygieneScore": 10,
  "structuralScore": 15,
  "confidenceInManagementScore": 10,
  "ratingUrl": "https://ratings.food.gov.uk/business/323546"
}
```

Each row also has the separate address lines, the business type ID, the FSA rating key,
the council's code, website and own reference for the business, the phone number when
the FSA publishes one, the business's right-to-reply text, and the distance in miles for
radius searches.

**About the scores:** the FSA's inspection scores are *points against*: **lower is better**,
and 0 is a perfect score. Scotland (FHIS) does not publish scores.

The **OUTPUT** record in the key-value store summarises the run: the query used, the rows
delivered, the events charged and why the run stopped.

### Pricing

| Event | Price |
|---|---|
| Establishment returned | **$0.0015** ($1.50 per 1,000) |
| Actor start | Apify's minimum ($0.00005 per run) |

You pay only for rows delivered to your dataset. The **Maximum results** cap and your
run's spending limit are both respected exactly: the run stops when either is reached.
A search that matches nothing costs a fraction of a cent.

### Good to know

- Coverage is whatever the FSA publishes: around 600,000 food businesses across 360+
  councils, updated by councils daily.
- Ratings are the council's at the time of inspection. Check `newRatingPending` for a
  re-inspection that has not been published yet.
- Scotland runs its own scheme (FHIS: Pass / Improvement Required); the rest of the UK
  uses 0–5 (FHRS).
- The FSA asks that ratings are shown with their date. Every row carries `ratingDate`.
- Data © Food Standards Agency, licensed under the
  [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).
  This actor is independent and not endorsed by the FSA.

### Related UK open-data actors

- **UK Charity Register**: every registered charity in England & Wales, with income,
  contacts, causes and trustees.
- **UK Government Contracts (Contracts Finder)**: public-sector tenders and awards, with
  buyer contacts.
- **UK Companies House: Companies, Officers & PSCs**: company profiles, directors, owners
  and filings.

# Actor input Schema

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

Whole or part of the trading name, e.g. 'Greggs' or 'Pizza'.

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

Free-text address search: a full postcode (LS1 4DT), a postcode district (LS1), a street or a town.

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

Council names as the FSA lists them, e.g. 'Leeds', 'Westminster', 'Cardiff', 'Belfast City', 'Aberdeen City' — or their numeric FSA LocalAuthorityId. Each council is searched in turn.

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

Only these kinds of premises. Leave empty for all.

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

England, Wales and Northern Ireland use 0-5 (FHRS). Scotland uses Pass / Improvement Required (FHIS).

## `ratingOperator` (type: `string`):

For a 0-5 rating: exactly, or that rating and better/worse. 'At most 2' finds the poorly rated premises.

## `schemeType` (type: `string`):

Which national scheme to search. Leave on 'Both' unless you only want one.

## `ratedSince` (type: `string`):

Only premises whose rating date is on/after this date — e.g. 2026-01-01, or '30 days' for recent inspections. Premises with no rating date are left out when this is set.

## `ratedBefore` (type: `string`):

Only premises whose rating date is on/before this date.

## `latitude` (type: `number`):

Centre of a radius search, e.g. 53.7951.

## `longitude` (type: `number`):

Centre of a radius search, e.g. -1.5476.

## `radiusMiles` (type: `number`):

Search radius around the latitude/longitude. Default 1 mile.

## `fhrsIds` (type: `array`):

Look up specific establishments by their FHRSID (the number in a ratings.food.gov.uk/business/... link).

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

Order of results as returned by the FSA.

## `includeScores` (type: `boolean`):

Add the hygiene, structural and confidence-in-management points (lower is better; 0 is best).

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

Stop after this many establishments. You are charged only for results delivered.

## Actor input object example

```json
{
  "businessName": "Greggs",
  "address": "Leeds",
  "localAuthorities": [
    "Leeds",
    "Westminster"
  ],
  "rating": "any",
  "ratingOperator": "equal",
  "schemeType": "any",
  "sortBy": "relevance",
  "includeScores": true,
  "maxItems": 20
}
```

# Actor output Schema

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

One row per establishment: name, rating, rating date, type, address, council and FSA link.

## `inspection` (type: `string`):

Ratings with hygiene, structural and management scores.

## `runSummary` (type: `string`):

The OUTPUT record: query used, results delivered, events charged and why the run stopped.

# 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 = {
    "businessName": "Greggs",
    "address": "Leeds",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("powerfully_goliath/uk-food-hygiene").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 = {
    "businessName": "Greggs",
    "address": "Leeds",
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("powerfully_goliath/uk-food-hygiene").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 '{
  "businessName": "Greggs",
  "address": "Leeds",
  "maxItems": 20
}' |
apify call powerfully_goliath/uk-food-hygiene --silent --output-dataset

```

## MCP server setup

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

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/vJbx8etu9X3ldlmFn/builds/vXyKlQMR1Rdjp8G7Z/openapi.json
