# UK Food Recalls & Allergy Alerts Monitor - FSA Official Data (`devon_gtme/fsa-food-alerts`) Actor

Monitor UK food recalls and allergy alerts from the Food Standards Agency's official free API. Filter by alert type, allergen, keyword and date. Each record has the affected products, batch codes, allergens, risk statement and official link. Trigger data for recall and compliance teams.

- **URL**: https://apify.com/devon\_gtme/fsa-food-alerts.md
- **Developed by:** [Devon Kellar](https://apify.com/devon_gtme) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 alerts

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/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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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 Recalls & Allergy Alerts Monitor - FSA Official Data

Monitor **every UK food recall and allergy alert** as the Food Standards Agency publishes it. Recalls are *events* - a contaminated batch, an undeclared allergen, a product pulled from every shelf in the country - and whoever hears about them first can act first. This actor turns the FSA's official alerts feed into a clean, structured dataset: affected products, pack sizes, **batch codes**, best-before dates, the recalling business, allergens, and the official risk statement.

### Who uses this data

- **Recall response & retail compliance teams** - know within hours when a product you stock is recalled; match batch codes against your inventory (use product-level output)
- **Allergen-safety apps & services** - a live feed of undeclared-allergen alerts (milk, peanuts, gluten, sesame...) to push to allergic users
- **Insurers & risk platforms** - product recall events as structured triggers for underwriting and claims intelligence
- **Food manufacturers & suppliers** - watch competitors' and your own supply chain's recall history
- **Food-safety journalists & researchers** - the full alert archive, filterable by type, allergen, and keyword

### Alert type cheat sheet

| Code | Type | What it means |
|---|---|---|
| **AA** | Allergy Alert | A product contains an allergen not declared on the label (milk, nuts, egg, gluten, sesame...) - recalled for allergic consumers |
| **PRIN** | Product Recall Information Notice | A safety recall: contamination (e.g. Salmonella, Listeria), foreign bodies (plastic, metal), or unsafe mislabelling |
| **FAFA** | Food Alert For Action | The serious one - an incident where the FSA asks local authorities to take enforcement action (illegal products, widespread contamination) |

The FSA publishes roughly **3 alerts per week (~160/year)**, so the default 30-day window returns ~10-15 alerts.

### What you get

One record per **alert** (default), with affected products as a nested list:

| Field | Example |
|---|---|
| `alertId` | FSA-PRIN-34-2026 |
| `typeLabel` | Product Recall Information Notice |
| `title` | Capri Sun UK recalls specific batches of Capri-Sun Orange 10 pack... |
| `publishedDate` | 2026-07-11 |
| `allergens` | ["Cashew", "Nuts"] |
| `products` | [{ productName, packSize, batches: [{ batchCode, bestBefore }] }] |
| `businesses` | ["Capri Sun UK"] |
| `riskStatement` | The product may be unsafe to consume because... |
| `consumerAdvice` | Do not eat it. Return it to where you bought it... |
| `alertUrl` | Link to the official FSA alert page |

Set `granularity` to **product** to get one flattened record per affected product (`productName`, `packSize`, `batchCodes`, `bestBefore`, `useBy`) - ideal for joining against stock or inventory lists.

### Typical usage

- **Weekly recall monitor:** keep the defaults and [schedule](https://docs.apify.com/platform/schedules) the actor weekly - pipe new alerts to Slack or email via Apify integrations
- **Allergen watch:** set `alertTypes` to `AA` and `allergens` to e.g. `["milk", "peanuts"]`
- **Brand / retailer watch:** put the brand or retailer name in `keywords`
- **Inventory matching:** set `granularity` to `product` and match `batchCodes` against your stock system
- **Historical research:** set `daysBack` up to 3650 - the archive goes back to 2016

### Companion actor

Recalls tell you *what products* went wrong; hygiene ratings tell you *which businesses* are failing. Pair this with the [UK Food Hygiene Failures Monitor](https://apify.com/devon_gtme/uk-food-hygiene-failures-monitor) - it tracks restaurants and food businesses scoring 0-2 on FSA hygiene inspections, the business-level distress signal to this actor's product-level one.

### Export & integrations

Results land in an Apify dataset - export **CSV, Excel, JSON**, or connect Google Sheets, Make, Zapier, Slack, and webhooks via Apify integrations.

### Data source & licence

Data comes from the [Food Standards Agency food alerts API](https://data.food.gov.uk/food-alerts) and is used under the [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/). This actor is not affiliated with the FSA. Alerts are official public safety notices.

---

**Need something more custom?** Recall alerts cross-referenced with hygiene ratings, retailer stocklists, or company data, enriched contact details for recalling businesses, or a fully managed monitoring pipeline - message me via my Apify profile and I'll build it.

# Actor input Schema

## `daysBack` (type: `integer`):

Fetch alerts published in the last N days. The FSA publishes roughly 3 alerts per week (~160/year), so 30 days returns ~10-15 alerts.
## `alertTypes` (type: `array`):

Which FSA alert types to include. AA = Allergy Alert (undeclared allergens), PRIN = Product Recall Information Notice (safety recalls: contamination, foreign bodies, mislabelling), FAFA = Food Alert For Action (serious incidents requiring enforcement action). Leave empty for ALL types.
## `allergens` (type: `array`):

Only return alerts involving these allergens (matches the FSA's allergen labels, case-insensitive). Examples: milk, egg, peanuts, nuts, cashew, gluten, soya, sesame, mustard, fish, crustaceans, molluscs, celery, lupin, sulphur dioxide. Mainly applies to Allergy Alerts.
## `keywords` (type: `array`):

Only return alerts where any keyword appears in the title, description, product names, or business names (case-insensitive). E.g. a brand name, retailer, or product category like "chocolate".
## `granularity` (type: `string`):

"alert" = one record per alert with affected products as a nested list (default). "product" = one record per affected product with flattened pack size, batch codes and best-before — useful for matching against stock/inventory lists.
## `maxResults` (type: `integer`):

Maximum records to return.

## Actor input object example

```json
{
  "daysBack": 30,
  "alertTypes": [],
  "allergens": [],
  "keywords": [],
  "granularity": "alert",
  "maxResults": 500
}
````

# 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 = {
    "daysBack": 30,
    "alertTypes": [],
    "granularity": "alert",
    "maxResults": 500
};

// Run the Actor and wait for it to finish
const run = await client.actor("devon_gtme/fsa-food-alerts").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 = {
    "daysBack": 30,
    "alertTypes": [],
    "granularity": "alert",
    "maxResults": 500,
}

# Run the Actor and wait for it to finish
run = client.actor("devon_gtme/fsa-food-alerts").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "daysBack": 30,
  "alertTypes": [],
  "granularity": "alert",
  "maxResults": 500
}' |
apify call devon_gtme/fsa-food-alerts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=devon_gtme/fsa-food-alerts",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "UK Food Recalls & Allergy Alerts Monitor - FSA Official Data",
        "description": "Monitor UK food recalls and allergy alerts from the Food Standards Agency's official free API. Filter by alert type, allergen, keyword and date. Each record has the affected products, batch codes, allergens, risk statement and official link. Trigger data for recall and compliance teams.",
        "version": "0.1",
        "x-build-id": "4hTrtYZzgmflyb92d"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/devon_gtme~fsa-food-alerts/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-devon_gtme-fsa-food-alerts",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/devon_gtme~fsa-food-alerts/runs": {
            "post": {
                "operationId": "runs-sync-devon_gtme-fsa-food-alerts",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/devon_gtme~fsa-food-alerts/run-sync": {
            "post": {
                "operationId": "run-sync-devon_gtme-fsa-food-alerts",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "daysBack": {
                        "title": "Days Back",
                        "minimum": 1,
                        "maximum": 3650,
                        "type": "integer",
                        "description": "Fetch alerts published in the last N days. The FSA publishes roughly 3 alerts per week (~160/year), so 30 days returns ~10-15 alerts.",
                        "default": 30
                    },
                    "alertTypes": {
                        "title": "Alert Types",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Which FSA alert types to include. AA = Allergy Alert (undeclared allergens), PRIN = Product Recall Information Notice (safety recalls: contamination, foreign bodies, mislabelling), FAFA = Food Alert For Action (serious incidents requiring enforcement action). Leave empty for ALL types.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "AA",
                                "PRIN",
                                "FAFA"
                            ],
                            "enumTitles": [
                                "AA — Allergy Alert",
                                "PRIN — Product Recall Information Notice",
                                "FAFA — Food Alert For Action"
                            ]
                        },
                        "default": []
                    },
                    "allergens": {
                        "title": "Allergens",
                        "type": "array",
                        "description": "Only return alerts involving these allergens (matches the FSA's allergen labels, case-insensitive). Examples: milk, egg, peanuts, nuts, cashew, gluten, soya, sesame, mustard, fish, crustaceans, molluscs, celery, lupin, sulphur dioxide. Mainly applies to Allergy Alerts.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "keywords": {
                        "title": "Keywords",
                        "type": "array",
                        "description": "Only return alerts where any keyword appears in the title, description, product names, or business names (case-insensitive). E.g. a brand name, retailer, or product category like \"chocolate\".",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "granularity": {
                        "title": "Output Granularity",
                        "enum": [
                            "alert",
                            "product"
                        ],
                        "type": "string",
                        "description": "\"alert\" = one record per alert with affected products as a nested list (default). \"product\" = one record per affected product with flattened pack size, batch codes and best-before — useful for matching against stock/inventory lists.",
                        "default": "alert"
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum records to return.",
                        "default": 500
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
