# UK Food Hygiene Ratings (FSA) Search (`onibaku/uk-food-hygiene-ratings`) Actor

Search every UK food business rated by the Food Standards Agency by name, postcode radius, council, business type or rating. Find newly opened businesses awaiting inspection. Official FSA API, flat output.

- **URL**: https://apify.com/onibaku/uk-food-hygiene-ratings.md
- **Developed by:** [Onibaku](https://apify.com/onibaku) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 business 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) Search

Search the Food Standards Agency's ratings for **every food business in the UK**: restaurants, cafés, takeaways,
pubs, hotels, shops, caterers, schools and care homes. Filter by name, postcode radius, council, business type,
rating or inspection date, and get a clean, flat dataset with the 0–5 rating, the three inspection scores,
the address and coordinates.

It uses the FSA's official [ratings API](https://api.ratings.food.gov.uk), not page scraping, so it's fast, cheap
and doesn't break when the website changes.

[![Watch the 20-second overview](https://img.youtube.com/vi/q2wxB3TFFj0/maxresdefault.jpg)](https://www.youtube.com/watch?v=q2wxB3TFFj0)

### What it's for

- **Lead generation:** find **newly opened food businesses** (rating "Awaiting inspection") in an area, by type.
  Ideal for food suppliers, EPOS and card terminal sellers, insurers, accountants, delivery platforms and
  pest control firms.
- **Compliance and due diligence:** check the hygiene ratings of suppliers, franchisees or acquisition targets.
- **Local journalism and research:** list every business rated 0 or 1 in a council area this month.
- **Restaurant groups and franchises:** monitor every site's rating in one table.
- **Property and retail analysis:** map the food businesses around a postcode.

### Input

| Field | What it does |
| --- | --- |
| `businessName` | Part of the business name, e.g. `Greggs` or `pizza`. |
| `postcode` + `radiusMiles` | Businesses within the radius of a postcode (0.1–25 miles), nearest first. |
| `address` | Text in the address, e.g. a street or town. |
| `localAuthorities` | Council names, e.g. `Leeds`, `Westminster`, `Brighton and Hove`. |
| `businessTypes` | Restaurant/Cafe/Canteen, Takeaway/sandwich shop, Pub/bar/nightclub, Mobile caterer and 10 more. |
| `ratings` | `5` to `0`, `AwaitingInspection`, `AwaitingPublication`, `Exempt`, or Scotland's `Pass` / `ImprovementRequired`. |
| `ratedSince` | Only businesses inspected on or after this date. |
| `maxResults` | Stop after this many (default 1,000). |

You need at least one of business name, address, postcode or local authority.

**New takeaways in Leeds awaiting their first inspection:**

```json
{
    "localAuthorities": ["Leeds"],
    "businessTypes": ["Takeaway/sandwich shop"],
    "ratings": ["AwaitingInspection"]
}
```

**Everything rated 0–2 within half a mile of Westminster:**

```json
{
    "postcode": "SW1A 1AA",
    "radiusMiles": 0.5,
    "ratings": ["0", "1", "2"]
}
```

### Output

```json
{
    "fhrsId": 414154,
    "businessName": "Grab And Go",
    "businessType": "Restaurant/Cafe/Canteen",
    "address": "19 STRUTTON GROUND, LONDON",
    "addressLine1": "19 STRUTTON GROUND",
    "addressLine2": null,
    "addressLine3": "LONDON",
    "addressLine4": null,
    "postcode": "SW1P 2HY",
    "latitude": 51.4972879,
    "longitude": -0.1336749,
    "distanceMiles": 0.43,
    "rating": "0",
    "ratingNumeric": 0,
    "ratingDate": "2025-10-07",
    "awaitingInspection": false,
    "newRatingPending": false,
    "hygieneScore": 15,
    "structuralScore": 20,
    "confidenceInManagementScore": 20,
    "scheme": "FHRS",
    "localAuthority": "Westminster",
    "localAuthorityEmail": "foodsafety@westminster.gov.uk",
    "rightToReply": null,
    "ratingUrl": "https://ratings.food.gov.uk/business/414154",
    "source": "Food Standards Agency, Open Government Licence v3.0"
}
```

The inspection scores are penalty points, so **lower is better**: hygiene 0–25, structural 0–25, confidence in
management 0–30.

### Pricing

**$0.0015 per business returned**, plus a token $0.00005 per run. 1,000 businesses cost about $1.50.

### Good to know

- England, Wales and Northern Ireland use the 0–5 Food Hygiene Rating Scheme (FHRS). Scotland uses the Food Hygiene
  Information Scheme (FHIS) with Pass / Improvement Required. Both are included.
- "Awaiting inspection" businesses have no rating date yet. The FSA's placeholder date is returned as `null`.
- Ratings are updated by councils and published by the FSA daily, so every run returns the current rating.
- The FSA's own distance limit is loose, so the radius is enforced again on our side: you only get (and pay for)
  businesses inside it.

### Use it from Claude, ChatGPT or Cursor (MCP)

AI assistants can call this actor as a tool through Apify's MCP server. Add this server URL to your MCP client and
sign in with your Apify account when prompted:

```
https://mcp.apify.com?tools=onibaku/uk-food-hygiene-ratings
```

### Data source and licence

[Food Standards Agency food hygiene rating data](https://ratings.food.gov.uk/open-data), under the
[Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).
Each row's `ratingUrl` links to the business's official page on ratings.food.gov.uk.

### More UK public data actors from Onibaku

- [UK Planning Constraints Checker](https://apify.com/onibaku/uk-planning-constraints)
- [Charity Commission Register Search](https://apify.com/onibaku/uk-charity-register)
- [Ofsted Ratings & Report Cards](https://apify.com/onibaku/uk-ofsted-ratings)

Questions or feature requests? Open an issue on the actor's Issues tab or email admin@onibaku.co.uk.

# Actor input Schema

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

Part of a business name, e.g. "Greggs" or "pizza".

## `postcode` (type: `string`):

Finds businesses within the radius below, nearest first.

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

Used with the postcode. 0.1 to 25.

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

Text that appears in the address, e.g. a street or town.

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

Council names, e.g. "Leeds" or "Westminster". Leave empty for all of the UK.

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

Leave empty for all types.

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

Only return these ratings. Pick "Awaiting inspection" to find newly opened food businesses.

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

Only businesses inspected on or after this date (YYYY-MM-DD).

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

Stop after this many establishments.

## Actor input object example

```json
{
  "postcode": "SW1A 1AA",
  "radiusMiles": 1,
  "maxResults": 1000
}
```

# Actor output Schema

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

No description

## `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 = {
    "postcode": "SW1A 1AA"
};

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

# Run the Actor and wait for it to finish
run = client.actor("onibaku/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 '{
  "postcode": "SW1A 1AA"
}' |
apify call onibaku/uk-food-hygiene-ratings --silent --output-dataset

```

## MCP server setup

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