# FSA Approved Food Establishments: England, Wales, NI (`yappman/fsa-register`) Actor

Search, look up and list changes to FSA approved food establishments in England, Wales and Northern Ireland. Names that could be a person's are left out by an organisation-name rule when the publisher builds the store; this Actor outputs only what that store holds. Addresses are never output.

- **URL**: https://apify.com/yappman/fsa-register.md
- **Developed by:** [Russell Yapp](https://apify.com/yappman) (community)
- **Categories:** Business, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 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.

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

## Approved Food Establishments: England, Wales, Northern Ireland

### What it reads

The Actor reads a private store of approved food establishments and their changes that the owner builds from the Food
Standards Agency's published daily file of approved establishments (England, Wales and Northern Ireland). It never
calls the FSA and holds no FSA key.

**Scotland is not covered.** Food Standards Scotland publishes its own list, which this Actor does not read.

### Coverage

This Actor shows about 45% of the rows in the FSA's file: the establishments whose published name is an organisation's
(see "What is left out, and why"). Measured on the FSA file of 6 Nov 2026: 2,551 establishments in the store (the exact
count from an unfiltered search run that day) and about 3,140 rows left out (the publisher's rounded count). The share
changes as the FSA's file changes; `establishmentsInFile` and `withheldInFile` in every RUN_SUMMARY give the current
figures. RUN_SUMMARY gives the date of the FSA file the store was built from (`fileDate`);
establishment rows carry `observedAt`, change rows `snapshotFrom` and `snapshotTo`. The data is a snapshot of that file,
not current to the minute.

### Modes

- `lookup`: `keys` (up to 500). A key is `ew:` (England and Wales) or `ni:` (Northern Ireland) followed by the approval
  number with spaces removed, for example `ew:AB123`. Keys not in the FSA file, or left out, are counted, not listed.
- `search`: filters `areas` (england-wales, northern-ireland), `localAuthorities`, `competentAuthorities`,
  `postcodeDistricts` (outward codes only, such as ZZ99), `activities` (codes, below), and `maxItems`.
- `changes`: `since` (a date), `events` (approved, removed, activitiesChanged, nameChanged, localAuthorityChanged),
  `maxItems`, and the filters `areas`, `localAuthorities` and `postcodeDistricts`.

### Example inputs

Search a few rows (the input form prefills `maxItems` 20):

```json
{ "mode": "search", "areas": ["england-wales"], "activities": ["T:cutting_plant"], "maxItems": 20 }
```

Look up two keys (replace them with real keys):

```json
{ "mode": "lookup", "keys": ["ew:AB123", "ni:CD456"] }
```

Changes since a date: replace `YYYY-MM-DD` with a date on or after the `historyStart` shown in any run's RUN_SUMMARY (an
earlier date is refused, uncharged):

```json
{ "mode": "changes", "since": "YYYY-MM-DD", "events": ["approved", "removed"], "maxItems": 20 }
```

### Limits

- `maxItems`: 1 to 10,000; 1,000 if you leave it out. At most this many rows are returned and charged.
- `keys`: up to 500 per lookup run. Each list filter takes up to 50 values of at most 80 characters.
- Lookup needs `keys`; changes needs `since`. A key of another mode that is set is refused.
- A refused input ends the run with status `refused`; nothing is read or charged.
- `since` earlier than `historyStart` is refused, uncharged (there is no history before that date).
- A changes run that would hold more than 100,000 event rows fails and is not charged.

### Fields

Establishment rows (lookup, search): key, area, approvalNumber, name, postcode (outward code only),
competentAuthority, localAuthority, codes, observedAt.

Change rows (changes): eventId, event, key, area, approvalNumber, name, oldName, postcode (outward code only),
localAuthority, oldLocalAuthority, oldCodes, newCodes, snapshotFrom, snapshotTo, observedAt.

Every field is present in every row; a missing value is null.

Activities are codes only: `A0`, `A1` to `A16` and `B1` (approval sections), `S:<species>` (for example `S:bovine`),
`T:<type>` (for example `T:cutting_plant`), and `UNRECOGNISED` when the FSA file holds a value the mirror does not
recognise. The FSA's own activity text is never returned.

### What is left out, and why

- When the owner's publisher builds the store from the FSA file, it leaves out establishments whose names could be a
  person's (an organisation-name rule) and establishments whose address the FSA marks as withheld: they get no row and
  no key. This Actor outputs only what that store holds; it does not itself test names.
- Addresses are never returned, and postcodes are cut to the outward code (this Actor re-cuts every postcode). The
  publisher never reads remarks or other free text.
- `removed` means only that an approval number is not in the FSA file of that date. It does not say the establishment
  has closed or lost its approval.
- A change means the FSA file changed, not that the establishment changed.
- An approval may have changed since the file date; check the FSA's current list
  (https://data.food.gov.uk/catalog/datasets/954fb951-97a9-4953-9ebc-4fb30ddeb0d6) before relying on it.
- A blind check of 600 names the store keeps (300 whose approval number starts with a letter, 300 others, read by hand on
  6 Nov 2026) found none that identifies a person and none that was unsure. With 300 names read in each group, that
  suggests a rate below about 1% in each; it is a check, not a guarantee.

### Run summary

RUN_SUMMARY holds counts only (never keys or names):

- For the whole FSA file: `withheldInFile`, the rows the publisher left out, shown as "<5" under five (zero too) and
  otherwise rounded to the nearest 10; `establishmentsInFile`, the establishments in the store, rounded to the nearest
  100 (an unfiltered search shows the exact number: see below). The run summary never states the file's total row count.
- For this run, in `counts`: `notOutput` and `notFoundOrWithheld` (left out) are shown the same way as `withheldInFile`;
  `matched`, `alreadyDelivered`, `cappedByMaxItems` and `duplicateKey` are exact, and so is `pushed`.

What the masking does not hide:

- A rough share of the file that is left out can be worked out from `withheldInFile` and `establishmentsInFile`.
- An unfiltered `search` run matches every establishment in the store, so its `counts.matched` is the exact number of
  establishments, whatever the rounding of `establishmentsInFile` (it is counted before `maxItems` caps the rows returned).
- The FSA's daily file is public, so anyone can count its rows and work out exactly how many we leave out. The masking
  only keeps the run summary from printing those numbers; it is not a secret.
- In lookup mode you send the keys and get the rows back, so the exact number of keys not found or left out is the
  keys you sent minus `matched`. Masking `notFoundOrWithheld` only keeps the run summary from printing that number.
  A key that is not in the FSA file and a key that is in it but left out look exactly the same.

### What you pay

Pay per event, the same on every plan: **run $0.005, establishment $0.002, change $0.003.**

- **The run fee is charged each time a run reads the register's data, even if no row matches.** A search with no
  matches, a changes run whose change files hold no matching event, and a lookup where every key is not found or left
  out each still cost the $0.005 run fee. A run refused before anything is read (a bad input, too many keys, a `since`
  earlier than `historyStart`) costs nothing, and so does a changes run whose `since` is later than every change file
  (it reads only the store's index).
- **If the register store cannot be used, the run fails and nothing more is charged; try again later.**
- **Establishments** (lookup and search): $0.002 per row returned. **Changes** (changes): $0.003 per row returned.
- Examples: a search that returns 5 rows costs $0.015; a lookup that returns 3 rows, $0.011; a changes run that
  returns 3 events, $0.014.
- If you leave out `maxItems` the cap is 1,000 rows, so a run costs at most $2.005 (establishments) or $3.005
  (changes); the input form prefills 20. Set `maxItems` and Apify's maximum-charge setting for the run. If the maximum
  is reached, the run stops and `RUN_SUMMARY.chargeLimitReached` is `true`. If only the run fee does not fit your
  maximum, it is not charged and `RUN_SUMMARY.runFeeRefusedByLimit` is `true` instead.

### Removal

To have an establishment left out, email info@yappman.com with its key (`ew:` or `ni:` and the approval number, shown
in every row), or with the establishment name and address; we look up the key. It is added to the removal list within
five working days and kept out of every later publish. Change events published before the removal can still be
returned until they are purged. A removal cannot recall rows already delivered, and it does not change the FSA's own
register; corrections to the register go to the FSA.

### Attribution

Confirmed by the owner on 6 Nov 2026, on the FSA's catalogue page for the daily file
(https://data.food.gov.uk/catalog/datasets/954fb951-97a9-4953-9ebc-4fb30ddeb0d6), which states the Open Government
Licence v3.0. Every run summary carries it as `attribution`, and every successful run's status message ends with it (a
refused or failed run's status message does not; its run summary still carries it):

"Contains Food Standards Agency information, licensed under the Open Government Licence v3.0
(https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/). Crown copyright. Source: Food Standards
Agency. Adapted by Yappman Data; not affiliated with the Food Standards Agency."

(Before the confirmation the run summary carried `attributionStatus` instead.) No FSA logo or imagery is used.

This is not legal advice. Actor output belongs to the account that runs it, under Apify's terms.

# Actor input Schema

## `mode` (type: `string`):

lookup: establishments by FSA key. search: establishments matching filters. changes: change events since a date.

## `keys` (type: `array`):

ew: (England and Wales) or ni: (Northern Ireland) followed by the approval number, for example ew:AB123. Up to 500. Keys not in the FSA file or left out are counted, not listed.

## `areas` (type: `array`):

england-wales or northern-ireland.

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

Exact local authority names as the FSA publishes them.

## `competentAuthorities` (type: `array`):

Exact competent authority names as the FSA publishes them.

## `postcodeDistricts` (type: `array`):

Outward codes such as ZZ99.

## `activities` (type: `array`):

Any of: A0, A1 to A16, B1 (approval sections), S:<species> such as S:bovine, T:<type> such as T:cutting_plant, UNRECOGNISED. An establishment matches if it has any of them.

## `since` (type: `string`):

A date such as 2026-10-22, not before the history start shown in RUN_SUMMARY.

## `events` (type: `array`):

approved, removed, activitiesChanged, nameChanged, localAuthorityChanged. Leave empty for every kind.

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

At most this many rows are returned and charged.

## Actor input object example

```json
{
  "mode": "search",
  "maxItems": 20
}
```

# Actor output Schema

## `establishments` (type: `string`):

No description

## `runSummary` (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 = {
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("yappman/fsa-register").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 = { "maxItems": 20 }

# Run the Actor and wait for it to finish
run = client.actor("yappman/fsa-register").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 '{
  "maxItems": 20
}' |
apify call yappman/fsa-register --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,yappman/fsa-register"
        }
    }
}
```

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/BM5K2DmoDezTN7m9P/builds/26CmP5In73f5IVvNS/openapi.json
