# Safety Recall Radar (`conceivable_extension/safety-recall-radar`) Actor

Real product safety recalls from CPSC, FDA, UK OPSS, EU Safety Gate, Canada and Australia, normalized to one severity scale and matched against your product catalogue by UPC/model/brand with a confidence score — not just a raw recall list.

- **URL**: https://apify.com/conceivable\_extension/safety-recall-radar.md
- **Developed by:** [joseph fadero](https://apify.com/conceivable_extension) (community)
- **Categories:** 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 jurisdiction checked no matches

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Safety Recall Radar

**"Your monitored product catalogue contains 3 products matching new safety notices"** — not "here are 1,089 recall records." The killer feature per the source research is inventory-exposure matching: real recalls from 6 real government bodies, scored against your product catalogue by UPC, model number, or fuzzy brand+name, with a confidence score that makes it immediately clear whether a hit is a confirmed match or a fuzzy one that needs a human look.

### All 6 jurisdictions are real, live, keyless sources — none are placeholders

| Jurisdiction | Real source | Access |
|---|---|---|
| `us_cpsc` | SaferProducts.gov Recall API | JSON, keyless |
| `us_fda` | openFDA enforcement API (food + drug + device) | JSON, keyless |
| `uk_opss` | gov.uk product safety Atom feed + content API | Atom + JSON, keyless |
| `eu_safety_gate` | Safety Gate's official weekly-report XML API | XML, keyless |
| `canada` | Health Canada's open data recall/alert bulk file | JSON, keyless, ~34,000 real rows, updated daily |
| `australia` | productsafety.gov.au recall RSS feed | RSS, keyless |

Confirmed live end-to-end, all 6 succeeding in the same run: 1,089 real records (202 CPSC, 300 FDA, 40 OPSS, 297 EU Safety Gate, 150 Canada, 100 Australia), 0 fetch failures.

### Two real bugs caught during live testing, fixed before shipping

**1. openFDA's date-range query was silently breaking every FDA request.** openFDA's Lucene-style range syntax needs a literal `+TO+` in the raw URL (e.g. `[20260401+TO+99991231]`), but axios URL-encodes a literal `+` character in `params` to `%2B`, which openFDA's query parser rejects with an HTTP 500. Fixed by putting a literal space in the query string instead (`[20260401 TO 99991231]`) — axios's default param serializer encodes a space as `+`, which happens to produce exactly the right raw URL. Confirmed live: all 3 FDA endpoints failed identically before the fix, all 3 succeeded after.

**2. CPSC's hazard text was pointing at the wrong field.** CPSC's API returns both `Description` (product identification only — "this recall involves X battery charger, model Y") and `Hazards[].Name` (the actual hazard explanation — "...can cause serious injuries, internal chemical burns and death"). The first draft used `Description` for severity/hazard-type classification, which meant every CPSC record scored as low-severity "Other" regardless of how serious the real hazard was. Caught by spot-checking real output against the real source record before deploying, not assumed correct because the build succeeded. Fixed to read `Hazards[].Name`, confirmed live: the same battery-ingestion recall now correctly scores `critical` / `Choking/Ingestion` instead of `low` / `Other`.

A related, smaller classification fix: the hazard-type keyword for "Fire" originally matched the word "burn," which is ambiguous between thermal (fire) and chemical (e.g. battery-acid ingestion) burns — a real CPSC record about a swallowed battery's "internal chemical burns" was misclassified as a Fire hazard before this was narrowed to fire-specific terms only (`fire`, `overheat`, `explosion`).

### Severity normalization — real structured hints first, keyword fallback second

Three of the six sources provide a genuine structured severity classification; the other three don't, and this is stated honestly rather than invented:

| Source | Real structured hint |
|---|---|
| `us_fda` | FDA's own official Class I / II / III |
| `canada` | Two real coexisting vocabularies in the same dataset depending on which agency filed the recall: Type I/II/III (health products) and Class 1/2/3 (others) |
| `eu_safety_gate` | "Serious risk" / "Other risk levels" |
| `us_cpsc`, `uk_opss`, `australia` | **No structured field** — severity is keyword-scored against the real hazard text (death → critical; fire/choking/electric shock/serious injury → high; general injury/hazard language → medium; else low) |

### Hazard-type normalization

No two of the six sources share a hazard taxonomy (EU Safety Gate's real `riskType` field, Canada's short but inconsistent `Issue` text, CPSC/FDA/OPSS/Australia's free text only). All six are mapped through the same order-sensitive keyword classifier (`hazardClassifier.ts`) into one consistent vocabulary (Fire, Choking/Ingestion, Electrical, Chemical/Contamination, Laceration/Injury, Entrapment/Tip-over, Drowning/Water, Environmental, or each source's own real category text as a fallback) — a genuine cross-jurisdiction normalization, not each source's own inconsistent labels passed through untouched.

### Inventory-exposure matching — confidence tiers

| Tier | Confidence | Condition |
|---|---|---|
| Exact UPC | 1.0 | Recall and catalogue item share an identical (digits-only normalized) UPC |
| Exact model number | 0.9 | Recall and catalogue item share an identical (normalized) model number |
| Fuzzy, brand confirmed | 0.35 + up to 0.55 | Brand matches exactly; product-name token overlap (Jaccard similarity) scales the rest |
| Fuzzy, brand unknown | up to 0.5 | No brand match on either side; scored on product-name token overlap alone |
| No match | 0 / `null` | Below a 0.3 floor — treated as no match at all, not a very-low-confidence one |

Confirmed live against real data: an exact model-number match (a real EU Safety Gate solar lamp recall, model "Star II") scored 0.9; a fuzzy brand-only match (a real Pixi eyeliner recall against a catalogue entry with a slightly different product name) scored 0.63; an unrelated catalogue item scored 0 and was correctly excluded. **UPC and model number are frequently absent from the real source data itself** — confirmed live that CPSC's own `ProductUPCs`/`Products[].Model` fields were empty in every sample checked — so the fuzzy path is the common real-world case, not an edge case, and its confidence is scored conservatively rather than inflated to look more certain than it is.

### Modes

| Mode | Behavior |
|---|---|
| `jurisdiction_snapshot` | Every real recall for the selected jurisdictions, unmatched — for research without a catalogue |
| `catalogue_match` | Same, plus `matchedCatalogueItem`/`matchConfidence` scored against `productCatalogue` (required for this mode) |

### Output schema

```json
{
  "recallId": "string",
  "jurisdiction": "us_cpsc | us_fda | uk_opss | eu_safety_gate | canada | australia",
  "brand": "string | null",
  "productName": "string",
  "modelNumber": "string | null",
  "hazardType": "string",
  "hazardDescription": "string",
  "recallDate": "string",
  "severityLevel": "low | medium | high | critical",
  "matchedCatalogueItem": "string | null",
  "matchConfidence": "number (0-1)",
  "sourceUrl": "string",
  "checkedAt": "ISO timestamp",
  "fetchStatus": "success | failed",
  "errorMessage": "string | null"
}
```

### Setup note

No browser needed — all 6 real sources work over plain HTTP (JSON/XML/RSS/Atom). Canada's bulk file is ~34,000 historical rows; fetched in full but filtered client-side to the last 120 days and capped at 150 most-recent records per run — a recall radar, not a full historical archive. UK OPSS detail fetches are capped at 40 per run for the same reason.

### Shared "Radar" architecture

This actor doesn't need `deltaStore.ts` — recalls are inherently point-in-time events (a product either has been recalled or hasn't), not documents that get revised in place, so there's no "diff" to track the way Actors 37/38 track status/text changes. The relevant shared pattern reused here is the honesty discipline: real structured hints trusted first, keyword fallback second and labeled as such, never presenting a best-effort heuristic as an official classification a source doesn't actually provide.

