# RASFF Food & Feed Alerts (EU) (`promptica/rasff-food-alerts`) Actor

Estrae le notifiche di allerta e richiamo dell'UE dal RASFF (Rapid Alert System for Food and Feed). Fonte pubblica ufficiale CE, nessuna chiave API. Filtra per tipo allerta, paese, prodotto, rischio e parola chiave.

- **URL**: https://apify.com/promptica/rasff-food-alerts.md
- **Developed by:** [Lorenzo Talamucci](https://apify.com/promptica) (community)
- **Categories:** Business, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% 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/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

## RASFF Food & Feed Alerts (EU)

Estrae le notifiche di allerta e richiamo del sistema RASFF (Rapid Alert System for Food and Feed) della Commissione Europea. Il RASFF è il sistema ufficiale UE che consente alle autorità di sicurezza alimentare dei 27 Stati membri (+ EFTA/EEA) di condividere rapidamente informazioni su rischi nel settore food & feed.

**Fonte:** Portale pubblico RASFF Window (webgate.ec.europa.eu/rasff-window)  
**Senza chiave API** — accesso pubblico, dati ufficiali CE.  
**Total record disponibili:** ~31.600+ notifiche (aggiornate in tempo reale).

---

### A chi serve

- **Importatori / distributori** — monitoraggio automatico degli alert sul paese di origine dei propri fornitori.
- **Responsabili QA** — sorveglianza continua su categorie di prodotto e tipi di pericolo.
- **Consulenti food safety** — dataset per analisi di rischio, auditing e reporting.
- **Analisti BI** — feed strutturato per dashboard di monitoraggio normativo.
- **Media / ricercatori** — accesso strutturato al database pubblico UE.

---

### Input

| Campo | Tipo | Default | Descrizione |
|-------|------|---------|-------------|
| `classificationType` | string | `""` (tutte) | Tipo notifica: `alert`, `border_rejection`, `information_followup`, `information_attention` |
| `riskLevel` | string | `""` (tutti) | Livello rischio: `serious`, `not_serious`, `potential` |
| `productType` | string | `""` (tutti) | Tipo prodotto: `food`, `feed`, `fcm` |
| `originCountryIso` | string | `""` | Codice ISO-2 del paese d'origine (es. `CN`, `TR`, `IN`) |
| `notifyingCountryIso` | string | `""` | Codice ISO-2 del paese notificante (es. `DE`, `IT`, `FR`) |
| `subjectContains` | string | `""` | Parola chiave nel soggetto (es. `salmonella`, `aflatoxin`) |
| `notificationReference` | string | `""` | Riferimento esatto (es. `2026.1234`) |
| `maxResults` | integer | `200` | Max notifiche da estrarre (max 10.000) |

---

### Output — campi per record

| Campo | Tipo | Descrizione |
|-------|------|-------------|
| `reference` | string | Riferimento univoco (es. `2026.6240`) |
| `ecValidationDate` | string | Data di validazione CE |
| `notificationClassification` | string | Tipo notifica (alert, border rejection, …) |
| `riskDecision` | string | Decisione rischio (serious, not serious, …) |
| `productType` | string | food / feed / food contact material |
| `productCategory` | string | Categoria prodotto (es. "fruits and vegetables") |
| `notifyingCountry` | string | Nome del paese notificante |
| `notifyingCountryIso` | string | Codice ISO-2 paese notificante |
| `originCountries` | string | Paesi di origine (nome, separati da virgola) |
| `originCountriesIso` | string | Codice ISO-2 paesi di origine |
| `subject` | string | Descrizione dell'alert |
| `notifId` | integer | ID interno RASFF |
| `url` | string | Link diretto alla notifica sul portale |

---

### Come funziona

1. **Scoperta endpoint**: l'actor usa l'API REST interna del portale Angular RASFF Window, scoperta tramite reverse-engineering del bundle JS. Endpoint pubblico (`/backend/public/`) che non richiede autenticazione.
2. **Catalogo ID**: le categorie (classificazione, rischio, prodotto) sono hardcodate come ID stabili; i paesi vengono risolti on-demand da ISO-2 a ID numerico tramite il catalog endpoint.
3. **Paginazione**: la risposta API è paginata (50 record/pagina); l'actor itera finché non raggiunge `maxResults` o l'ultima pagina.

---

### Esempio di record reale

Richiesta di test eseguita il 2026-07-15:

```bash
curl -s 'https://webgate.ec.europa.eu/rasff-window/backend/public/notification/search/consolidated/en/' \
  -X POST -H 'Content-Type: application/json' \
  -d '{"parameters":{"pageNumber":1,"itemsPerPage":1},"notificationClassification":[306],"originCountry":[5075]}'
````

Risposta (record reale):

```json
{
  "reference": "2026.6073",
  "ecValidationDate": "10-07-2026 11:38:37",
  "notificationClassification": "alert notification",
  "riskDecision": "serious",
  "productType": "food",
  "productCategory": "kitchen equipment and utensils",
  "notifyingCountry": "Belgium",
  "notifyingCountryIso": "BE",
  "originCountries": "China",
  "originCountriesIso": "CN",
  "subject": "4,4-diaminophenylméthane in Kitchen whisk from China",
  "notifId": 857803,
  "url": "https://webgate.ec.europa.eu/rasff-window/screen/notification/857803"
}
```

***

### Note tecniche

- **ToS**: dati pubblici CE riutilizzabili ai sensi della [Open Data Policy CE](https://commission.europa.eu/legal-notice_en). Nessun accesso autenticato.
- **robots.txt**: il portale non blocca il crawling programmatico degli endpoint API pubblici.
- **Rate limit**: l'API pubblica è priva di rate-limiting esplicito; l'actor usa pause minime per non sovraccaricare il server.
- **Aggiornamento dati**: le notifiche vengono pubblicate in tempo reale (più volte al giorno).
- **Filtri avanzati**: notificationsClassification, riskDecision, productType, originCountry supportati dall'API nativa.

# Actor input Schema

## `classificationType` (type: `string`):

Filtra per tipo: 'alert' (allerta), 'information' (informazione), 'border\_rejection' (rifiuto frontiera). Vuoto = tutte.

## `riskLevel` (type: `string`):

Filtra per decisione sul rischio: 'serious' o 'not\_serious'. Vuoto = tutti.

## `productType` (type: `string`):

Filtra per 'food' (alimenti), 'feed' (mangimi) o 'fcm' (materiali a contatto).

## `originCountryIso` (type: `string`):

Codice ISO-2 del paese di origine del prodotto, es. CN (Cina), TR (Turchia). Vuoto = tutti.

## `notifyingCountryIso` (type: `string`):

Codice ISO-2 del paese UE che ha notificato l'allerta, es. DE, IT, FR. Vuoto = tutti.

## `subjectContains` (type: `string`):

Cerca per parola chiave nel soggetto della notifica, es. 'salmonella', 'aflatoxin', 'pesticide'.

## `notificationReference` (type: `string`):

Cerca per riferimento esatto es. '2026.1234'. Ignora gli altri filtri se valorizzato.

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

Quante notifiche estrarre al massimo. Default 200, max 10000.

## Actor input object example

```json
{
  "classificationType": "",
  "riskLevel": "",
  "productType": "",
  "originCountryIso": "CN",
  "notifyingCountryIso": "DE",
  "subjectContains": "salmonella",
  "notificationReference": "2026.1234",
  "maxResults": 200
}
```

# 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("promptica/rasff-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 = {}

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "RASFF Food & Feed Alerts (EU)",
        "description": "Estrae le notifiche di allerta e richiamo dell'UE dal RASFF (Rapid Alert System for Food and Feed). Fonte pubblica ufficiale CE, nessuna chiave API. Filtra per tipo allerta, paese, prodotto, rischio e parola chiave.",
        "version": "0.1",
        "x-build-id": "yTVdNVV5gWx79CY8N"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/promptica~rasff-food-alerts/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-promptica-rasff-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/promptica~rasff-food-alerts/runs": {
            "post": {
                "operationId": "runs-sync-promptica-rasff-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/promptica~rasff-food-alerts/run-sync": {
            "post": {
                "operationId": "run-sync-promptica-rasff-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": {
                    "classificationType": {
                        "title": "Tipo di notifica",
                        "enum": [
                            "",
                            "alert",
                            "information_followup",
                            "information_attention",
                            "border_rejection"
                        ],
                        "type": "string",
                        "description": "Filtra per tipo: 'alert' (allerta), 'information' (informazione), 'border_rejection' (rifiuto frontiera). Vuoto = tutte.",
                        "default": ""
                    },
                    "riskLevel": {
                        "title": "Livello di rischio",
                        "enum": [
                            "",
                            "serious",
                            "not_serious",
                            "potential"
                        ],
                        "type": "string",
                        "description": "Filtra per decisione sul rischio: 'serious' o 'not_serious'. Vuoto = tutti.",
                        "default": ""
                    },
                    "productType": {
                        "title": "Tipo prodotto",
                        "enum": [
                            "",
                            "food",
                            "feed",
                            "fcm"
                        ],
                        "type": "string",
                        "description": "Filtra per 'food' (alimenti), 'feed' (mangimi) o 'fcm' (materiali a contatto).",
                        "default": ""
                    },
                    "originCountryIso": {
                        "title": "Paese di origine (ISO-2)",
                        "type": "string",
                        "description": "Codice ISO-2 del paese di origine del prodotto, es. CN (Cina), TR (Turchia). Vuoto = tutti."
                    },
                    "notifyingCountryIso": {
                        "title": "Paese notificante (ISO-2)",
                        "type": "string",
                        "description": "Codice ISO-2 del paese UE che ha notificato l'allerta, es. DE, IT, FR. Vuoto = tutti."
                    },
                    "subjectContains": {
                        "title": "Parola chiave (soggetto)",
                        "type": "string",
                        "description": "Cerca per parola chiave nel soggetto della notifica, es. 'salmonella', 'aflatoxin', 'pesticide'."
                    },
                    "notificationReference": {
                        "title": "Riferimento notifica",
                        "type": "string",
                        "description": "Cerca per riferimento esatto es. '2026.1234'. Ignora gli altri filtri se valorizzato."
                    },
                    "maxResults": {
                        "title": "Numero massimo di risultati",
                        "type": "integer",
                        "description": "Quante notifiche estrarre al massimo. Default 200, max 10000.",
                        "default": 200
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
