API · WebMCP · JSON

API and tools for AI agents

The catalog of dangerous products is open to programs and AI agents: a read-only JSON API and WebMCP tools right in the browser. No key needed.

  • 120 requests per minute per IP
  • CORS GET *
  • Responses are cached for 5-60 minutes

Endpoints

GET/api/v1/alerts

Search alerts, newest first. Same filters as on the site.

ParameterTypeDescription
qstringFree text: name, brand, model, barcode or alert number. Prefix match, all words required.
categorystringCategory key from /taxonomy, e.g. toys
riskstringRisk key from /taxonomy, e.g. chemical
originCCCountry of origin, ISO 3166-1 code (CN)
countryCCNotifying country (DE)
yearintegerPublication year
barcodedigitsEAN / UPC barcode; 12 and 13 digit forms are matched both ways
sortnew | oldOrder, default new
pageintegerPage, from 1
per_pageintegerPage size, 1..50, default 20
langru | enLanguage of labels and texts, default ru
GET/api/v1/alerts/{id}?lang=ru

Full alert: description, danger, breached requirements, measures, barcodes, batches, photos.

GET/api/v1/taxonomy?lang=ru

Categories, risk types, countries and years: keys, labels and alert counts.

GET/api/v1/stats?lang=ru

Summary: total alerts, dates, distribution by year, top categories, risks and countries.

GET/api/v1/openapi.json

OpenAPI 3.1 description.

Example

curl 'https://safety.weblocally.com/api/v1/alerts?q=charger&risk=electric.shock&per_page=1&lang=en'
{
  "lang": "en",
  "total": 962,
  "page": 1,
  "per_page": 1,
  "pages": 962,
  "results": [
    {
      "id": 10119149,
      "reference": "SR/02886/26",
      "published": "2026-10-09T07:37:20.972Z",
      "modified": "2026-10-09T07:37:20.973Z",
      "title": {
        "text": "USB charger",
        "en": "USB charger",
        "translated": false
      },
      "name_specific": "DM132",
      "brands": [
        "DAM"
      ],
      "models": [
        "97177085"
      ],
      "barcodes": [],
      "category": {
        "key": "electrical.appliances.and.equipment",
        "source_key": "product.category.electrical.appliances.and.equipment",
        "label": "Electrical appliances and equipment",
        "en": "Electrical appliances and equipment",
        "translated": false
      },
      "risks": [
        {
          "key": "electric.shock",
          "source_key": "riskType.electric.shock",
          "label": "Electric shock",
          "en": "Electric shock",
          "translated": false
        }
      ],
      "origin_country": {
        "code": "CN",
        "label": "People's Republic of China",
        "en": "People's Republic of China",
        "translated": false
      },
      "notifying_country": {
        "code": "FR",
        "label": "France",
        "en": "France",
        "translated": false
      },
      "photo": {
        "thumb": "https://cdn.weblocally.com/safety-gate/10119149/11235691-t.webp",
        "full": "https://cdn.weblocally.com/safety-gate/10119149/11235691-f.webp"
      },
      "url": "https://safety.weblocally.com/en/alert/10119149",
      "api_url": "https://safety.weblocally.com/api/v1/alerts/10119149?lang=en",
      "source_url": "https://ec.europa.eu/safety-gate-alerts/screen/webReport/alertDetail/10119149"
    }
  ]
}

Translations and source

Free text fields are objects { text, en, translated }: with lang=ru, text holds a reviewed Russian translation when one exists (translated: true), otherwise the English original. The original is always in en. Category, risk and country labels: { key, label, en, translated }.

Every record has source_url, the original alert on the European Commission site. Data © European Union, Safety Gate; reuse is authorised provided the source is acknowledged.

Errors: JSON { "error": { "code", "message" } } with status 400, 404 or 429 (Retry-After header).

WebMCP

Site pages register tools for the AI agent built into the browser, following the WebMCP draft (W3C Web Machine Learning CG, document.modelContext). The agent can search products, open alerts and check barcodes without parsing HTML. In browsers without WebMCP the script does nothing.

ToolWhat it does
search_dangerous_products
read-only
Search the catalog of non-food products found dangerous in the EU (Safety Gate / RAPEX alerts since 2005: toys, cosmetics, electrical appliances, childcare articles, vehicles and more). Filters by free text (product name, brand, model, barcode or alert number), category, risk type, country of origin, notifying country and year. Returns alert summaries, newest first, each with a link to the page on this site and to the original EU alert. Category and risk keys come from list_categories_and_risks.
query stringcategory stringrisk stringorigin_country stringnotifying_country stringyear integersort newest | oldestpage integerper_page integerlang ru | en
get_product_alert
read-only
Get the full details of one dangerous product alert: product description, brands, models, barcodes, batches, the danger, breached requirements, measures taken, photos, dates, the page on this site and the original EU alert URL. Pass either the numeric id or the alert reference number.
id integerreference stringlang ru | en
list_categories_and_risks
read-only
List the product categories, risk types, countries of origin, notifying countries and years present in the catalog, with their keys, human readable labels and the number of alerts. Use the keys as filters in search_dangerous_products.
lang ru | en
check_barcode
read-only
Check whether a product barcode (EAN-13, EAN-8 or UPC-A digits) appears in any EU dangerous product alert. The 12 and 13 digit forms of the same code are matched both ways. A missing match does not prove the product is safe: only products reported to Safety Gate are listed, and many alerts have no barcode.
barcode* stringlang ru | en
open_alert_page
read-only
Open the page of one alert on this site in the current tab so the user can see the photos and details. Navigates away from the current page.
id* integerlang ru | en

Declarative tool

FormWhat it does
report_site_mistakePrepare a report to the site administrator about a mistake on this site: a wrong translation, wrong product data or a photo problem. Use only when the user asks to report a mistake. The form is filled in for the user, who reviews and sends it.

All tools are read-only and ask for no personal data. Alert texts come from an external source and are marked untrustedContentHint. Tools are exposed to this origin only (no exposedTo).

Machine-readable descriptions