# EU Safety Gate (RAPEX) Scraper - Product Recalls & Alerts (`studio-amba/safety-gate-scraper`) Actor

Scrape product recall and safety alerts from the EU Safety Gate (ex-RAPEX) portal: product names, brands, risk types and descriptions, notifying country, measures taken, barcodes and categories. 46,000+ official EU alerts back to 2005. No cookies, no login.

- **URL**: https://apify.com/studio-amba/safety-gate-scraper.md
- **Developed by:** [Studio Amba](https://apify.com/studio-amba) (community)
- **Categories:** Business, E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 result scrapeds

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

## EU Safety Gate (RAPEX) Scraper

Scrape product recall and safety alerts from the [EU Safety Gate portal](https://ec.europa.eu/safety-gate-alerts/screen/search) (formerly RAPEX), the European Commission's rapid alert system for dangerous non-food products. The portal holds 46,000+ alerts going back to 2005, and new alerts are published weekly.

### Why use this actor?

Product recalls are a compliance problem before they are a news story. E-commerce sellers, marketplaces, importers, insurers, and product-safety teams need to know when a product they sell (or a competitor's product) gets flagged in the EU. This actor turns the official Safety Gate database into structured JSON you can feed into monitoring, compliance checks, or market research.

Typical uses:

- **Marketplace compliance**: check listed products (by brand, barcode, or model number) against active EU recalls
- **Brand monitoring**: get alerted when a brand you distribute or compete with is recalled
- **Risk research**: analyze which product categories, countries of origin, and risk types drive recalls
- **Insurance and legal**: pull the official risk description, legal provision, and measures taken for a specific alert

No cookies, no login, no browser. The data comes straight from the portal's public JSON API.

### Input

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `searchQuery` | String | No | Free-text keyword, e.g. `toy`, `lithium battery`, or a brand name. Empty = most recent alerts across all products |
| `maxResults` | Integer | No | Maximum alerts to return (default: 100) |
| `language` | String | No | Two-letter EU language code for alert texts (default: `en`) |
| `includeDetails` | Boolean | No | Fetch full detail per alert: risk description, measures, countries, barcode (default: `true`) |
| `proxyConfiguration` | Object | No | Proxy settings. Public EU data, low anti-bot; residential is the safe default for large runs |

An empty input `{}` works and returns the 100 most recent alerts.

### Output

Each alert contains:

| Field | Type | Example |
|-------|------|---------|
| `reference` | String | `"SR/01963/26"` |
| `alertType` | String | `"ARTICLE_12"` (serious risk) |
| `productName` | String | `"Sand-filled toy"` |
| `productSpecificName` | String | `"Fredhezza naturale plus"` |
| `productCategory` | String | `"TOYS"` |
| `productDescription` | String | `"Stretching sand-filled toy in the shape of a carrot."` |
| `brand` | String | `"Trendhaus"` |
| `riskType` | String | `"CHEMICAL"` |
| `riskDescription` | String | `"The sand inside contains asbestos. Asbestos could cause cancer."` |
| `legalProvision` | String | `"This product does not comply with the Toy Safety Directive."` |
| `notifyingCountry` | String | `"Germany"` |
| `countryOfOrigin` | String | `"People's Republic of China"` |
| `measures` | Array | `["PRODUCT_RECALL_FROM_CONSUMERS (VOLUNTARY)"]` |
| `barcode` | String | `"4032722967176"` |
| `modelType` | String | `"967176"` |
| `soldOnline` | String | `"NO"` |
| `publicationDate` | String | `"2026-07-02T14:04:09.009+00:00"` |
| `url` | String | Link to the alert on the Safety Gate portal |
| `imageUrl` | String | Main product photo URL |
| `reportCode` | String | `"Report-2026-26"` |
| `scrapedAt` | String | ISO timestamp |

Fields marked with `includeDetails` in the schema are empty when `includeDetails` is `false`.

### Example output

```json
{
    "reference": "SR/01963/26",
    "alertType": "ARTICLE_12",
    "productName": "Sand-filled toy",
    "productSpecificName": "",
    "productCategory": "TOYS",
    "productDescription": "Stretching sand-filled toy in the shape of a carrot.",
    "brand": "Trendhaus",
    "riskType": "HEALTH_RISK_OTHER",
    "riskDescription": "The toy could rupture and the filling of the inside could come out. The sand inside contains asbestos. Asbestos could cause cancer.",
    "legalProvision": "This product does not comply with the requirements of the Toy Safety Directive.",
    "notifyingCountry": "Germany",
    "countryOfOrigin": "People's Republic of China",
    "measures": ["PRODUCT_RECALL_FROM_CONSUMERS (VOLUNTARY)"],
    "barcode": "4032722967176",
    "modelType": "967176",
    "soldOnline": "NO",
    "publicationDate": "2026-07-02T14:04:09.009+00:00",
    "url": "https://ec.europa.eu/safety-gate-alerts/screen/webReport/alertDetail/10099442",
    "imageUrl": "https://ec.europa.eu/safety-gate-alerts/public/api/notification/image/11012389",
    "reportCode": "",
    "scrapedAt": "2026-07-05T18:30:00.000Z"
}
````

### How to scrape Safety Gate data

1. Open the actor on Apify and click **Try for free**
2. Optionally set a `searchQuery` (product keyword, brand, or barcode) and `maxResults`
3. Click **Start**. The actor queries the official Safety Gate JSON API, walks the paginated results, and (by default) fetches the full detail record per alert
4. Download the results from the **Dataset** tab as JSON, CSV, or Excel, or pull them via the Apify API

To monitor new recalls continuously, run the actor on a [schedule](https://docs.apify.com/platform/schedules) (e.g. daily) and diff on the `reference` field. Alerts are sorted newest first, so a small `maxResults` (50 to 100) is enough for a daily check.

#### Search tips

- The free-text search covers product names, brands, model numbers, and alert references
- Search in the language you set: `language: "de"` with `searchQuery: "Spielzeug"` works the same as English
- To pull the full historical database, leave `searchQuery` empty and set `maxResults` high. Expect roughly one request per 50 alerts plus one per alert when `includeDetails` is on

### Performance and cost

- Listing-only runs (`includeDetails: false`) fetch 50 alerts per request and are very fast
- Detail runs add one lightweight JSON request per alert, paced at ~5 requests/second
- 100 alerts with full details typically completes in under a minute on default memory

### What is the Safety Gate?

Safety Gate (previously called RAPEX) is the EU's rapid alert system for dangerous non-food consumer products. National authorities of EU/EEA countries notify the European Commission when they find a product presenting a serious risk, and the Commission publishes the alerts weekly. Alerts cover toys, electronics, cosmetics, vehicles, childcare articles, clothing, and more.

This actor scrapes only the public data published by the European Commission at ec.europa.eu. Attribution: European Union, Safety Gate.

### FAQ

**Do I need an account on the Safety Gate portal?**
No. The data is public and the actor needs no cookies or login.

**Is this legal?**
The actor reads the same public JSON API the official portal website uses. The data is published by the European Commission for public use; reuse is covered by the [Commission's reuse policy](https://commission.europa.eu/legal-notice_en) (CC BY 4.0 in most cases). Check the legal notice for your specific use.

**Which languages are supported?**
All official EU languages. Set `language` to the two-letter code (`en`, `de`, `fr`, `es`, `it`, `nl`, `pl`, ...). Risk descriptions fall back to English when a translation is missing.

**How fresh is the data?**
The Commission publishes new alerts weekly, plus daily additions. Each run pulls live data.

**Can I get the product photos?**
Yes. `imageUrl` points to the official image endpoint and can be downloaded directly.

### Support

Found an issue or need an extra field (for example the full measures detail or reacting countries)? Open an issue on the actor page and it gets fixed quickly.

# Actor input Schema

## `searchQuery` (type: `string`):

Optional free-text keyword to filter alerts, e.g. 'toy', 'lithium battery' or a brand name. Leave empty to get the most recent alerts across all products.

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

Maximum number of alerts to return. The portal holds 46,000+ alerts going back to 2005.

## `language` (type: `string`):

Two-letter language code for alert texts (risk description, measures). The portal supports all official EU languages, e.g. 'en', 'de', 'fr', 'es', 'it', 'nl'.

## `includeDetails` (type: `boolean`):

Fetch the full detail record for each alert (risk description, measures taken, notifying country, country of origin, barcode, model/type). One extra request per alert. Turn off for a faster, listing-only run.

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

Proxy settings. The Safety Gate API is public EU data with low anti-bot, so datacenter proxies usually work. Residential is the safe default for large runs.

## Actor input object example

```json
{
  "searchQuery": "toy",
  "maxResults": 10,
  "language": "en",
  "includeDetails": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "searchQuery": "toy",
    "maxResults": 10,
    "language": "en",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("studio-amba/safety-gate-scraper").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 = {
    "searchQuery": "toy",
    "maxResults": 10,
    "language": "en",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("studio-amba/safety-gate-scraper").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 '{
  "searchQuery": "toy",
  "maxResults": 10,
  "language": "en",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call studio-amba/safety-gate-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=studio-amba/safety-gate-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "EU Safety Gate (RAPEX) Scraper - Product Recalls & Alerts",
        "description": "Scrape product recall and safety alerts from the EU Safety Gate (ex-RAPEX) portal: product names, brands, risk types and descriptions, notifying country, measures taken, barcodes and categories. 46,000+ official EU alerts back to 2005. No cookies, no login.",
        "version": "0.1",
        "x-build-id": "wHg8xvfHYUaGqiug5"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/studio-amba~safety-gate-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-studio-amba-safety-gate-scraper",
                "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/studio-amba~safety-gate-scraper/runs": {
            "post": {
                "operationId": "runs-sync-studio-amba-safety-gate-scraper",
                "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/studio-amba~safety-gate-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-studio-amba-safety-gate-scraper",
                "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": {
                    "searchQuery": {
                        "title": "Search query",
                        "type": "string",
                        "description": "Optional free-text keyword to filter alerts, e.g. 'toy', 'lithium battery' or a brand name. Leave empty to get the most recent alerts across all products."
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Maximum number of alerts to return. The portal holds 46,000+ alerts going back to 2005.",
                        "default": 100
                    },
                    "language": {
                        "title": "Language",
                        "type": "string",
                        "description": "Two-letter language code for alert texts (risk description, measures). The portal supports all official EU languages, e.g. 'en', 'de', 'fr', 'es', 'it', 'nl'.",
                        "default": "en"
                    },
                    "includeDetails": {
                        "title": "Include alert details",
                        "type": "boolean",
                        "description": "Fetch the full detail record for each alert (risk description, measures taken, notifying country, country of origin, barcode, model/type). One extra request per alert. Turn off for a faster, listing-only run.",
                        "default": true
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings. The Safety Gate API is public EU data with low anti-bot, so datacenter proxies usually work. Residential is the safe default for large runs."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
