# CPSC Product Recalls Monitor — US Consumer Product Safety (`johnatan029/cpsc-recalls-monitor`) Actor

US consumer product recalls from the official CPSC Recall Database API: hazards, remedies, retailers, images and UPCs (when available). Date-window queries with relative windows for daily monitoring. No login. Not affiliated with the CPSC.

- **URL**: https://apify.com/johnatan029/cpsc-recalls-monitor.md
- **Developed by:** [Johnn Mottin](https://apify.com/johnatan029) (community)
- **Categories:** Business, E-commerce, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 recall results

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

## CPSC Product Recalls Monitor — US Consumer Product Safety

**Selling a recalled product in the US is illegal — and you find out from a customer, a marketplace suspension, or this Actor.** Monitor US consumer product recalls straight from the official CPSC Recall Database API — hazards, remedies, injuries, retailers, product images, and UPCs (when reported). No login, no browser.

**Not affiliated with, sponsored by, or endorsed by the U.S. Consumer Product Safety Commission (CPSC).** All data comes from the official public [CPSC Recall Database API](https://www.saferproducts.gov/) and remains subject to CPSC's terms.

Who it's for:

- **E-commerce sellers & marketplaces** (Amazon/FBA, Walmart, Shopify): know within your monitoring window when a product you list or resell is recalled — selling recalled products is illegal in the US.
- **Compliance & safety teams**: automated recall feed filtered by product type, manufacturer, or retailer.
- **Insurers and product-liability analysts**: structured hazard/injury/remedy data for risk models.

### How it works

One query per run against the official API, by **recall-date window**:

- **Relative window** (`daysBack`, default 30) — recommended for scheduled monitoring: the window is computed at run time, so a saved task never needs maintenance.
- **Absolute window** (`recallDateStart`/`recallDateEnd`, `YYYY-MM-DD`).

Server-side filters (applied by the CPSC API itself): `productName`, `manufacturer`. Client-side filters (applied after fetching): `retailer` substring and `keywords` over title/description/products/hazards — **you are only charged for records actually written to the dataset**; discarded records cost you nothing.

### Input

Daily-monitor example (copy-paste ready):

```json
{
  "daysBack": 30,
  "retailer": "Amazon",
  "keywords": ["battery", "fire", "burn"],
  "maxResults": 100
}
```

| Field | Type | Default | Description |
|---|---|---|---|
| `daysBack` | int 1–365 | `30` | Relative window when dates are empty. CPSC publishes ~40 recalls/month (measured Jun–Jul 2026), so 30 days is practically never empty |
| `recallDateStart` / `recallDateEnd` | YYYY-MM-DD | — | Absolute window (both together); takes precedence |
| `productName` | string | — | Server-side filter (e.g. `stroller`) |
| `manufacturer` | string | — | Server-side filter (e.g. `Peony`) |
| `retailer` | string | — | Client-side substring over the retailers list (e.g. `Amazon`) |
| `keywords` | string\[] | `[]` | Client-side; any keyword may match title, description, product names or hazard text |
| `maxResults` | int | `100` | Cap of written records (limit 5,000) |

### Output (missing = `null` / `[]`, never invented)

Real record (recall published 2026-07-23 — official public data):

```json
{
  "recallId": 10876,
  "recallNumber": "26635",
  "recallDate": "2026-07-23T00:00:00",
  "title": "Aojieni Silicone Recalls Sili Factory Pull String Teething Toys Due to Risk of Serious Injury or Death from Choking...",
  "url": "https://www.cpsc.gov/Recalls/2026/Aojieni-Silicone-Recalls-Sili-Factory-Pull-String-Teething-Toys...",
  "productNames": ["Sili Factory Pull String Teething Toys"],
  "hazards": ["The recalled teething toys... posing a risk of serious injury or death from choking..."],
  "injuries": ["None reported"],
  "remedyOptions": ["Refund"],
  "retailers": ["Online at Amazon.com from January 2025 through April 2026 for about $10."],
  "manufacturerCountries": ["China"],
  "imageUrls": ["https://www.cpsc.gov/s3fs-public/..."],
  "upcs": []
}
```

| Field | Type | Presence (measured on 84 real recalls) | Notes |
|---|---|---|---|
| `recallId`, `recallNumber`, `recallDate`, `title`, `url` | scalar | 100% — **core fields**¹ | |
| `lastPublishDate`, `description`, `consumerContact` | string | ~100% | |
| `productNames` / `products[]` | array | 100% | `products[]` keeps name/model/type/units per product |
| `hazards[]`, `injuries[]`, `remedies[]`, `remedyOptions[]` | array | 100% | hazard text is free-form paragraphs (that's why hazard filtering is keyword-based) |
| `retailers[]` | array | 100% | free-text, includes where/when/price sold — **the practical bridge to match recalls against your Amazon/e-commerce catalog** |
| `manufacturers[]`, `manufacturerCountries[]` | array | 100% | |
| `imageUrls[]`, `imageCaptions[]` | array | 100% | official CPSC product photos |
| `upcs[]` | array | **~4%** (3/84 in the measured sample) | best-effort: CPSC rarely publishes UPCs; when present, join directly with Amazon catalog actors |
| `soldAtLabel`, `inconjunctionUrls[]` | scalar/array | rare | best-effort |

¹ Core fields are watched by the built-in health check: if more than 50% come back null the run **fails loudly naming the dead field** (`DEAD_FIELDS`) — never a silent broken dataset. `STATS` (key-value store) records completeness per core field, `upcPresenceRate`, retries and warnings; `ERRORS` records failures with stable codes (`HTTP_UNAVAILABLE`, `HTTP_TIMEOUT`, `INVALID_INPUT`, `API_CONTRACT_CHANGED`, `EMPTY_RESULTS`, `DEAD_FIELDS`).

An empty window (API answering `200` with `[]`) is a **legitimate success** flagged as `STATS.legitimateEmptyWindow` — distinct from a failed fetch, which always fails the run loudly.

### Schedule it (recommended — cloud, not your desktop)

Recalls are a daily/weekly compliance feed — the relative window recomputes every run. **Use Apify's own Schedules, not a local scheduler** — configure it once and it runs in the cloud whether or not your machine is on.

1. Save your input as a **Task** (Console → this Actor → *Create task*), e.g. `daysBack: 7` with your category keywords.
2. Console → **Schedules → Create schedule**, add the Task, set the cron (e.g. daily 6am → `0 6 * * *`).
3. Route the dataset to Slack, Sheets, your CRM or webhook via Apify integrations.

Because `daysBack` is relative, a saved schedule never needs maintenance — the window moves with the run.

### API usage examples

Run and get items in one call:

```bash
curl -s "https://api.apify.com/v2/acts/<YOUR_USERNAME>~cpsc-recalls-monitor/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
  -X POST -H "Content-Type: application/json" \
  -d '{"daysBack": 7, "maxResults": 50}'
```

Weekly category watch (schedule in Console → Schedules):

```json
{ "daysBack": 7, "keywords": ["crib", "stroller", "car seat", "toy"], "maxResults": 100 }
```

Amazon-seller catalog guard:

```json
{ "daysBack": 30, "retailer": "Amazon", "maxResults": 200 }
```

### Pricing

Billed per record written to the dataset (Pay Per Event) — see the Pricing tab on this page for current rates. Records discarded by the date window, the server-side filters, the client-side filters or `maxResults` are never billed. Use `daysBack`, `productName`, `manufacturer`, `retailer`, `keywords` and `maxResults` to control exactly what you pay for.

### Honest limits

- CPSC publishes ~500 recalls/year; short windows (1–3 days) can legitimately be empty — that's why the default window is 30 days.
- `upcs` is present in only ~4% of recalls (measured); retailer/product-name matching is the reliable join path.
- Hazard text is free-form; there is no official hazard taxonomy in the API.
- One API request per run (the API returns the whole window; no pagination).

### FAQ

**Do I need an account or API key for CPSC?** No. The Actor reads the official public CPSC Recall Database API without logging in.

**What exactly am I charged for?** Per record written to the dataset (Pay Per Event) — everything discarded by filters, windows or caps costs you nothing. The Pricing tab on this page is always the authoritative source for current rates and for any per-run fee.

**Can I schedule it?** Yes — that is the intended use. See "Schedule it" above.

**Is this affiliated with the CPSC?** No. This is an unofficial community Actor; all data comes from the official public CPSC Recall Database API and remains subject to CPSC's terms.

# Actor input Schema

## `daysBack` (type: `integer`):

Used when recallDateStart/recallDateEnd are empty: fetches recalls from today back N-1 days. Default 30 — CPSC publishes ~40 recalls/month, so a 30-day window is practically never empty.

## `recallDateStart` (type: `string`):

Optional absolute window — provide together with recallDateEnd. Example: 2026-01-01.

## `recallDateEnd` (type: `string`):

Optional absolute window — provide together with recallDateStart.

## `productName` (type: `string`):

Filtered by the CPSC API itself (server-side). Example: stroller.

## `manufacturer` (type: `string`):

Filtered by the CPSC API itself (server-side). Example: Peony.

## `retailer` (type: `string`):

Substring match on the retailers list (e.g. Amazon). Applied after fetching — you are only charged for records that pass.

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

Any keyword may match title, description, product names or hazard text (case/diacritics-insensitive). Applied after fetching — you are only charged for records that pass.

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

Cap of records written to the dataset (limit: 5000).

## `debug` (type: `boolean`):

Verbose logging.

## Actor input object example

```json
{
  "daysBack": 30,
  "keywords": [],
  "maxResults": 100,
  "debug": false
}
```

# 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 = {
    "daysBack": 30,
    "maxResults": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("johnatan029/cpsc-recalls-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 = {
    "daysBack": 30,
    "maxResults": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("johnatan029/cpsc-recalls-monitor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "daysBack": 30,
  "maxResults": 100
}' |
apify call johnatan029/cpsc-recalls-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=johnatan029/cpsc-recalls-monitor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/Wr9mBMAISDVeiDfPK/builds/x8w4xZyrl7pON2iPT/openapi.json
