# FDA Recalls and Enforcement Scraper (openFDA) (`brightpath-data/openfda-recalls`) Actor

Search FDA food, drug and device recalls and enforcement reports from the official openFDA API and export clean, flat records.

- **URL**: https://apify.com/brightpath-data/openfda-recalls.md
- **Developed by:** [Nick Randall](https://apify.com/brightpath-data) (community)
- **Categories:** AI, News, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 recall records

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

## FDA Recalls and Enforcement Scraper (openFDA)

Search FDA food, drug and device recalls and enforcement reports and export clean, flat records.

Get structured recall data from the FDA's openFDA platform as JSON, CSV or Excel, or call it as a tool from Claude, Cursor, ChatGPT or any MCP client. Built on the official openFDA enforcement API, so it does not break when the website changes. Pay only for the records you receive.

### What you get

One record per recall/enforcement report with the fields people actually filter on: product type (food, drug or device), recall number, status, classification (Class I, II or III), product description, reason for recall, recalling firm, city, state and country, recall initiation date, FDA classification date, report date, termination date, event ID, distribution pattern, code/lot information, product quantity, whether the recall was voluntary or mandated, and how the firm was first notified. Dates are converted to plain YYYY-MM-DD.

Every result is a flat record with stable field names, so it drops straight into a spreadsheet, a database or an AI agent's context.

### Why use this instead of the website

- Search food, drug and device recalls in one run, with keyword, classification, status, state, firm and date filters
- Pagination handled for you, with automatic retries and polite rate limiting
- Results in JSON, CSV, Excel or via API, or piped into Zapier, Make, n8n and Google Sheets
- Works as an MCP tool, so AI agents can check for recalls on demand
- No browser, no proxies, no personal data: fast runs and a tiny cost per result
- Monitoring made easy: set "Reported after" to yesterday and schedule the Actor daily to catch new recalls

### Input

| Field | Type | Default | Meaning |
|-------|------|---------|---------|
| `productTypes` | array | food, drug, device | Which openFDA databases to search (one query per type) |
| `query` | string | | Free-text keywords searched in the product description and reason for recall |
| `classification` | array | all | Any of Class I, Class II, Class III |
| `status` | array | all | Any of Ongoing, Completed, Terminated, Pending |
| `state` | string | | Two-letter U.S. state code of the recalling firm |
| `recallingFirm` | string | | Company name |
| `reportedAfter` | date | | Only recalls reported on or after YYYY-MM-DD |
| `reportedBefore` | date | | Only recalls reported on or before YYYY-MM-DD |
| `apiKey` | string (secret) | | Optional free openFDA API key; see Limits below |
| `maxResults` | integer | 100 | Cap on reports saved, across all selected product types. You are charged per report, so this caps your cost. |

Example input:

```json
{
  "productTypes": ["food"],
  "query": "salmonella",
  "classification": ["Class I"],
  "reportedAfter": "2026-01-01",
  "maxResults": 200
}
```

### Output

Example result:

```json
{
  "productType": "food",
  "recallNumber": "F-1234-2026",
  "status": "Ongoing",
  "classification": "Class I",
  "productDescription": "Frozen Spinach, 10 oz bags",
  "reasonForRecall": "Potential Salmonella contamination",
  "recallingFirm": "Example Foods Inc.",
  "city": "Salinas",
  "state": "CA",
  "country": "United States",
  "recallInitiationDate": "2026-06-01",
  "centerClassificationDate": "2026-06-10",
  "reportDate": "2026-06-15",
  "terminationDate": null,
  "eventId": "90123",
  "distributionPattern": "Nationwide",
  "codeInfo": "Lot 12345, Best by 08/2026",
  "productQuantity": "12,000 cases",
  "voluntaryMandated": "Voluntary: Firm Initiated",
  "initialFirmNotification": "Press Release",
  "moreCodeInfo": null
}
```

Field reference: `productType`, `recallNumber`, `status`, `classification`, `productDescription`, `reasonForRecall`, `recallingFirm`, `city`, `state`, `country`, `recallInitiationDate`, `centerClassificationDate`, `reportDate`, `terminationDate`, `eventId`, `distributionPattern`, `codeInfo`, `productQuantity`, `voluntaryMandated`, `initialFirmNotification`, `moreCodeInfo`. All dates are `YYYY-MM-DD` or `null`.

### Pricing

Pay per event. You are charged **$1.50 per 1,000 records** saved to the dataset, plus a fraction of a cent per run start. Nothing is charged for results you do not receive. Set "Max total charge per run" in the run options to cap spending on any run. When a run reaches your cap it stops cleanly and keeps everything it already saved.

Rough guide: 1,000 records cost $1.50 and take about 20 seconds.

### Use it from an AI agent (MCP)

This Actor is available as an MCP tool through the Apify MCP server. Add it to your client, then ask the agent for the data in plain language.

Claude Desktop, Claude Code or Cursor (`mcp.json` / `claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com/?actors=brightpath-data/openfda-recalls",
      "headers": { "Authorization": "Bearer YOUR_APIFY_TOKEN" }
    }
  }
}
```

ChatGPT and other clients that support remote MCP servers: add `https://mcp.apify.com/?actors=brightpath-data/openfda-recalls` as a connector with your Apify token.

Example prompt once connected: "Find Class I food recalls reported this year for salmonella and list the firm, product and reason for each."

### Use it from code

```bash
curl -X POST "https://api.apify.com/v2/acts/brightpath-data~openfda-recalls/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"productTypes":["food"],"query":"salmonella","maxResults":100}'
```

Python:

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("brightpath-data/openfda-recalls").call(run_input={"productTypes": ["food"], "query": "salmonella", "maxResults": 100})
items = client.dataset(run["defaultDatasetId"]).list_items().items
```

### Limits and fair use

- Up to 25,000 records per run (openFDA's own pagination limit), across all selected product types combined.
- Without an API key, openFDA allows 1,000 requests per day per IP address, shared across everyone using this infrastructure, which can occasionally cause a run to fail on a busy day. A free key from [open.fda.gov](https://open.fda.gov/apis/authentication/) raises that to 120,000 requests per day for your key alone; paste it into the "openFDA API key" field. Both cases allow 240 requests per minute.
- A search with zero matches is not an error: openFDA returns a 404 for that case, and this Actor treats it as zero results and finishes normally.
- openFDA data can lag or differ slightly from the FDA's official recall listings; it is not itself the official FDA record.

### Data source and legal

Data comes from openFDA, the U.S. Food and Drug Administration's public API platform, through its official enforcement endpoints, which require no key for light use. The data is U.S. government public domain data. openFDA notes that its data may not be fully up to date with the FDA's official records; consult FDA.gov directly for legal or regulatory purposes. This Actor collects public, non-personal data only and does not bypass logins, paywalls or access controls. You are responsible for how you use the data.

### Support

Found a problem or need a field added? Open an issue on the Actor's Issues tab. Fixes for broken runs are prioritized.

# Actor input Schema

## `productTypes` (type: `array`):

Which openFDA enforcement databases to search. Defaults to all three (one query is made per type).

## `query` (type: `string`):

Free-text keywords searched in the product description and the reason for recall, e.g. "salmonella" or "undeclared peanut".

## `classification` (type: `array`):

Recall severity. Class I is the most serious (reasonable chance of serious harm or death). Leave empty for all.

## `status` (type: `array`):

Recall status. Leave empty for all.

## `state` (type: `string`):

Two-letter U.S. state code of the recalling firm, e.g. "CA".

## `recallingFirm` (type: `string`):

Limit to recalls by a specific company name, e.g. "Kraft Heinz".

## `reportedAfter` (type: `string`):

Only recalls reported on or after this date.

## `reportedBefore` (type: `string`):

Only recalls reported on or before this date.

## `apiKey` (type: `string`):

Without a key, openFDA allows 1,000 requests per day per IP address, shared by everyone running this Actor from the same infrastructure, which can cause failures on busy days. A free key from open.fda.gov raises that to 120,000 requests per day for your key alone. Get one at open.fda.gov/apis/authentication.

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

Maximum number of enforcement reports to save, across all selected product types. You are charged per report saved, so this also caps the cost of a run.

## Actor input object example

```json
{
  "productTypes": [
    "food",
    "drug",
    "device"
  ],
  "query": "salmonella",
  "maxResults": 100
}
```

# Actor output Schema

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

The dataset with one flat record per result. Append ?format=csv or ?format=xlsx to the URL for other formats.

## `summary` (type: `string`):

OUTPUT record in the key-value store: counts of results pushed and charged, requests, retries and duration.

# 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 = {
    "productTypes": [
        "food",
        "drug",
        "device"
    ],
    "query": "salmonella"
};

// Run the Actor and wait for it to finish
const run = await client.actor("brightpath-data/openfda-recalls").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 = {
    "productTypes": [
        "food",
        "drug",
        "device",
    ],
    "query": "salmonella",
}

# Run the Actor and wait for it to finish
run = client.actor("brightpath-data/openfda-recalls").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 '{
  "productTypes": [
    "food",
    "drug",
    "device"
  ],
  "query": "salmonella"
}' |
apify call brightpath-data/openfda-recalls --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,brightpath-data/openfda-recalls"
        }
    }
}
```

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/qaYGuAfrVDkTqjmeU/builds/TYHgPG02hzRoCIdgL/openapi.json
