# CPSC Product Recalls Feed: Hazards, UPCs, Remedies (`thoob/cpsc-product-recall-feed`) Actor

Lists US product recalls from the public CPSC Recalls API for a date window, with optional product name filter. Returns products, UPCs, hazards, remedies, companies, countries, injuries and the cpsc.gov recall page. No key needed. Billed only per delivered recall row.

- **URL**: https://apify.com/thoob/cpsc-product-recall-feed.md
- **Developed by:** [Pono Data](https://apify.com/thoob) (community)
- **Categories:** News, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.75 / 1,000 product recalls

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Feed: Hazards, UPCs, Remedies

This actor lists US consumer product recalls from the public CPSC Recalls REST API for a date window, one row per recall. It is for retailers, marketplaces, safety and compliance teams and researchers who need recalls with products, UPCs, hazards and remedies as structured data.

### What you get

- Recall: `recallId`, `recallNumber`, `recallDate`, `lastPublishDate`, `title`, `description`, `consumerContact`
- Products: `products` (name, model, type, numberOfUnits as text), `productUpcs`
- Companies: `manufacturers`, `retailers`, `importers`, `distributors`, `manufacturerCountries`
- Risk and fix: `hazards`, `remedies`, `remedyOptions`, `injuries`, `imageUrls`
- `changeType`, `sourceUrl` (the cpsc.gov recall page), `retrievedAt`

### Input

```json
{"daysBack": 60, "onlyNew": false, "maxRecords": 20}
```

- `daysBack` (default 30): the window ends today UTC.
- `since`, `until` (YYYY-MM-DD): a fixed window replacing `daysBack`. A future `until` is clamped to today.
- `productName`: sent to the API as `ProductName`.
- `onlyNew`: deliver only recalls unseen in earlier runs or republished with a new `lastPublishDate`; `changeType` is then `new` or `updated`.
- `maxRecords`: cap on billed rows, 0 means no cap.

### Output

Illustration only, values may differ:

```json
{
  "recallId": 10123,
  "recallNumber": "25123",
  "recallDate": "2025-03-06",
  "lastPublishDate": "2025-03-06",
  "title": "Example Space Heaters Recalled Due to Fire Hazard",
  "description": "This recall involves ...",
  "consumerContact": "Example Co. toll-free at 800-555-0100",
  "products": [{"name": "Space Heater", "model": "EH-100", "type": "Heaters", "numberOfUnits": "About 12,000"}],
  "manufacturers": [],
  "retailers": ["Example Stores"],
  "importers": ["Example Co., of Chicago, Illinois"],
  "distributors": [],
  "manufacturerCountries": ["China"],
  "productUpcs": ["012345678905"],
  "hazards": [{"description": "The heater can overheat, posing a fire hazard.", "hazardType": null}],
  "remedies": ["Refund"],
  "remedyOptions": ["Refund"],
  "injuries": ["None reported"],
  "imageUrls": ["https://www.cpsc.gov/s3fs-public/example.jpg"],
  "changeType": null,
  "sourceUrl": "https://www.cpsc.gov/Recalls/2025/example",
  "retrievedAt": "2025-03-07T12:00:00Z"
}
```

### Who uses it

- Retailers and marketplaces who match `productUpcs` against their catalog to pull recalled items.
- Product safety teams who review `hazards`, `injuries` and `remedies` in their category.
- Insurers and lawyers who track recalls by `manufacturers` and `manufacturerCountries`.
- Consumer news writers who use `title`, `imageUrls` and `sourceUrl` in recall coverage.

### Pricing

Pay per event `recall-record`: USD 2.50 per 1,000 delivered recall rows. Only delivered recall rows are charged; every other row is free. Recalls skipped by `onlyNew` are not delivered and cost nothing.

### Limits

- One request per 31-day slice, newest first, at least 500 ms apart.
- Dates are copied as given (midnight, no time zone).
- Text is copied as given, including text the source truncated.
- If a request fails after retries, the run stops and keeps rows already delivered.
- `onlyNew` remembers the newest 20,000 recalls.

### FAQ

#### Is any input required?

No. `daysBack`, or `since` and `until`, set the date window. `productName` narrows the results to matching products.

#### What does an empty result mean?

No recall matched the date window and product filter. With `onlyNew` on, it can also mean nothing is new or updated since earlier runs. Unchanged recalls are not billed.

#### Why are some fields empty?

Fields such as `productUpcs`, `retailers` or `injuries` stay empty when the CPSC record does not list them.

#### Can it run on a schedule or through the API?

Yes, through Apify Schedules or the Apify API. `onlyNew` suits repeat runs, and `changeType` marks each delivered row.

### Compliance

- Public sources only: the CPSC Recalls REST API on saferproducts.gov.
- Only the documented public endpoint is called, so there is no page scraping.
- No key, login or proxy.
- Requests carry an honest User-Agent: `PonoDataActors/1.0 (+https://ponodata.com)`.

# Actor input Schema

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

Window length in days. The window ends today (UTC) and starts N-1 days earlier. Ignored when Since is set.

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

First recall date, YYYY-MM-DD. When set, Since and Until replace Days back.

## `until` (type: `string`):

Last recall date, YYYY-MM-DD. Defaults to today UTC; a future date is clamped to today. Ignored without Since.

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

Optional text sent to the API as ProductName. Empty means no filter.

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

Deliver a recall only if it was not seen in earlier runs or its LastPublishDate changed. State is kept in the key-value store cpsc-product-recall-feed-seen.

## `maxRecords` (type: `integer`):

Cap on delivered, billed recall rows. 0 means no cap. The platform spend cap is honored regardless.

## Actor input object example

```json
{
  "daysBack": 60,
  "onlyNew": false,
  "maxRecords": 20
}
```

# Actor output Schema

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

One row per delivered recall.

# 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": 60,
    "onlyNew": false,
    "maxRecords": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("thoob/cpsc-product-recall-feed").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": 60,
    "onlyNew": False,
    "maxRecords": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("thoob/cpsc-product-recall-feed").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 '{
  "daysBack": 60,
  "onlyNew": false,
  "maxRecords": 20
}' |
apify call thoob/cpsc-product-recall-feed --silent --output-dataset

```

## MCP server setup

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

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/tBxzYB6OvfgA85MIO/builds/wiYJhVKEm6jWXccfD/openapi.json