### Pricing

| Event | Price |
|---|---|
| Run started | £0.05 |
| Reading success | £0.06 |
| Fetch failed | free |

### n8n integration

- **Workflow A (trigger):** scheduled daily run against a seller's full product catalogue across all 6 jurisdictions (`catalogue_match` mode).
- **Workflow B (processing):** immediate high-priority alert on any `matchedCatalogueItem` with `matchConfidence >= 0.85`; lower-confidence matches logged for manual review rather than triggering an urgent alert.

# Actor input Schema

## `mode` (type: `string`):

catalogue\_match: fetch real recalls and score each against your productCatalogue (exact UPC/model match, or fuzzy brand+name match with a confidence score). jurisdiction\_snapshot: every real recall for the selected jurisdictions, unmatched — useful for research without a catalogue.

## `jurisdictions` (type: `array`):

All 6 are real, live, keyless sources (see README) — no jurisdiction here is a placeholder. Leave blank for all.

## `productCatalogue` (type: `array`):

Required for catalogue\_match mode. Each item: { brand, productName, modelNumber, upc }. Any subset of fields can be populated — matching degrades gracefully (see README for exactly how confidence is scored).

## `categories` (type: `array`):

Optional filter. Matched against each real recall's own category/product-type text via keyword mapping — best-effort, not a shared official taxonomy across all 6 sources (see README).

## Actor input object example

```json
{
  "mode": "jurisdiction_snapshot"
}
```

# Actor output Schema

## `resultsDatasetUrl` (type: `string`):

Product safety recalls from 6 government bodies (CPSC, FDA, OPSS, Safety Gate and others), scored against the supplied product catalogue by UPC, model number, or fuzzy brand+name match, produced by 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("conceivable_extension/safety-recall-radar").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("conceivable_extension/safety-recall-radar").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 '{}' |
apify call conceivable_extension/safety-recall-radar --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,conceivable_extension/safety-recall-radar"
        }
    }
}

```

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/q9m4EUxbWD767NEHJ/builds/Ir57wlAw63gwfOaT1/openapi.json
