# ⚠️ Product Recall Monitor - FDA & CPSC Safety Alerts (`that_red_bird/product-recall-monitor`) Actor

⚡ Get alerted the day a product you sell, stock or compete with is recalled. ✅ Official US feeds: FDA food, drug and device enforcement plus CPSC consumer products. ✅ Filter by brand, keyword or FDA class. Each recall is announced exactly once.

- **URL**: https://apify.com/that\_red\_bird/product-recall-monitor.md
- **Developed by:** [mohamed alaya](https://apify.com/that_red_bird) (community)
- **Categories:** E-commerce, Business, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## Product Recall Monitor

Get told the day a product you sell, stock, distribute or compete with is recalled — from the
official government feeds, not a news site.

### Sources

| Source | Covers |
|---|---|
| **FDA food enforcement** | food and beverage recalls |
| **FDA drug enforcement** | pharmaceutical recalls |
| **FDA device recall** | medical device recalls |
| **CPSC** | consumer products: toys, electronics, appliances, furniture |

All four are free, public, documented government APIs. No scraping, no anti-bot, no key
required (an optional openFDA key just raises rate limits).

### Each recall is announced exactly once

The Actor keeps a ledger of recall ids it has already reported, so a recall that stays in the
feed for weeks is never re-sent. **The first run records a baseline** rather than firing
hundreds of alerts for recalls that are already old news — but it does not run silent: it
pushes one `baseline-summary` row plus up to `baselineSampleSize` (default 10, set to 0 to
disable) of the recalls currently matching your filters, each tagged `isBaseline: true` so
they're never mistaken for a real "new recall" alert. Set `since` on that first run to keep the
baseline tight.

### Filtering

`keywords` (product description, reason, hazard, product names) · `companies` (recalling firm
or manufacturer) · `classifications` (FDA Class I / II / III) · `since` · `limitPerSource`.

Filter by your own brands to catch your supply chain, or by a competitor's to catch theirs.

### What you get

`source` · `category` · `title` · `reason` · `company` · `classification` · `status` ·
`hazard` · `remedy` · `products[]` · `injuries[]` · `unitsAffected` · `distribution` ·
`initiatedAt` / `reportedAt` · `url`

### Typical uses

Retailers and marketplaces pulling unsafe stock fast · importers and distributors tracking
their own supply chain · compliance and QA teams · insurers and law firms watching a category ·
journalists covering product safety · competitor watching.

### Note on dates

openFDA returns dates as `YYYYMMDD`; they are normalised to `YYYY-MM-DD` here. A search that
matches nothing still returns a single explanatory `notice` row and a successful run — **not**
an error and **not** an empty dataset — so a quiet week never looks like a broken feed.

# Actor input Schema

## `sources` (type: `array`):

Which official feeds to watch: food, drug, device (all US FDA) and cpsc (US Consumer Product Safety Commission).

## `keywords` (type: `array`):

Case-insensitive match on product description, reason, hazard and product names — e.g. peanut, lithium, listeria.

## `companies` (type: `array`):

Partial, case-insensitive match on the recalling firm or manufacturer.

## `classifications` (type: `array`):

Filter FDA recalls by class, e.g. "Class I" (most serious), "Class II", "Class III".

## `since` (type: `string`):

ISO date, e.g. 2026-01-01. Strongly recommended on the first run to keep the baseline small.

## `limitPerSource` (type: `integer`):

Upper bound per feed per run.

## `onlyNew` (type: `boolean`):

Keeps a ledger of announced recall ids so nothing is reported twice. The first run records a baseline silently instead of announcing history.

## `resetBaseline` (type: `boolean`):

Clear the seen-recall ledger and start fresh.

## `baselineSampleSize` (type: `integer`):

On the first run (no ledger yet), how many of the currently-matching recalls to include as a labelled sample (isBaseline: true) alongside the summary row, so the dataset is never empty.

## `maxItems` (type: `integer`):

Hard cap on dataset rows per run. 0 = no cap.

## `fdaApiKey` (type: `string`):

Raises openFDA rate limits. Not required for normal use.

## `webhookUrl` (type: `string`):

POSTed when new recalls are found. Slack/Discord/Zapier compatible.

## `stateStoreName` (type: `string`):

Named key-value store holding the seen-recall ledger.

## Actor input object example

```json
{
  "sources": [
    "food",
    "drug",
    "device",
    "cpsc"
  ],
  "limitPerSource": 100,
  "onlyNew": true,
  "resetBaseline": false,
  "baselineSampleSize": 10,
  "maxItems": 0,
  "stateStoreName": "product-recall-monitor-state"
}
```

# Actor output Schema

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

No description

## `downloadCsv` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `count` (type: `string`):

No description

# 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("that_red_bird/product-recall-monitor").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("that_red_bird/product-recall-monitor").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 that_red_bird/product-recall-monitor --silent --output-dataset

```

## MCP server setup

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

```

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/fU502sl6nj79cxhfr/builds/a6zJRf9B1aeZEw7DC/openapi.json
