# US Safety Recalls: CPSC + FDA Alerts & Search (MCP) (`amygraphics/us-safety-recalls`) Actor

Official CPSC + openFDA safety recalls for AI agents: search US consumer product, food, drug and device recalls (hazards, FDA severity classes, firms) and monitor topics. No key. MCP-ready.

- **URL**: https://apify.com/amygraphics/us-safety-recalls.md
- **Developed by:** [Zakaria el bouami](https://apify.com/amygraphics) (community)
- **Categories:** Lead generation, Automation, MCP servers
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## US Safety Recalls: CPSC + FDA Alerts & Search (MCP)

One clean API over the **two official US safety recall systems**: CPSC consumer products (toys, electronics, batteries — often sold on Amazon) and openFDA enforcement (food, drugs, medical devices, with **Class I/II/III severity**). Search any keyword or date window, or monitor topics and get **`new-recall` alerts the day a recall posts**. No key. MCP-compatible.

### Who carries the cost of a missed recall

Marketplace sellers get suspended the day a dangerous SKU appears on the site. Brands and importers face multi-million liability. Paid recall-trackers cost $50–200/month and only email summaries. This actor replaces them with direct official records, structured.

### What you get per row

Recall number, date, product name, recalling firm, hazard/reason, **FDA severity class**, FDA status (On-Going/Terminated), retailers/distribution area, injury notes (CPSC), official recall URL.

### Two modes

#### `search` — check now

```json
{ "mode": "search", "keyword": "lithium battery",
  "sources": ["cpsc", "fda-device"], "dateFrom": "2026-01-01", "maxResults": 10 }
```

Sources = any of `cpsc`, `fda-food`, `fda-drug`, `fda-device` (default: all four). Rows sorted newest first.

#### `monitor` — safety radar

```json
{ "mode": "monitor", "watchQueries": ["toys", "salmonella", "penicillin"] }
```

- **Run 1 = free baseline** — snapshots recall IDs for the last ~60 days per topic.
- **Run 2+** emits only **`new-recall`** rows for recalls published since.
- Schedule daily; silence costs **$0.001**.

### Data honesty

Rows come only from the official feeds (saferproducts.gov RestWebServices + api.fda.gov enforcement). CPSC lacks a severity scale — the field is blank (never guessed). FDA `status` is taken as-is.

### Recipes

1. **Seller survival** — scan your catalog keywords weekly, before Amazon's compliance bot scans it.
2. **Brand war-room (Slack)** — `new-recall` in your category → instant post with URL.
3. **Risk-agent (MCP)** — "any recall on baby formula / e-bikes / anti-histamines?" answered with dated official records.

### Pricing

| event | price |
|---|---|
| Actor start | $0.001 |
| Safety recall | $0.001 / row |

Typical: 10-row search ≈ **$0.011** · daily monitor with 2 new recalls ≈ **$0.003**.

### MCP / AI-agent usage

```
https://api.apify.com/v2/acts/YOUR_HANDLE~us-safety-recalls/run-sync-get-dataset-items?token=YOUR_TOKEN
```

# Actor input Schema

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

search = query latest recalls by keyword/date across sources · monitor = new-recall alerts per topic.

## `keyword` (type: `string`):

(search) e.g. "toys", "lithium battery", "salmonella", "chips". Applied to CPSC title and FDA product description.

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

empty = all. Any of: cpsc, fda-food, fda-drug, fda-device.

## `dateFrom` (type: `string`):

(search) ISO date, e.g. 2026-01-01.

## `dateTo` (type: `string`):

(search) ISO date.

## `watchQueries` (type: `array`):

(monitor) Keywords to watch across the 4 sources, e.g. \["toys", "salmonella"]. New recall -> `new-recall` alert.

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

Cap rows per run (each billed row $0.001).

## `requestDelaySecs` (type: `number`):

Politeness delay across CPSC/FDA calls.

## Actor input object example

```json
{
  "mode": "search",
  "keyword": "",
  "sources": [],
  "dateFrom": "",
  "dateTo": "",
  "watchQueries": [],
  "maxResults": 10,
  "requestDelaySecs": 0.3
}
```

# Actor output Schema

## `results` (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("amygraphics/us-safety-recalls").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("amygraphics/us-safety-recalls").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 amygraphics/us-safety-recalls --silent --output-dataset

```

## MCP server setup

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

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/G8RYyxsjmRb5kQBEd/builds/yDWCzYTNi74Huqcf2/openapi.json
