# EU Safety Gate (RAPEX) Product Alerts (`homelabmobile/eu-safety-gate-alerts`) Actor

EU Safety Gate (RAPEX) product safety alerts from the Commission's weekly XML reports, one row per alert, with a brand and barcode (EAN/GTIN) watchlist filter.

- **URL**: https://apify.com/homelabmobile/eu-safety-gate-alerts.md
- **Developed by:** [Home Lab Mobile](https://apify.com/homelabmobile) (community)
- **Categories:** E-commerce, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 results

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

## EU Safety Gate (RAPEX) Product Alerts

Get the EU's dangerous non-food product alerts (Safety Gate, formerly RAPEX) as clean JSON, one row per
alert: product, brand, model, barcodes, risk, measures taken, countries, marketplace listings and photos.
Pass a watchlist of your brands or EAN/GTIN barcodes and get back only the alerts that concern your
catalogue. Data comes from the European Commission's public weekly XML reports; no login or account needed.

### What it does

- Reads the latest N weekly Safety Gate reports (default 4, about a month), or an explicit report range
  such as `2026-30` to `2026-40`. The Commission publishes one report every Friday.
- **Watchlist:** returns only alerts whose brand or barcode is on your list, and tells you which entry
  matched (`watchlistMatches`). Run it weekly to screen a catalogue or a marketplace listing feed.
- Filters by notifying country, product category (e.g. Toys) and risk type (e.g. Chemical).
- Splits run-together barcode fields into individual EAN/GTIN codes and the measures text into
  structured measures (voluntary or compulsory, operator, measure, date).
- Returns one result per alert. You pay only for valid results; malformed rows are dropped and not charged.
- Fails loudly: if the Commission's files cannot be fetched or their format changes, the run fails instead
  of returning an empty or broken dataset. A watchlist that matches nothing ends successfully with zero
  results only after every report in the window was downloaded and parsed.

### Input

| Field | Type | Required | Description |
|---|---|---|---|
| `weeksBack` | integer | no | How many of the latest weekly reports to read (default 4, max 52). Ignored if a report range is set. |
| `reportFrom` | string | no | Oldest report to include, `YYYY-WW`, e.g. `2026-35`. |
| `reportTo` | string | no | Newest report to include, `YYYY-WW`, e.g. `2026-40`. |
| `watchBrands` | string\[] | no | Only alerts for these brands (case- and accent-insensitive, whole words). |
| `watchBarcodes` | string\[] | no | Only alerts listing these EAN/GTIN/UPC codes (8–14 digits; leading zeros ignored). OR-combined with `watchBrands`. |
| `notifyingCountries` | string\[] | no | English country names, e.g. `France`, `Netherlands`. |
| `productCategories` | string\[] | no | e.g. `Toys`, `Electrical appliances`, `Cosmetics`. |
| `riskTypes` | string\[] | no | e.g. `Chemical`, `Choking`, `Electric shock`, `Fire`. |
| `maxResults` | integer | no | Stop after this many alerts (default 500, max 5,000). Caps the cost of a run. |

Examples:

```json
{ "weeksBack": 2, "productCategories": ["Toys"], "maxResults": 100 }
```

```json
{ "weeksBack": 8, "watchBrands": ["Nici", "Peugeot"], "watchBarcodes": ["5052931116324", "08719327535714"] }
```

```json
{ "reportFrom": "2026-30", "reportTo": "2026-40", "notifyingCountries": ["Germany"], "riskTypes": ["Electric shock"] }
```

#### Calling from an AI agent (MCP)

This Actor works as a tool through the [Apify MCP server](https://mcp.apify.com). Example tool call:

```json
{ "actor": "homelabmobile/eu-safety-gate-alerts", "input": { "weeksBack": 4, "watchBrands": ["Nici"], "maxResults": 20 } }
```

### Output

One JSON object per alert (a real row from a local run on 2026-10-14; image list shortened):

```json
{
    "alertNumber": "SR/02633/26",
    "alertUrl": "https://ec.europa.eu/safety-gate-alerts/screen/webReport/alertDetail/10118555",
    "alertId": "10118555",
    "reportReference": "Report-2026-39",
    "reportDate": "2026-10-02",
    "reportYear": 2026,
    "reportWeek": 39,
    "category": "Chemical products",
    "product": "Tattoo ink",
    "brand": "Dynamic Platinum",
    "productName": "Dynamic Tattoo Ink Grey 30 ml lotto 111224-DP",
    "modelOrType": null,
    "batchNumber": "111224-DP",
    "barcodeRaw": "810132830747",
    "barcodes": ["810132830747"],
    "riskTypes": ["Chemical"],
    "riskLevel": "Serious risk",
    "hazardDescription": "The product contains an excessive concentration of lead (measured value 0;0003% by weight). Lead is harmful to human health, accumulates in the body, can cause developmental neurotoxicity and may affect breast-fed or unborn children. The product does not comply with the REACH Regulation.",
    "measures": [
        { "measureType": "compulsory", "economicOperator": "Manufacturer", "measure": "Ban on the marketing of the product and any accompanying measures", "entryIntoForce": "2026-07-31" }
    ],
    "measuresText": "Type of economic operator to whom the measure(s) were ordered: ManufacturerCategory of measure(s): Ban on the marketing of the product and any accompanying measuresDate of entry into force: 31/07/2026",
    "recallUrl": null,
    "productDescription": "Grey tattoo ink, 30 ml.",
    "notifyingCountry": "Italy",
    "countryOfOrigin": "Spain",
    "userType": "Professional",
    "imageUrls": ["https://ec.europa.eu/safety-gate-alerts/public/api/notification/image/11236100"],
    "onlineMarketplaces": [{ "platform": "Other", "listingRef": "https://dynamiccolor.com/it" }],
    "companyRecallCode": null,
    "productionDates": null,
    "watchlistMatches": [],
    "scrapedAt": "2026-10-14T02:38:00.610Z"
}
```

Each run also writes a `RUN_SUMMARY` record (status, counts) to its key-value store.

### Pricing

Pay per event:

| Event | Price | Per 1,000 |
|---|---|---|
| Result (one alert row) | $0.002 | $2.00 |

Plus Apify's standard Actor start charge. A month of toy alerts (about 130 rows) costs about $0.26; a
watchlist run that matches 3 alerts costs $0.006.

### Data source and licence

- Source: European Commission, Safety Gate weekly reports in XML
  (`https://ec.europa.eu/safety-gate-alerts/api/download/weeklyReport/list/xml/en` and the per-report files
  it links to), listed on data.europa.eu as dataset
  [`rapex-rapid-alert-system-non-food`](https://data.europa.eu/data/datasets/rapex-rapid-alert-system-non-food).
- Licence: the data.europa.eu catalogue lists the "Weekly Reports - XML format" distribution under
  **Creative Commons CC0 1.0 Universal** (public domain dedication).
- This Actor and its output are **not endorsed by or affiliated with the European Commission**. The
  Commission's legal notice applies to its website: it accepts no responsibility for the information.
  The authoritative version of each alert is the page in `alertUrl`.
- Personal data: alerts describe products, not people. As a precaution, e-mail addresses and phone
  numbers are removed from text fields, and links to private social-media or second-hand-marketplace
  profiles are removed from the marketplace field.

### Known limits

- Coverage is what the Commission publishes in the weekly reports: non-food consumer and professional
  products notified by EU/EEA authorities (and the UK for Northern Ireland), from 2005 onward. Food alerts
  (RASFF) are not included.
- Fresh once a week: a new report appears on Fridays. Alerts are added, not edited, so re-running the same
  window returns the same alerts.
- Brand matching uses the `brand` field only. Many alerts have no brand (about a third in recent weeks), and
  brands are written as the authority reported them, so check spelling variants. Barcode matching also
  finds a code inside a run-together barcode field, so a short EAN-8 can occasionally match inside a
  longer code.
- English only. At most 52 weekly reports per run; use several runs for longer history.
- Downloads about 0.5 MB for the report index plus 0.1–0.3 MB per weekly report; requests are limited to
  30 per minute with 2 in parallel.
- Public data only. It does not log in or bypass any access control.

### Support

Open an issue on the Actor's Issues tab. We reply within 2 business days.

# Actor input Schema

## `weeksBack` (type: `integer`):

How many of the most recent weekly reports to read. The Commission publishes one report every Friday with roughly 50-120 alerts. 4 covers about the last month. Ignored when reportFrom or reportTo is set.

## `reportFrom` (type: `string`):

Optional. Oldest weekly report to include, as "YYYY-WW" using the report's own year and week number, e.g. "2026-35" ("Report-2026-35" also works). Use with reportTo for a fixed range; at most 52 reports are read per run.

## `reportTo` (type: `string`):

Optional. Newest weekly report to include, as "YYYY-WW", e.g. "2026-40". If only reportFrom is set, every report from reportFrom up to the latest is read.

## `watchBrands` (type: `array`):

Optional. Only return alerts whose brand matches one of these names (case- and accent-insensitive, whole words, e.g. "Nici" or "Mercedes-Benz"). Combined with the barcode watchlist using OR. Leave empty to return all alerts.

## `watchBarcodes` (type: `array`):

Optional. Only return alerts that list one of these barcodes (8-14 digits, e.g. "5904996087548"). Leading zeros are ignored, so a UPC-12 matches its EAN-13 form. Combined with the brand watchlist using OR.

## `notifyingCountries` (type: `array`):

Optional. Only alerts notified by these countries, using English country names as the Commission writes them, e.g. "France", "Germany", "Netherlands". Case-insensitive.

## `productCategories` (type: `array`):

Optional. Only alerts in these product categories (case-insensitive substring), e.g. "Toys", "Electrical appliances", "Cosmetics", "Motor vehicles", "Childcare articles".

## `riskTypes` (type: `array`):

Optional. Only alerts with at least one of these risk types (case-insensitive), e.g. "Chemical", "Choking", "Electric shock", "Fire", "Injuries", "Strangulation".

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

Stop after this many alerts. You are charged per result, so this caps the cost of a run.

## `proxyConfiguration` (type: `object`):

Optional. Leave empty: the Commission's XML files are public and do not need a proxy.

## Actor input object example

```json
{
  "weeksBack": 4,
  "maxResults": 100
}
```

# Actor output Schema

## `results` (type: `string`):

One JSON object per result; fields are described in the dataset schema.

## `runSummary` (type: `string`):

RUN_SUMMARY: status, counts and the silent-failure verdict for this run.

# 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 = {
    "weeksBack": 4,
    "maxResults": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("homelabmobile/eu-safety-gate-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 = {
    "weeksBack": 4,
    "maxResults": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("homelabmobile/eu-safety-gate-alerts").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 '{
  "weeksBack": 4,
  "maxResults": 100
}' |
apify call homelabmobile/eu-safety-gate-alerts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,homelabmobile/eu-safety-gate-alerts"
        }
    }
}
```

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/mHRZ9taU2VfT4N84d/builds/X36BkthLpoJHTL7hg/openapi.json
