# Product Recall Feed (US agencies) (`plainsourcedata/us-product-recalls-feed`) Actor

Unified unofficial feed of US product-safety recalls from openFDA (food, drug, device), CPSC and NHTSA. One normalised schema; filter by source, date, keyword and category; new-since-last-run mode. Organisation / product data only.

- **URL**: https://apify.com/plainsourcedata/us-product-recalls-feed.md
- **Developed by:** [Ihtisham Mian](https://apify.com/plainsourcedata) (community)
- **Categories:** Business, News, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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.
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

## Product Recall Feed (US agencies) — unofficial

**One normalised feed of US product-safety recalls** from three official government sources: **openFDA** (FDA food, drug and device enforcement reports), the **CPSC** Recalls API, and **NHTSA** vehicle/equipment recall data. Each recall is one flat row: agency, recall id, date, product, hazard/reason, classification, recalling organisation, distribution area, status, remedy and an official URL where available.

This actor is **unofficial and independent**. It is not affiliated with, endorsed by, or operated by the FDA, CPSC, NHTSA or the U.S. Department of Transportation.

### What you get

| Field | Meaning |
|---|---|
| `source`, `sourceLabel`, `agency`, `jurisdiction`, `category` | Where the row came from (`fdaFood` / `fdaDrug` / `fdaDevice` / `cpsc` / `nhtsa`) |
| `recallId`, `rawSourceId`, `recallDate` | Stable id and report / recall date |
| `product`, `hazard`, `classification`, `remedy` | What was recalled and why |
| `company` | Recalling firm or manufacturer (**organisations only**) |
| `distributionArea`, `status`, `url` | Where it shipped, status, link to the official notice when the source provides one |
| `attribution` | Short source acknowledgement to keep if you republish |

Organisation / product data only: consumer contact lines, e-mails and phone numbers are stripped; CPSC `ConsumerContact` is never stored.

### How to run it

1. Leave **Sources** at the default (all five) or pick the agencies you care about.
2. Optionally set a **keyword** (e.g. `allergen`, `airbag`, `battery`) and a date window (default: last 7 days).
3. Click **Start**. A default daily-sized run finishes in well under 5 minutes.
4. For alerts, schedule the actor with **Only new since last run** and a distinct **state key**.

#### Sample input (daily check)

```json
{
  "sources": ["fdaFood", "fdaDrug", "fdaDevice", "cpsc", "nhtsa"],
  "maxResults": 100,
  "onlyNew": true,
  "stateKey": "daily-us"
}
```

### Data sources, licences and attribution

Keep the `attribution` field (or an equivalent credit) if you republish rows.

| Source | Access | Licence / terms (verified for this build) |
|---|---|---|
| openFDA food / drug / device enforcement | `api.fda.gov` (API key optional) | Content is public domain / [CC0 1.0](https://open.fda.gov/terms/) unless a record says otherwise. Not FDA-endorsed. |
| CPSC recalls | SaferProducts Recalls API (no key) | Published for businesses and developers; posted recall information may be distributed or copied; personally identifiable information is excluded. See [CPSC Recalls API](https://www.cpsc.gov/Recalls/CPSC-Recalls-Application-Program-Interface-API-Information). |
| NHTSA recalls | Flat file `FLAT_RCL_POST_2010.zip` on `static.nhtsa.gov` (campaign-level) | U.S. government work; developer use encouraged via [NHTSA datasets and APIs](https://www.nhtsa.gov/nhtsa-datasets-and-apis). |

Rate limits: openFDA allows about 240 requests/minute without a key (higher with a free key). This actor paces requests and honours `Retry-After`. NHTSA uses one flat-file download per run that includes that source.

### Privacy

- No consumer names, e-mails, phone numbers or CPSC `ConsumerContact` fields.
- Free-text fields run through e-mail/phone redaction and honorific+personal-name scrubbing.
- Recalling firms that look like an individual name without an organisation marker are replaced with `[individual / name withheld]`.

### Disclaimer

Data may be incomplete, delayed or wrong relative to the agencies' own websites. Always confirm critical decisions against the official notice linked in `url` (or on the agency site). This tool is for monitoring and research, not legal or regulatory advice.

### Changelog

- **0.1** — Initial private release: FDA food/drug/device, CPSC, NHTSA; normalised schema; only-new mode.

# Actor input Schema

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

Which official US sources to query. Default: all five.

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

Default: 7 days before 'To date'. Ignored in 'new since last run' mode after the first run (uses last run date).

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

Default: today (UTC).

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

Optional case-insensitive match against product, hazard, company and related text (e.g. allergen, airbag, battery).

## `category` (type: `string`):

Optional. Limits sources to one product category.

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

Maximum recalls returned (newest first). Default 100; a typical daily window finishes in well under 5 minutes.

## `fastMode` (type: `boolean`):

Caps results at 20 and uses a shorter wait budget. Useful for AI agents and smoke tests.

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

Skip recalls already returned under the same state key. Use with a schedule for daily alerts.

## `stateKey` (type: `string`):

Namespace for 'only new' memory (e.g. food-daily). Default: default.

## `openFdaApiKey` (type: `string`):

Optional. Raises openFDA rate limits (240/min without a key; higher with a free key from open.fda.gov). Stored as input — prefer Actor secrets in production.

## `waitBudgetSeconds` (type: `integer`):

Advanced. Max seconds spent waiting on 429/5xx before giving up on a source. Default 90 (45 in fast mode).

## Actor input object example

```json
{
  "sources": [
    "fdaFood",
    "fdaDrug",
    "fdaDevice",
    "cpsc",
    "nhtsa"
  ],
  "maxResults": 100,
  "fastMode": false,
  "onlyNew": false,
  "stateKey": "default"
}
```

# Actor output Schema

## `results` (type: `string`):

One item per recall, normalised across FDA / CPSC / NHTSA.

## `runSummary` (type: `string`):

JSON summary of the run (counts, date window, per-source totals).

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

// Run the Actor and wait for it to finish
const run = await client.actor("plainsourcedata/us-product-recalls-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 = {
    "maxResults": 100,
    "stateKey": "default",
}

# Run the Actor and wait for it to finish
run = client.actor("plainsourcedata/us-product-recalls-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 '{
  "maxResults": 100,
  "stateKey": "default"
}' |
apify call plainsourcedata/us-product-recalls-feed --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,plainsourcedata/us-product-recalls-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/wcthbaZkiZFKttdFf/builds/UFZI3pTl34Qq439eA/openapi.json
