# RASFF Food & Feed Safety Alert Monitor (EU) (`yuancore/rasff-food-alert-monitor`) Actor

Export EU RASFF food & feed safety alerts (recalls, border rejections, contamination notifications) to JSON/CSV/Excel and schedule daily change-monitoring of new alerts by country, product category, hazard or risk. Public data; not affiliated with the European Commission.

- **URL**: https://apify.com/yuancore/rasff-food-alert-monitor.md
- **Developed by:** [YuanCore](https://apify.com/yuancore) (community)
- **Categories:** Developer tools, Automation, News
- **Stats:** 3 total users, 0 monthly users, 92.6% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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

## RASFF Food & Feed Safety Alert Monitor (EU)

Search, export and **monitor changes** in the EU **RASFF** (Rapid Alert System for Food and Feed) public notifications — the European Commission's alert system for food/feed safety risks: recalls, border rejections, contamination (Salmonella, Listeria, pesticides, mycotoxins, allergens…). Export to **JSON / CSV / Excel**.

RASFF holds **~31,000 public notifications**. The official RASFF Window UI lets you browse them one page at a time, but offers **no bulk export and no change feed**. This actor reads the **public, no-auth** RASFF API, normalizes each notification, and (uniquely) lets you watch for **new alerts** instead of re-checking by hand.

### ⭐ Primary use — daily alert monitoring

Set `monitorSince` to an ISO date and **schedule the actor daily**: it returns only notifications whose `ecValidationDate` is on/after that date — a lightweight food-safety **alert feed**. Ideal for food importers, retailers, QA/compliance teams and supply-chain risk monitoring tracking new alerts for a product category, hazard, or country of origin.

### Bulk / search pull (one-off)

Set filters in `searchParams` and a `maxItems` cap. A full pull is ~31k notifications (a few minutes). Prefer narrowing with `searchParams`.

### What you get per notification

`ecValidationDate`, `reference`, `subject`, `productCategory`, `productType`, `riskDecision`, `notificationClassification`, `notifyingCountry` (+ ISO), `originCountries` (+ ISO), `notifId`, `published`.

### Who it's for

- **Food importers / retailers / QA** — watch alerts for your product categories and suppliers' countries of origin.
- **Supply-chain & due-diligence** — monitor recalls and border rejections affecting your sourcing.
- **Food-safety market intelligence** — map hazards, categories and notifying countries across the EU.

### Input

| field | meaning |
|---|---|
| `monitorSince` | ISO date (YYYY-MM-DD) — only alerts validated on/after it (the change feed). **Recommended.** |
| `searchParams` | extra RASFF filter params (object); leave `{}` for all |
| `maxItems` | stop after N notifications (full set ~31k) |
| `pageSize` | page size (`itemsPerPage`), max 200 |
| `languageIso2Code` | response language, default `en` |

### Reliability

- **Schema-drift guard** — if RASFF changes its API shape (or an unfiltered pull comes back empty), the run **fails loudly** instead of silently producing an empty/garbage dataset.
- **De-duplication** within a run (by notification id); identity-less records are never folded together.
- **Core-field completeness** is tracked each run and warns if it collapses (a silent-corruption signal).
- An automated read-back test (`npm test`) asserts the above against the live API — including the RASFF `DD-MM-YYYY` date format.

### Data & compliance

- Source is the **public** RASFF Window API (`webgate.ec.europa.eu/rasff-window`) — no login; public EU transparency data.
- Reused under the European Commission reuse policy (**CC BY 4.0**); attribute *European Commission – RASFF*. Data is **structured/normalized** by this actor.
- Notification-level data (product, hazard, country, category) — not personal data.
- **Not affiliated with the European Commission.** No warranty on accuracy/completeness; verify against the official source before relying on it for decisions.
- Polite pacing built in.

# Actor input Schema

## `monitorSince` (type: `string`):

ISO date (YYYY-MM-DD). Only returns notifications whose ecValidationDate is on/after this — schedule daily for a food-safety-alert change feed. Recommended.
## `searchParams` (type: `object`):

Extra params merged into the RASFF search 'parameters' object (e.g. by notifying country, product category id, or risk). Leave empty {} to list everything.
## `maxItems` (type: `integer`):

Stop after this many notifications. RASFF holds ~31k; a full pull takes a few minutes. For daily monitoring, use 'monitorSince' instead of repeated full pulls.
## `pageSize` (type: `integer`):

Notifications fetched per API request (max 200). Leave at the default unless tuning throughput.
## `languageIso2Code` (type: `string`):

ISO 639-1 language code for RASFF reference-data labels (e.g. 'en', 'fr', 'de'). Default 'en'.

## Actor input object example

```json
{
  "searchParams": {},
  "maxItems": 1000,
  "pageSize": 100,
  "languageIso2Code": "en"
}
````

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("yuancore/rasff-food-alert-monitor").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("yuancore/rasff-food-alert-monitor").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 '{}' |
apify call yuancore/rasff-food-alert-monitor --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "RASFF Food & Feed Safety Alert Monitor (EU)",
        "description": "Export EU RASFF food & feed safety alerts (recalls, border rejections, contamination notifications) to JSON/CSV/Excel and schedule daily change-monitoring of new alerts by country, product category, hazard or risk. Public data; not affiliated with the European Commission.",
        "version": "0.1",
        "x-build-id": "WZiptTWaQx5GK89LX"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/yuancore~rasff-food-alert-monitor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-yuancore-rasff-food-alert-monitor",
                "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/yuancore~rasff-food-alert-monitor/runs": {
            "post": {
                "operationId": "runs-sync-yuancore-rasff-food-alert-monitor",
                "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/yuancore~rasff-food-alert-monitor/run-sync": {
            "post": {
                "operationId": "run-sync-yuancore-rasff-food-alert-monitor",
                "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": {
                    "monitorSince": {
                        "title": "Change-monitoring: only alerts validated on/after this date",
                        "type": "string",
                        "description": "ISO date (YYYY-MM-DD). Only returns notifications whose ecValidationDate is on/after this — schedule daily for a food-safety-alert change feed. Recommended."
                    },
                    "searchParams": {
                        "title": "RASFF filter params (advanced)",
                        "type": "object",
                        "description": "Extra params merged into the RASFF search 'parameters' object (e.g. by notifying country, product category id, or risk). Leave empty {} to list everything.",
                        "default": {}
                    },
                    "maxItems": {
                        "title": "Max notifications to fetch",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Stop after this many notifications. RASFF holds ~31k; a full pull takes a few minutes. For daily monitoring, use 'monitorSince' instead of repeated full pulls.",
                        "default": 1000
                    },
                    "pageSize": {
                        "title": "Page size (itemsPerPage, max 200)",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Notifications fetched per API request (max 200). Leave at the default unless tuning throughput.",
                        "default": 100
                    },
                    "languageIso2Code": {
                        "title": "Language",
                        "type": "string",
                        "description": "ISO 639-1 language code for RASFF reference-data labels (e.g. 'en', 'fr', 'de'). Default 'en'.",
                        "default": "en"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
