# CPSC Product Recalls — UPC, brand, retailer & date (`brightish_ascent/cpsc-product-recalls-monitor`) Actor

CPSC recalls API for saferproducts.gov. Filter U.S. Consumer Product Safety Commission recalls by UPC, brand/manufacturer, retailer, and date — one normalized dataset row per recall. Hazard in output; see FAQ for Hazard query limits.

- **URL**: https://apify.com/brightish\_ascent/cpsc-product-recalls-monitor.md
- **Developed by:** [Michael Rice](https://apify.com/brightish_ascent) (community)
- **Categories:** Business, Developer tools
- **Stats:** 2 total users, 1 monthly users, 50.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 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/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

## CPSC Product Recalls API — Filter by UPC, brand, retailer & date

Query the official U.S. **CPSC** [saferproducts.gov](https://www.saferproducts.gov/RestWebServices/Recall) Recalls REST API and get **one normalized dataset item per product recall**. Filter by UPC, manufacturer/brand, hazard, retailer, remedy, recall number, title, country, importer, and date range — ideal for compliance monitoring and product-safety research.

> **Not affiliated with the U.S. CPSC.** Public API data only. Verify every recall on the official CPSC page before taking action.

### Features

- **Official CPSC recalls API** — HTTP `GET` to saferproducts.gov; no browser, no Crawlee
- **Rich filters** — product name, manufacturer/brand, hazard, remedy, retailer, UPC, recall number, title, manufacturer country, importer, in-conjunction URL, recall date range
- **Normalized output** — stable fields (`recallNumber`, `recallDate`, `title`, `manufacturers`, `products`, `hazards`, `remedies`, `retailers`, `upc`, `url`, …) ready for pipelines and dashboards
- **Safety by default** — empty input auto-applies a ~90-day date window (or set filters / `allowUnfiltered: true` for a capped full dump)
- **Bounded & resilient** — `maxItems` (default 100, hard cap 5000), retry/backoff on HTTP 429 / 5xx, clear User-Agent
- **Optional raw payload** — attach the original CPSC JSON under `raw` when `includeRaw` is true

### Who is it for

- **Retail & marketplace compliance** teams tracking recalls by brand, UPC, or retailer
- **Consumer-product manufacturers / importers** monitoring hazard and remedy language
- **Insurance, legal, and QA** workflows that need machine-readable product recall data
- **Researchers and journalists** extracting CPSC recall history for analysis
- **Developers** who want a ready-made Apify Actor instead of hand-rolling the saferproducts.gov client

### How to scrape / extract CPSC product recall data

1. Open this Actor on Apify and set at least one filter (e.g. `productName`, `upc`, `hazard`, `manufacturer`, or a date range).
2. Optionally set `maxItems`, `includeRaw`, and `descriptionSnippetMaxLength`.
3. Run the Actor. It calls\
   `GET https://www.saferproducts.gov/RestWebServices/Recall?format=json&…`\
   with only **documented** official parameter names (unknown keys can cause the API to return *all* recalls).
4. Read results from the default dataset — one row per recall — or download via the dataset API URL shown in the run output.

**Tips:** Prefer filtered queries over unfiltered dumps. There is no pagination; the API returns the full match set and this Actor truncates client-side with `maxItems`. There is **no** free-text `InConjunctionWith` parameter — use `inconjunctionUrl` (`InconjunctionURL`).

Official docs: [CPSC Recalls API Information](https://www.cpsc.gov/Recalls/CPSC-Recalls-Application-Program-Interface-API-Information).

### Input example

```json
{
  "recallDateStart": "2025-01-01",
  "recallDateEnd": "2026-12-31",
  "maxItems": 50,
  "includeRaw": false,
  "descriptionSnippetMaxLength": 400,
  "allowUnfiltered": false
}
```

Store **Try** / first-run uses a similar date window + modest `maxItems` so an unedited run succeeds. Other useful filters: `productName`, `manufacturer`, `retailer`, `upc`, `recallNumber`. Prefer those over `hazard` today — see FAQ (upstream `Hazard` filter currently returns empty). If you clear all filters, the Actor auto-applies a ~90-day date window (unless `allowUnfiltered: true`).

| Field | Maps to API | Notes |
| --- | --- | --- |
| `productName` | `ProductName` | e.g. `crib` |
| `manufacturer` | `Manufacturer` | Brand / maker |
| `hazard` | `Hazard` | Official param kept; **upstream currently returns 0** for all tried values — filter `hazards[]` client-side (see FAQ) |
| `remedy` | `Remedy` | |
| `retailer` | `Retailer` | |
| `upc` | `UPC` | |
| `recallNumber` | `RecallNumber` | |
| `recallTitle` | `RecallTitle` | |
| `manufacturerCountry` | `ManufacturerCountry` | |
| `importer` | `Importer` | |
| `inconjunctionUrl` | `InconjunctionURL` | |
| `recallDateStart` / `recallDateEnd` | `RecallDateStart` / `RecallDateEnd` | Prefer `YYYY-MM-DD` |
| `maxItems` | (client) | Default `100`, max `5000` |
| `includeRaw` | (client) | Attach original JSON under `raw` |
| `descriptionSnippetMaxLength` | (client) | Default `400` |
| `allowUnfiltered` | (client) | Default `false` — empty input auto-applies ~90-day dates; set `true` only for intentional full dumps |

### Output example

```json
{
  "recallId": 10904,
  "recallNumber": "26669",
  "recallDate": "2026-08-06",
  "title": "Play Yard and Crib Mattresses Recalled …",
  "manufacturers": [],
  "products": ["Voomf Play Yard and Crib Mattresses"],
  "hazards": ["The recalled mattresses violate the mandatory safety standard…"],
  "remedies": ["Consumers should stop using the mattresses immediately…"],
  "remedyOptions": ["Refund"],
  "retailers": ["Online at Amazon.com from January 2026 through May 2026…"],
  "importers": ["Shanghaiyuejiuyaoguojimaoyiyouxiangongsi … dba Voomf, of China"],
  "distributors": [],
  "manufacturerCountries": ["China"],
  "upc": [],
  "url": "https://www.cpsc.gov/Recalls/2026/…",
  "descriptionSnippet": "This recall involves Voomf-branded play yard mattresses…",
  "consumerContact": "Voomf by email at …",
  "lastPublishDate": "2026-08-07",
  "source": "cpsc-saferproducts-gov"
}
```

More samples: `OUTPUT.example.json`.

### Pricing

**Live Store pricing (PAY\_PER\_EVENT)** — locked Console PPE:

| Event | Price (USD) | Notes |
| --- | ---: | --- |
| Actor start (`apify-actor-start`) | **$0.00005** | One-time per run (memory-scaled per Apify; min one event) |
| Dataset item (`apify-default-dataset-item`) | **$0.0035** | Per normalized recall row — **from $3.50 / 1,000 results** |

**Example:** 100 items ≈ $0.00005 + 100 × $0.0035 ≈ **$0.35** (before Apify’s ~20% platform margin on applicable PPE).

You are charged for these events only — not for separate platform compute usage under this monetization model. Historical planning notes: [`PPE_ESTIMATE.md`](./PPE_ESTIMATE.md) (superseded by live Store prices above).

### Local development

```bash
npm install
## place input at storage/key_value_stores/default/INPUT.json
npm run dry-run
npm run test:fetch
```

Requires Node.js 18+. Uses Apify SDK v3 (`apify` package).

### Rate limits & ToS

- Public, **no API key**. Be a good citizen: descriptive User-Agent, avoid tight polling, prefer filtered queries.
- No published hard rate limit found in the public guide; this Actor still retries with backoff on **429 / 5xx**.
- Always verify critical decisions against the official recall page in `url`.

### FAQ / disclaimer

**Is this official CPSC software?** No. Not affiliated with, endorsed by, or operated by the U.S. CPSC.

**What happens if I set no filters?** The Actor auto-applies a ~90-day `recallDateStart` / `recallDateEnd` window so Store Try / first runs succeed without dumping the full catalog. Pass explicit filters for precision, or set `allowUnfiltered: true` for an intentional full dump (still capped by `maxItems`).

**Is the data complete?** Dataset items are convenience transforms of public API data and may be incomplete, delayed, or truncated (`descriptionSnippet`). **Verify every recall on the official CPSC page** before consumer, retail, or compliance action.

**Is this legal advice?** No.

**Why does `hazard` return 0 recalls?** The Actor correctly maps `hazard` → official API `Hazard`. As of 2026-09-23 probing, saferproducts.gov returns an **empty array for every `Hazard=` value tried** — including short words that appear in live `Hazards[].Name` text (`fire`, `entrapment`, `choking`, …), multi-word fragments, a verbatim `Name` string, and the Programmer’s Guide example `RecallTitle=stroller&Hazard=pinch` (115 hits without `Hazard`, 0 with it). This is **not** case-sensitivity or a missing vocab list: `Hazards[].Name` is long narrative prose, and `HazardType` / `HazardTypeID` on sampled records were empty. **Do not invent alternate query keys** (`Hazards`, `HazardName`, …) — unknown params make the API return *all* recalls. **Correct usage today:** filter with working fields (`productName`, `retailer`, `manufacturer`, `remedy`, `recallTitle`, dates, …), then substring-match the dataset’s `hazards` array client-side. The `hazard` input is retained so a future API fix works without an Actor change.

### License

MIT (Actor scaffold). Upstream recall content remains subject to CPSC / U.S. government public-information terms.

# Actor input Schema

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

Wildcard search on ProductName (official CPSC API). Example: crib, toddler, heater.

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

Wildcard search on Manufacturer (brand).

## `hazard` (type: `string`):

Maps to official API Hazard (case-insensitive wildcard per CPSC guide). NOTE (2026-09-23): upstream currently returns 0 for all tried values — including words present in Hazards\[].Name. Prefer other filters, then match the dataset hazards\[] field client-side. Kept for forward compatibility; do not invent alternate param names.

## `remedy` (type: `string`):

Wildcard search on Remedy text.

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

Wildcard search on Retailer.

## `upc` (type: `string`):

Search by product UPC (official UPC parameter).

## `recallNumber` (type: `string`):

Exact/partial RecallNumber (e.g. 26669).

## `recallTitle` (type: `string`):

Wildcard search on RecallTitle (official API parameter).

## `manufacturerCountry` (type: `string`):

Wildcard search on ManufacturerCountry.

## `importer` (type: `string`):

Wildcard search on Importer.

## `inconjunctionUrl` (type: `string`):

Official API parameter InconjunctionURL (searches joint-recall URL text). There is no InConjunctionWith free-text param on the public API.

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

RecallDateStart (YYYY-MM-DD). Inclusive lower bound.

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

RecallDateEnd (YYYY-MM-DD). Inclusive upper bound.

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

Maximum number of normalized recall records to push. Default 100. Hard-capped at 5000. The CPSC API returns the full matching set in one response; this Actor truncates client-side.

## `includeRaw` (type: `boolean`):

If true, attach the original CPSC JSON object under `raw` on each dataset item.

## `descriptionSnippetMaxLength` (type: `integer`):

Max characters for descriptionSnippet. Default 400.

## `allowUnfiltered` (type: `boolean`):

If false (default), empty input (no search filters) auto-applies a ~90-day recallDateStart / recallDateEnd window so Store Try / first runs stay bounded and successful. Set true only when you intentionally want an unfiltered full dump (still capped by maxItems).

## Actor input object example

```json
{
  "recallDateStart": "2024-01-01",
  "recallDateEnd": "2026-12-31",
  "maxItems": 50,
  "includeRaw": false,
  "descriptionSnippetMaxLength": 400,
  "allowUnfiltered": false
}
```

# Actor output Schema

## `recalls` (type: `string`):

Default dataset of normalized CPSC product recall items (recallNumber, date, title, manufacturers, products, hazards, remedies, retailers, UPC, URL, and more).

# 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 = {
    "recallDateStart": "2025-01-01",
    "recallDateEnd": "2026-12-31",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("brightish_ascent/cpsc-product-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 = {
    "recallDateStart": "2025-01-01",
    "recallDateEnd": "2026-12-31",
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("brightish_ascent/cpsc-product-recalls-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 '{
  "recallDateStart": "2025-01-01",
  "recallDateEnd": "2026-12-31",
  "maxItems": 50
}' |
apify call brightish_ascent/cpsc-product-recalls-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,brightish_ascent/cpsc-product-recalls-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/ntySfjJMpZgKd8cyf/builds/1ScpBzDWjs9hUV0Rt/openapi.json
