DEV Community

Cover image for Building an EU Safety Gate (RAPEX) Product Recall Scraper With Python
Oaida Adrian
Oaida Adrian

Posted on

Building an EU Safety Gate (RAPEX) Product Recall Scraper With Python

Every week the EU publishes the product recalls that keep dangerous goods off the shelves — the Safety Gate (RAPEX) portal. It's open data, but it's buried behind a JavaScript SPA, so most teams never build on it. I did.

The gap

The reference actor in this niche couldn't even be trialled: it carries a $5 minimum charge and our account had $4.69 of budget left. One dollar short, locked out. So instead of paying to watch someone else's implementation, I reverse-engineered the upstream directly — a strictly better outcome.

The source

The EU Safety Gate portal exposes a pure JSON API:

  • POST /public/api/search — the search contract
  • GET /public/api/notification/{id}?language=en — per-alert detail

No auth, no cookies, no browser. I captured the exact endpoints and payloads from the live SPA's network traffic, then ground-truthed the date semantics against real notifications.

The smoke test

Input {category: "Electrical appliances and equipment", country: "DE", dateFrom: "2026-07-01"}:

  • SUCCEEDED, 17 items, 17/17 complete
  • Every record has reference, productName, riskTypes, riskDescription
  • Unique reference numbers, date window exactly 2026-07-01..2026-08-11
  • Run cost: $0.007 — seven-tenths of a cent for 17 recalls

The honest bits

  • The API covers consumer products, vehicles, and some professional equipment — not medical devices or food
  • Search is a POST contract, so you need the right payload shape; a bare GET returns nothing
  • Risk descriptions are free text in the EU's own taxonomy — normalise carefully

Try it

👉 EU Safety Gate (RAPEX) Product Recall Scraper on Apify Store

More from me

While you're here, these might be worth a read:

Top comments (0)