# CPSC Product Recalls Scraper — SaferProducts.gov Export (`devilscrapes/cpsc-product-recalls-scraper`) Actor

Export US Consumer Product Safety Commission (CPSC) recall records via the public, keyless SaferProducts.gov REST service — products, hazards, remedies, retailers, injuries and images — as clean flattened JSON rows for any bounded date window.

- **URL**: https://apify.com/devilscrapes/cpsc-product-recalls-scraper.md
- **Developed by:** [DevilScrapes](https://apify.com/devilscrapes) (community)
- **Categories:** Other, Lead generation
- **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/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

<div align="center">
  <img src=".actor/icon.svg" width="160" alt="Devil Scrapes mark" />

## CPSC Product Recalls Scraper — SaferProducts.gov Export

**💰 $4.20 / 1 000 results**  ·  pay only for results  ·  no credit card to try

*We do the dirty work so your dataset stays clean.* 😈

Export US Consumer Product Safety Commission (CPSC) recall records via the public, keyless SaferProducts.gov REST service — products, hazards, remedies, retailers, injuries and images — as clean flattened JSON rows for any bounded date window.

</div>

***

### 🎯 What this scrapes

CPSC's SaferProducts.gov service publishes every US consumer product recall as a raw, deeply nested JSON payload — hazards, remedies, retailers, manufacturers and images all buried in their own arrays. This Actor pulls a bounded date window and flattens every nested field into one clean row, so a compliance watchlist or marketplace safety check becomes a spreadsheet instead of a parsing project. Different regulator and wire format than our FDA drug/food/device Actor — not a duplicate.

### 🔥 What we handle for you

- 📅 **Bounded date windows, always** — both dates are required and capped at 31 days, so a run never balloons into a full-corpus pull.
- 🧹 **Every nested array flattened** — hazards, remedies, retailers, manufacturers and images all land as clean comma-joined strings, never raw JSON blobs.
- 🔁 **Retries with exponential backoff** on `408 / 429 / 5xx` — up to 5 attempts, `Retry-After` honoured.
- 🫠 **One bad record never fails the run** — a malformed recall is logged and skipped, the rest of the window still ships.
- 🧊 **Clean, typed dataset rows** — Pydantic-validated, stable IDs, JSON / CSV / Excel export straight from the Apify Console.
- 💰 **Pay-Per-Event pricing** — you only pay for rows that hit your dataset, plus one small warm-up charge per run.

### 💡 Use cases

- Screen marketplace listings against active recalls before they ship.
- Feed a compliance watchlist with weekly CPSC recall windows.
- Back an insurer's product-liability risk model with structured recall history.
- Give consumer-safety researchers clean rows instead of CPSC's nested JSON.

### ⚙️ How to use it

1. Click **Try for free** at the top of the page.
2. Fill in the input form — most fields have sensible defaults.
3. Click **Start**. Output streams into the run's dataset.
4. Export from **Storage → Dataset** as JSON, CSV, or Excel — or fetch via the API.

### 📥 Input

| Field | Type | Required | Default | Notes |
|---|---|:--:|---|---|
| `recallDateStart` | `string` | **yes** | '2026-08-14' | Start of the recall-date window, inclusive, as <code>YYYY-MM-DD</code>. Required — this Actor never runs an unbounded… |
| `recallDateEnd` | `string` | **yes** | '2026-08-21' | End of the recall-date window, inclusive, as <code>YYYY-MM-DD</code>. Must be on or after the start date and within 31… |
| `maxResults` | `integer` | no | 25 | Stop after this many records. Each record is one billed <code>result-row</code> event. The date window, not this… |
| `proxyConfiguration` | `object` | no | {'useApifyProxy': False} | SaferProducts.gov is a public government API with no anti-bot surface and needs no proxy. Leave this off unless your… |

#### Example input

```json
{
  "recallDateStart": "2026-08-14",
  "recallDateEnd": "2026-08-21",
  "maxResults": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

### 📤 Output

Every row is one dataset item.

| Field | Type | Notes |
|---|---|---|
| `recall_id` | `integer` | CPSC internal recall identifier (`RecallID`). |
| `recall_number` | `string` | Public CPSC recall number. |
| `recall_date` | `string` | Date CPSC announced the recall (`YYYY-MM-DD`). |
| `last_publish_date` | `string` | Date the recall record was last published or amended. |
| `title` | `string` | Recall headline / title. |
| `description` | `string` | Full recall description text. |
| `url` | `string` | Link to the recall's page on cpsc.gov. |
| `consumer_contact` | `string` | Remedy contact info for affected consumers. |
| `products` | `string` | Recalled product name(s), comma-joined. |
| `product_units` | `string` | Number of units sold, as published. |
| `hazards` | `string` | Hazard type(s), comma-joined. |
| `remedies` | `string` | Remedy action(s) offered to consumers, comma-joined. |
| `remedy_options` | `string` | Remedy option label(s), comma-joined. |
| `injuries` | `string` | Reported injury type(s), comma-joined. |
| `retailers` | `string` | Retailer name(s) that sold the product, comma-joined. |
| `manufacturers` | `string` | Manufacturer name(s), comma-joined. |
| `importers` | `string` | Importer name(s), comma-joined. |
| `distributors` | `string` | Distributor name(s), comma-joined. |
| `manufacturer_countries` | `string` | Country/countries of manufacture, comma-joined. |
| `sold_at_label` | `string` | Free-text "sold at" label, when CPSC published one. |
| `image_urls` | `string` | Recall image URL(s), comma-joined. |

#### Example output

```json
{
  "recall_id": 10937,
  "recall_number": "26716",
  "recall_date": "2026-08-20",
  "last_publish_date": "2026-08-20",
  "title": "CCM Hockey U.S. Recalls FMHVR Hybrid Visors Due to Impact Injury Hazard",
  "description": "The recalled visors can crack or shatter on impact...",
  "url": "https://www.cpsc.gov/Recalls/2026/...",
  "consumer_contact": "CCM Hockey U.S. toll-free at 855-333-2662",
  "products": "FMHVR Hybrid Visor",
  "product_units": "About 12,957",
  "hazards": "Impact injury hazard",
  "remedies": "Consumers should stop using the recalled visors immediately",
  "remedy_options": "Replace",
  "injuries": "None reported",
  "retailers": "Hockey specialty stores nationwide, Oct 2025-Jul 2026, $80-$150",
  "manufacturers": "",
  "importers": "CCM Hockey U.S.",
  "distributors": "",
  "manufacturer_countries": "China",
  "sold_at_label": null,
  "image_urls": "https://www.cpsc.gov/s3fs-public/CCM-1.gif"
}
```

### 💰 Pricing

Pay-Per-Event — you pay only when these events fire:

| Event | USD | What it is |
|---|---:|---|
| `actor-start` | $0.2 | One-off warm-up charge per run |
| `result-row` | $0.004 | Per unique dataset item |

Example: 1 000 results at the rates above ≈ **$4.20**. No subscription, no minimum, no card to start — Apify gives every new account $5 of free credit.

### 🚧 Limitations

- The date window is capped at 31 days per run — this is a deliberate egress guard, not a CPSC limit; chain successive windows for a longer backfill.
- Some free-text fields (e.g. retailer names) embed date ranges or prices as CPSC published them — passed through as-is, no regex extraction.
- Covers CPSC's `Recall` resource only — the separate CPSRMS incident-report dataset is out of scope.

### ❓ FAQ

**Do I need an API key?**

No. SaferProducts.gov serves this data keylessly — no auth, no API key, no login.

**Why are both dates required?**

An open-ended query silently returns a full calendar year of recalls. Requiring both bounds keeps every run small and predictable — the window, not <code>maxResults</code>, controls how much data is fetched.

**How far back can one run go?**

Up to 31 days per run. For a longer history, run the Actor again with the next window — recall data is immutable, so results never change once published.

### 💬 Your feedback

Spotted a bug, hit a weird edge case, or need a new field? Open an
issue on the Actor's **Issues** tab on Apify Console — we ship
fixes weekly and we read every report.

***

<div align="center">

Built by **[Devil Scrapes](https://apify.com/DevilScrapes)** 😈 — a small fleet of
opinionated public-data Actors. Honest pricing, real engineering, zero fine print.

</div>

# Actor input Schema

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

Start of the recall-date window, inclusive, as <code>YYYY-MM-DD</code>. Required — this Actor never runs an unbounded query.

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

End of the recall-date window, inclusive, as <code>YYYY-MM-DD</code>. Must be on or after the start date and within 31 days of it.

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

Stop after this many records. Each record is one billed <code>result-row</code> event. The date window, not this number, controls how much CPSC data is fetched.

## `proxyConfiguration` (type: `object`):

SaferProducts.gov is a public government API with no anti-bot surface and needs no proxy. Leave this off unless your account requires egress through Apify Proxy.

## Actor input object example

```json
{
  "recallDateStart": "2026-08-14",
  "recallDateEnd": "2026-08-21",
  "maxResults": 25,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All dataset items as JSON.

## `datasetItemsCsv` (type: `string`):

Same data exported to CSV.

## `datasetView` (type: `string`):

Open the run dataset in the Console.

# 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": "2026-08-14",
    "recallDateEnd": "2026-08-21",
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devilscrapes/cpsc-product-recalls-scraper").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": "2026-08-14",
    "recallDateEnd": "2026-08-21",
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("devilscrapes/cpsc-product-recalls-scraper").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": "2026-08-14",
  "recallDateEnd": "2026-08-21",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call devilscrapes/cpsc-product-recalls-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devilscrapes/cpsc-product-recalls-scraper"
        }
    }
}

```

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/dbRFkiP6f5Auh08FA/builds/6kcfUbd5HG4L09SJ8/openapi.json
