# FDA & CPSC Product Recalls API: Food, Drug & Device (`optimistprime/us-product-recalls-fda-cpsc`) Actor

FDA and CPSC product recalls as clean JSON: food, drug and device enforcement plus consumer products. Hazard, class, firm, lots, UPCs. Daily monitor.

- **URL**: https://apify.com/optimistprime/us-product-recalls-fda-cpsc.md
- **Developed by:** [Derek VanLaningham](https://apify.com/optimistprime) (community)
- **Categories:** E-commerce, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 recall returneds

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

## FDA & CPSC Product Recalls API: Food, Drug & Device

**Is anything you sell recalled? Every new US recall from FDA (food, drugs, medical devices) and CPSC (consumer products) as clean JSON. Official sources, no API key, $2 per 1,000.**

One call searches four official sources: the FDA enforcement reports for **food**, **drugs** and **medical devices** (via openFDA) and the **U.S. Consumer Product Safety Commission (CPSC)** recalls database. Each recall becomes one typed row with the product, hazard, FDA class and severity, firms, lots, UPCs, remedy and dates, plus an `apiUrl` that returns that recall from the official API so you can check it.

### What you get

| field | what it is |
|---|---|
| `source` | `fda-food`, `fda-drug`, `fda-device` or `cpsc` |
| `recallId` / `eventId` | FDA recall number (e.g. `H-1339-2026`) or CPSC recall number (e.g. `26789`); FDA event ID / CPSC RecallID |
| `title` | CPSC recall title (FDA has none, so `null`) |
| `productDescription`, `productTypes`, `productNames` | the product as published |
| `reason` | FDA reason for recall or CPSC hazard |
| `hazardClass`, `severityRank` | FDA `Class I` / `II` / `III` and 1 / 2 / 3 for sorting (CPSC: `null`) |
| `status` | FDA `Ongoing` / `Completed` / `Terminated` |
| `firms` | business names as published, with role (`recalling_firm`, `manufacturer`, `importer`, `distributor`, `retailer`) |
| `soldAt` | CPSC "Sold at / Sold online at" text (where, when, price) |
| `firmCity`, `firmState`, `firmCountry` | FDA recalling firm location (city level, no street address) |
| `manufacturerCountries`, `distributionPattern`, `quantity` | where it was made / distributed and how many units |
| `codeInfo`, `upcs` | FDA lot and batch codes; CPSC UPCs |
| `remedy`, `remedyOptions`, `injuries` | CPSC remedy (Refund, Replace, Repair...) and incident summary |
| `voluntaryMandated`, `recallInitiationDate`, `classificationDate` | FDA details |
| `publishedDate` | FDA report date or CPSC recall date. The date window filters on this |
| `url`, `apiUrl` | cpsc.gov recall page; official API URL for this one recall |
| `images` | CPSC image URLs and captions (only with `includeImages`) |
| `matchedKeywords`, `isNew` | which of your keywords matched; `true` in monitor mode |
| `licence`, `fetchedAt` | attribution and fetch time |

Example rows (real):

```json
{"recordType":"recall","source":"fda-food","recallId":"H-1339-2026","eventId":"99737","title":null,
 "productDescription":"Everything Sprouts Crunchy Protein Sprout Mix, containing Alfalfa Fenugreek, Cabbage, Mung, Adzuki, Lentils, Green Pea, Net Wt. 5.0 oz (142 g) UPC 0 87906-01018 7.  everythingsprouts.com",
 "productTypes":["Food"],"productNames":[],"reason":"Sprouts may be contaminated with STEC E. coli and/or Salmonella.",
 "hazardClass":"Class I","severityRank":1,"status":"Ongoing","firms":[{"name":"Everything Sprouts, LLC","role":"recalling_firm"}],"soldAt":null,
 "firmCity":"Minneapolis","firmState":"MN","firmCountry":"United States","manufacturerCountries":[],"distributionPattern":"MN, WI",
 "quantity":"201.56 pounds","codeInfo":"Lot# 222, 223, 226, 230","upcs":[],"remedy":null,"remedyOptions":[],"injuries":null,
 "voluntaryMandated":"Voluntary: Firm initiated","recallInitiationDate":"2026-08-22","classificationDate":"2026-09-14","publishedDate":"2026-09-23",
 "url":null,"apiUrl":"https://api.fda.gov/food/enforcement.json?search=recall_number:%22H-1339-2026%22",
 "matchedKeywords":[],"isNew":false,"licence":"openFDA, public domain (CC0 1.0). Do not rely on openFDA to make decisions regarding medical care.","fetchedAt":"2026-10-04T21:20:00.000Z"}
```

```json
{"recordType":"recall","source":"cpsc","recallId":"26789","eventId":"10992",
 "title":"5Color Recalls Children’s Bicycle Helmet and Pads Sets Due to Risk of Serious Injury or Death from Head Injury; Violate Mandatory Standard for Bicycle Helmets",
 "productTypes":["Helmets & Helmet Accessories"],"productNames":["5Color Children’s Bike Helmet and Pads Sets"],
 "hazardClass":null,"severityRank":null,
 "firms":[{"name":"Hengqin Guangwei Consulting Co., Ltd., dba. 5Color, of China","role":"retailer"}],
 "soldAt":"Sold Online At: Amazon.com in May 2026 for between $25 and $26.","manufacturerCountries":["China"],"quantity":"About 324",
 "remedyOptions":["Refund"],"injuries":"None reported","publishedDate":"2026-09-24",
 "url":"https://cpsc.gov/Recalls/2026/5Color-Recalls-Childrens-Bicycle-Helmet-and-Pads-Sets-Due-to-Risk-of-Serious-Injury-or-Death-from-Head-Injury-Violate-Mandatory-Standard-for-Bicycle-Helmets",
 "apiUrl":"https://www.saferproducts.gov/RestWebServices/Recall?format=json&RecallNumber=26789"}
```

(The CPSC row is shortened here; real rows have every field.)

### Why this Actor

- **4 official sources in one call:** FDA food, drugs and medical devices plus CPSC consumer products, in one schema.
- **FDA class and severity:** filter on Class I (serious harm or death) and sort by `severityRank`.
- **Firms, lots and UPCs:** recalling firm, manufacturers, importers, retailers, lot codes and UPCs, so you can match against your catalogue.
- **Monitor mode:** schedule it daily and get only recalls you haven't seen. Recalls already returned are skipped and **not charged**.
- **Fast, time-budgeted calls for AI agents:** a default run returns 50 recalls in seconds, and `timeBudgetSeconds` (default 45) guarantees an answer.
- **Privacy-first:** no street addresses, no consumer-contact details, no adverse-event (patient) data.

### Use cases

- **Marketplace sellers (Amazon, Shopify, eBay):** check whether a product, brand or UPC you sell has been recalled.
- **Retail and buying teams:** a daily recall feed for category managers and store operations.
- **Food, pharma and medtech QA:** watch recalls by competitors and suppliers, by firm state or FDA class.
- **Insurance and legal research:** recall history by firm, product type or hazard.
- **Journalism:** spot new Class I recalls and CPSC hazards early.

### How to use

#### How to search FDA recalls (food, drug and device enforcement reports)

```json
{"sources":["fda-food"],"keywords":["listeria"],"fdaClassifications":["Class I"],"daysBack":90,"maxItems":25}
```

Add `fdaStatus` (`Ongoing`, `Completed`, `Terminated`) or `firmStates` (two-letter codes such as `CA`) to narrow it down. FDA filters are applied by openFDA itself, so even long windows need only a few requests.

#### How to get CPSC product recalls via API

```json
{"sources":["cpsc"],"keywords":["stroller","crib"],"daysBack":180,"maxItems":0}
```

The whole window is fetched in one request and keywords are matched against the title, description, hazard, product names and firm names. To match product names only (so a hazard sentence like "children can be injured" doesn't count), add `"keywordFields":["productName"]`:

```json
{"sources":["cpsc"],"keywords":["children's"],"keywordFields":["productName"],"daysBack":180,"maxItems":25}
```

#### How to set up daily recall alerts (monitor + schedule + webhook to Slack/email/Make/n8n)

1. Create a task with `{"monitorMode":true,"monitorId":"my-alerts","maxItems":500}` (add `keywords` for a watchlist). We recommend `maxItems` 500 for daily monitors so a weekly FDA report never gets cut off.
2. Schedule it daily, e.g. 08:00 ET.
3. Add a webhook on **Run succeeded** pointing to Slack, email, Make, Zapier or n8n, and read the dataset (`?view=alerts`).

**The first run catches up on the backlog.** A new `monitorId` has seen nothing yet, so its first run returns every recall in its window as new. To keep that first run small, it looks back only `firstRunDaysBack` days (default 10, so it always includes at least one weekly FDA report) unless you set `daysBack` or `fromDate` yourself (then your window is used, e.g. `"daysBack":14` to start with two weeks of recalls). Later runs use `daysBack` (default 30).

Each run returns only recalls this monitor has not returned before (`isNew: true`). The overlap is free: FDA publishes enforcement reports weekly and sometimes late, and recalls already seen are not charged. Use a different `monitorId` for each watchlist. `maxItems` caps each run: if more new recalls exist, the run says e.g. "Returned 50 of 120+ new recalls. Raise maxItems to get them all." (the `+` means at least that many), the newest are returned and the rest come in the next runs.

**Rough cost of a daily monitor (all sources, no filters, FREE plan), approximate:** about 15 new recalls/day on average (Aug 12–Sep 30, 2026: about 760 FDA enforcement entries in 8 weekly reports plus about 1.6 CPSC recalls/day), so about $0.03/day (~$1/month); the day FDA's weekly report lands can be ~100 recalls (~$0.20). Keywords or class filters cost less.

### Input reference

| field | default | notes |
|---|---|---|
| `sources` | all four | `fda-food`, `fda-drug`, `fda-device`, `cpsc` |
| `daysBack` | 30 (10 on a monitor's first run) | recalls published in the last N days (US Eastern dates). Ignored when `fromDate` is set |
| `fromDate` / `toDate` | – / today | `YYYY-MM-DD` |
| `keywords` | \[] | any word matches (case-insensitive) in description, title, reason/hazard, firm or product names |
| `keywordFields` | \[] (all fields) | limit where keywords must appear: `productName`, `title`, `description`, `reason` (reason / hazard), `firm`. FDA has no title, and its product name is the product description |
| `fdaClassifications` | \[] (all) | FDA only: `Class I`, `Class II`, `Class III`. CPSC recalls have no class and are kept |
| `fdaStatus` | \[] (all) | FDA only |
| `firmStates` | \[] (all) | FDA only, two-letter state codes of the recalling firm |
| `monitorMode` / `monitorId` | false / `default` | only recalls this monitor hasn't returned before |
| `firstRunDaysBack` | 10 | monitor mode: days back for the first run of a new `monitorId`. Ignored when `daysBack` or `fromDate` is set |
| `maxItems` | 50 | 0 = no limit. Shared fairly across sources, so one busy source can't crowd out the others |
| `timeBudgetSeconds` | 45 | 0 = no limit. On expiry you get what was found so far, with `truncated: true` |
| `descriptionMaxChars` | 1000 | 0 = full text |
| `includeImages` | false | CPSC image URLs and captions (not downloaded) |
| `openFdaApiKey` | – | optional, secret. Free key from open.fda.gov for heavy use. Never logged |

**FDA recall classes explained.** *Class I*: a reasonable probability that the product will cause serious adverse health consequences or death. *Class II*: may cause temporary or medically reversible harm, or the probability of serious harm is remote. *Class III*: not likely to cause adverse health consequences.

**FDA report date vs recall date (weekly publication lag).** The firm starts a recall (`recallInitiationDate`); FDA classifies it (`classificationDate`) and then publishes it in the weekly enforcement report (`report_date`, our `publishedDate`). That can take weeks, so the date window filters on `publishedDate`, which means "new to the public record". Use at least 7 days back, and 14 for daily monitors.

### Output reference

One row per recall (fields above). Dataset views: **Overview** and **Alerts** (adds `isNew` and `matchedKeywords`).

Each run also writes `RUN_SUMMARY` to the key-value store:

```json
{"requested":{"from":"2026-09-04","to":"2026-10-04"},"covered":{"from":"2026-09-04","to":"2026-10-04"},
 "sources":{"fda-food":{"fetched":50,"kept":50,"pushed":13,"pages":1,"complete":false},"cpsc":{"fetched":15,"kept":15,"pushed":12,"pages":1,"complete":true}},
 "truncated":false,"stopReason":"maxItems","pushed":50,"fdaRequests":3,"cpscRequests":1,"note":"..."}
```

- `stopReason`: `done`, `maxItems`, `timeBudget` or `maxCharge`. `truncated` is `true` only for `timeBudget` and `maxCharge`. Reaching `maxItems` is a complete answer to what you asked for.
- `covered`: the date range fully covered (sources are read newest first).
- If a source fails (e.g. openFDA is down), the run still succeeds with the other sources and `sources.<name>.error` says why (`QUERY_ERROR`, `FDA_API_KEY_INVALID`, `FDA_RATE_LIMITED`, `FDA_UNAVAILABLE`, `CPSC_UNAVAILABLE`). The run fails only if every source failed.

### Pricing

Pay per event, with no extra usage charges:

| event | FREE | BRONZE | SILVER | GOLD / PLATINUM / DIAMOND |
|---|---|---|---|---|
| Recall returned | $0.0020 | $0.0018 | $0.0016 | $0.0015 |
| Actor start | $0.002 | $0.002 | $0.002 | $0.002 |

That's **$2.00 per 1,000 recalls** on FREE, falling to $1.50 from GOLD up. You pay only for rows returned after your filters, and in monitor mode only for new recalls. Minimum max charge per run: $0.02.

Worked examples (FREE):

- Default run, 50 recalls: $0.002 + 50 × $0.002 = **$0.102**.
- Daily monitor across all sources (about 15 new recalls/day on average): about **$0.03/day, ~$1/month** (approximate).
- One-year backfill (about 4,000–4,500 recalls, estimated): about $8–9.

### Ready-to-run examples

Each example is a public task: open it, press **Start**, and change any input you like. Numbers are from real runs on Oct 4, 2026 (512 MB).

| example | input | result |
|---|---|---|
| [Class I FDA Food Recalls for Listeria (Last 90 Days)](https://apify.com/optimistprime/us-product-recalls-fda-cpsc/examples/fda-class-1-food-recalls-listeria) | `{"sources":["fda-food"],"keywords":["listeria"],"fdaClassifications":["Class I"],"daysBack":90,"maxItems":25}` | 24 recalls (every Class I listeria food recall in the window, e.g. Mon Sire Brie and Requeson Mexican cottage cheese) in 4.6 s, 1 FDA request, $0.050 on FREE |
| [CPSC Recalls of Children's Products (Last 180 Days)](https://apify.com/optimistprime/us-product-recalls-fda-cpsc/examples/cpsc-childrens-product-recalls) | `{"sources":["cpsc"],"keywords":["children's"],"keywordFields":["productName"],"daysBack":180,"maxItems":25}` | 15 recalls, all children's products (e.g. Victgoal Children’s Bike Helmets, Cat & Jack Children's Sandals, Wiifo Children's Tower Stools), 1 CPSC request, $0.032 on FREE |
| [Daily US Recall Alerts: FDA + CPSC Monitor](https://apify.com/optimistprime/us-product-recalls-fda-cpsc/examples/daily-us-recall-alerts-monitor) | `{"monitorMode":true,"monitorId":"daily-recalls","daysBack":14,"maxItems":50}` | first run: 50 new recalls (FDA food 15, drug 10, device 14, CPSC 11) in 6.3 s with 3 FDA + 1 CPSC requests, $0.102 on FREE. Schedule it daily: later runs return only recalls not seen before |

By default keywords match anywhere in the title, description, hazard and firm names, so "child" would also match hazard text such as "children can be injured". The children's example uses `keywordFields: ["productName"]` to match product names only.

### Use as an MCP tool

Endpoint: `https://mcp.apify.com/?tools=optimistprime/us-product-recalls-fda-cpsc`. Minimal agent call:

```json
{"sources":["fda-food"],"keywords":["listeria"],"fdaClassifications":["Class I"],"daysBack":60,"maxItems":20}
```

Rows have ISO dates, `severityRank`, `source` and `licence` for citation and `apiUrl` for verification; `RUN_SUMMARY.covered` and `truncated` tell the agent how complete the answer is. Prompts to try:

- "Any Class I food recalls for listeria this month?"
- "Were any strollers or cribs recalled in the last 90 days?"
- "List medical device recalls by Medtronic this year."

### Data sources, licence and privacy

- **FDA enforcement reports** via openFDA (`api.fda.gov`, `/food`, `/drug`, `/device/enforcement`): public domain (CC0 1.0). *Do not rely on openFDA to make decisions regarding medical care.* openFDA allows 1,000 requests a day per IP without a key; a typical run uses 3 FDA requests, retries back off and honour `Retry-After`, and you can add your own free key.
- **CPSC Recalls API** (`www.saferproducts.gov/RestWebServices/Recall`): public information.
- No other hosts are contacted and nothing is scraped from web pages.

**Data & privacy.** Data comes from FDA enforcement reports (public domain, CC0) and the CPSC Recalls API (public information). We don't output street addresses or consumer-contact details, and never touch adverse-event (patient) data. openFDA: do not rely on this data to make decisions regarding medical care. Recalls are about products and firms; firm names are passed through as published, with no enrichment. CPSC remedy text can include the firm's published recall contact email.

Not affiliated with or endorsed by the FDA or CPSC.

### FAQ

**Why is a recall from today missing?** FDA publishes enforcement reports weekly, and a recall can appear weeks after the firm announced it. CPSC usually publishes on the announcement day. Use `daysBack` ≥ 7.

**Does this include car recalls?** Not yet. NHTSA vehicle recalls are planned for v1.1.

**Can I get adverse events?** No, by design: FDA adverse-event data contains patient narratives.

**Do I need an FDA API key?** No. It's optional, for heavy use. Without a key openFDA allows 1,000 requests a day per IP, which may be shared with other users on the same cloud IP. If that limit is hit, the FDA sources report `FDA_RATE_LIMITED` (CPSC still returns) and the status tells you to add a key.

**Why are some FDA entries missing?** openFDA sometimes lists an entry as "Not Yet Classified" with no recall number (`N/A`). Those are skipped until FDA assigns a recall number and class; they then appear in a later run (or monitor run).

**How do keywords work for CPSC?** CPSC's API has no full-text search (its `Title` parameter is ignored), so the Actor fetches the whole date window in one request and matches your keywords against title, description, hazard, product and firm names.

### Changelog

See the Changelog tab. 1.0.5 (2026-10-04): new `keywordFields` input. 1.0 (2026-10-04): first release.

# Changelog

This Actor's version history is a separate document: https://apify.com/optimistprime/us-product-recalls-fda-cpsc/changelog.md

# Actor input Schema

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

Which official recall sources to search. fda-food, fda-drug and fda-device are FDA enforcement reports (weekly). cpsc is the U.S. Consumer Product Safety Commission (consumer products).

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

Leave blank for 30 days (10 on a monitor's first run).

## `fromDate` (type: `string`):

Optional start date (YYYY-MM-DD). Overrides Days back.

## `toDate` (type: `string`):

Optional end date (YYYY-MM-DD). Defaults to today.

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

Optional. Keep recalls whose product description, title, reason/hazard or firm name contains any of these words (case-insensitive), e.g. listeria, peanut, stroller, lithium battery, a brand name.

## `keywordFields` (type: `array`):

Optional. Where keywords must appear. Empty = all fields (product names, title, description, reason/hazard, firm names). For example choose only Product name to avoid matches in hazard text. FDA has no title, and its product name is the product description.

## `fdaClassifications` (type: `array`):

FDA only. Class I = reasonable probability of serious harm or death; Class II = temporary or reversible harm; Class III = unlikely to cause harm. Empty = all. CPSC recalls have no class and are kept unless you choose FDA sources only.

## `fdaStatus` (type: `array`):

FDA only. Empty = all.

## `firmStates` (type: `array`):

FDA only. Two-letter state codes of the recalling firm (e.g. CA, MN). Empty = all.

## `monitorMode` (type: `boolean`):

Return only recalls this monitor hasn't returned before. Schedule daily for alerts. Recalls already seen are skipped and not charged.

## `monitorId` (type: `string`):

Name of the monitor state (letters, digits, dashes). Use different IDs for different watchlists.

## `firstRunDaysBack` (type: `integer`):

Monitor mode only. The first run of a new Monitor ID (nothing saved yet) looks back this many days, so it doesn't pull a long backlog. Ignored when you set Days back or From date.

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

Stop after this many rows (0 = no limit). Prefilled 8 so a first try costs under $0.02.

## `timeBudgetSeconds` (type: `integer`):

Stop fetching after this many seconds and return what was found so far (truncated: true). 0 = no limit. Keeps AI-agent calls fast.

## `descriptionMaxChars` (type: `integer`):

Truncate long product descriptions to this many characters (0 = full).

## `includeImages` (type: `boolean`):

Add CPSC product image URLs and captions. Images are not downloaded.

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

Optional free key from open.fda.gov for high-volume use. Without it, openFDA allows 1,000 requests/day per IP. A typical run uses 1–3 FDA requests.

## Actor input object example

```json
{
  "sources": [
    "fda-food",
    "fda-drug",
    "fda-device",
    "cpsc"
  ],
  "keywords": [],
  "keywordFields": [],
  "fdaClassifications": [],
  "fdaStatus": [],
  "firmStates": [],
  "monitorMode": false,
  "monitorId": "default",
  "firstRunDaysBack": 10,
  "maxItems": 8,
  "timeBudgetSeconds": 45,
  "descriptionMaxChars": 1000,
  "includeImages": false
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `alerts` (type: `string`):

No description

## `allRows` (type: `string`):

No description

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

No description

# 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 = {
    "maxItems": 8
};

// Run the Actor and wait for it to finish
const run = await client.actor("optimistprime/us-product-recalls-fda-cpsc").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 = { "maxItems": 8 }

# Run the Actor and wait for it to finish
run = client.actor("optimistprime/us-product-recalls-fda-cpsc").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 '{
  "maxItems": 8
}' |
apify call optimistprime/us-product-recalls-fda-cpsc --silent --output-dataset

```

## MCP server setup

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

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/RlKtl6pwgTgELBoaM/builds/j0MHkNp4C6wP0hI1c/openapi.json
