# openFDA Scraper | FDA Recalls, Drug & Device Records (`genial_candlestand/openfda-recalls-scraper`) Actor

Get FDA recalls (recall number, hazard class, status, recalling firm, reason) for food, drugs and devices, plus drug labels, adverse events, 510(k) clearances, approvals, NDC and shortages. Filters by class, state, firm, date. No API key.

- **URL**: https://apify.com/genial_candlestand/openfda-recalls-scraper.md
- **Developed by:** [Flowo](https://apify.com/genial_candlestand) (community)
- **Categories:** Other, 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.89 / 1,000 fda records

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

## openFDA Scraper | FDA Recalls, Drug & Device Records

![openFDA Scraper | FDA Recalls, Drug & Device Records](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/fda-gov-public-records-search-banner-3e62958d.png)

Search FDA recalls and public openFDA records in one run. Each row has the recall number, hazard class (Class I, II or III), recall status, the recalling firm and the reason for the recall, plus dates and a link to the record. The same actor also returns drug labels, drug and device adverse events, 510(k) clearances, Drugs@FDA approvals, NDC products and drug shortages.

### What does openFDA Scraper do?

The actor queries the official openFDA API (api.fda.gov) and saves flat, spreadsheet-ready rows with ISO dates. You choose one or more of 11 datasets, add search terms and optional filters, and get one dataset with every record labelled by its source dataset. It is built for food-safety and quality teams, pharma regulatory and pharmacovigilance analysts, med-tech teams and anyone who monitors supplier recalls. No login or API key is needed.

Datasets: food recalls, drug recalls and device recalls (FDA Enforcement Reports), device recall details (CDRH: root cause and the firm's action), drug labels, drug adverse events (FAERS), device adverse events (MAUDE), device 510(k) clearances, drug approvals (Drugs@FDA), the NDC directory and drug shortages.

### How to scrape FDA recalls and openFDA records

![How openFDA Scraper works: Builds an openFDA search from your terms, dates and filters; Requests each dataset from api.fda.gov, newest first; Pages through results, following the cursor past 25,000; R](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/fda-gov-public-records-search-how-0b2bc869.png)

1. Open the actor in Apify Console and go to **Input**.
2. Pick the **FDA datasets** to search. The default is food, drug and device recalls.
3. Add **Search terms**, one per line (for example `listeria`, `metformin`, `pacemaker`). Leave empty to get the newest records that match your filters.
4. Optionally set a date range, recall class, recall status, the firm's US state or the recalling firm's name.
5. Set **Max records per dataset and search term** and click **Start**.
6. Download the results as JSON, CSV, Excel or HTML from the **Output** tab, or read them through the API.

### How much does it cost to scrape FDA records?

Price per event by Apify plan:

| Event | Free | Bronze | Silver | Gold and above |
|---|---|---|---|---|
| FDA record | $2.70 per 1,000 | $2.43 per 1,000 | $2.16 per 1,000 | $1.89 per 1,000 |
| Run start | $0.00005 | $0.00005 | $0.00005 | $0.00005 |

A test run with the API example input below returned 30 rows in 27 s.

You pay per saved record (the `fda-record` event) plus a very small run-start fee. Searches with no matches are free. A record found again by a later search term in the same dataset is saved and charged only once. The record price is $0.0027, which is $2.70 per 1,000 records.

| Scenario | Records | Cost on the Free plan |
|---|---|---|
| Newest Class I recalls of one month | 100 | about $0.27 |
| Default run with empty input (100 newest of each recall dataset) | 300 | about $0.81 |
| One drug's labels, adverse events and recalls | 1,000 | about $2.70 |
| Medtronic 510(k) clearances since 2024, large pull | 10,000 | about $27 |

The run-start fee ($0.00005 per GB of memory) is negligible and already included in these round figures.

### Input

![openFDA Scraper input example: FDA datasets, Max records per dataset and search term, Records per request](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/fda-gov-public-records-search-input-5443d988.png)

No field is required. Main fields:

- `datasets` — which FDA datasets to search (several per run).
- `queries` — search terms; free text or openFDA syntax such as `openfda.brand_name:"tylenol"`. Several words mean OR; put phrases and hyphenated values in double quotes.
- `dateFrom`, `dateTo` — inclusive date range on each dataset's main date (recall report date, label effective date, adverse event received date, 510(k) decision date and so on).
- `classifications`, `recallStatus`, `states`, `recallingFirm` — recall filters.
- `maxItemsPerQuery`, `maxItems`, `pageSize` — limits.
- `proxyConfiguration` — spreads openFDA's per-IP daily quota; on by default.

```json
{
  "datasets": ["foodRecalls", "drugRecalls"],
  "classifications": ["Class I"],
  "recallStatus": ["Ongoing"],
  "states": ["CA"],
  "dateFrom": "2026-01-01",
  "maxItemsPerQuery": 100
}
```

### What data can you extract from openFDA?

![openFDA Scraper output example: Dataset, Published At, Title, Status, Classification](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/fda-gov-public-records-search-output-4858ffff.png)

Every row has `dataset`, `id`, `url`, `title`, `publishedAt` and `scrapedAt`. Other fields depend on the dataset; a field that is empty at the source is `null`.

| Field | Description |
|---|---|
| `recallNumber`, `eventId` | FDA recall number and the event grouping all products of one recall |
| `classification`, `status` | Hazard class and recall status (or drug shortage status) |
| `productDescription`, `reasonForRecall` | The recalled product and why it was recalled |
| `recallingFirm`, `city`, `state` | The company and where it is located |
| `recallInitiationDate`, `reportDate`, `terminationDate` | Recall dates, as YYYY-MM-DD |
| `rootCauseDescription`, `action` | Device recall details: root cause and the firm's action |
| `brandName`, `genericName`, `productNdc` | Drug names and NDC codes (labels, NDC, approvals, drug recalls) |
| `reactions`, `seriousOutcomes` | Drug adverse events: reported reactions and serious outcomes |
| `applicant`, `decisionDate`, `deviceName` | Device 510(k) clearances |
| `totalMatches`, `query` | Number of records openFDA has for the search, and the term that found the row |

Example row (shortened):

```json
{
  "dataset": "foodRecalls",
  "id": "H-0130-2027",
  "url": "https://api.fda.gov/food/enforcement.json?search=recall_number%3A%22H-0130-2027%22",
  "title": "Jovy Gummy Worms Neon; packaged in 1lb plastic units. UPC 712199083411",
  "publishedAt": "2026-10-28",
  "recallNumber": "H-0130-2027",
  "status": "Ongoing",
  "classification": "Class II",
  "reasonForRecall": "undeclared allergen ingredient (Red#40, Yellow#5, Yellow#6, Blue#1)",
  "recallingFirm": "El Ruisenor De Mexico, Inc.",
  "city": "Vernon",
  "state": "CA",
  "recallInitiationDate": "2026-08-24",
  "reportDate": "2026-10-28",
  "terminationDate": null,
  "totalMatches": 29586,
  "scrapedAt": "2026-11-04T12:45:23.299Z"
}
```

### Use cases

- **Recall monitoring:** new Class I food and drug recalls this month, newest first.
- **Hazard search across product types:** everything recalled for listeria or salmonella since 2025, in food, drug and device recalls.
- **Supplier watch:** ongoing recalls by a named firm, or by firms in one US state.
- **Drug safety profile:** label, adverse events, recalls, approvals, NDC listings and shortages for one drug in a single run.
- **Med-tech intelligence:** a competitor's 510(k) clearances and MAUDE adverse event reports for a device type.

### Limitations

- The data is what openFDA publishes; the actor adds no risk scores or interpretation.
- Recall filters (class, status, state, firm) work only with recall datasets; class works only with food, drug and device recalls. Combining them with other datasets stops the run with an input error before any request.
- Date filters are not available for drug shortages. Drug approvals are filtered by any submission action date and are not sorted.
- A search term that uses a field the dataset does not have returns no rows for that dataset and logs a warning.
- Texts longer than 20,000 characters are cut. Device recall datasets are fetched at most 25 records per request because single records can be megabytes long.
- Some fields (for example `recallNumber` for very new recalls, `state`, `postalCode`) can be `null`.
- openFDA allows about 1,000 keyless requests a day per IP; very large runs may end partially, keeping the rows already saved.
- The same device recall can appear once in device recalls and once in device recall details.

### Tips and troubleshooting

- Zero rows means openFDA found no match. Check the log: it names the dataset and term, and whether a field name does not exist in that dataset.
- Quote phrases and hyphenated values (`"F-0276-2017"`, `"peanut butter"`); unquoted they are matched as OR and give broad results.
- For a drug across datasets, use field syntax that exists in each dataset, or a plain word such as `metformin`.
- Beyond 25,000 records per search the actor follows the openFDA cursor; if openFDA gives none it stops with a warning. Narrow the search by date.
- Keep the proxy on for larger runs. Lower `pageSize` only if requests time out.
- To fetch only new records, set `dateFrom` to your last run date.

### API, MCP and integrations

Run the actor from your code with the same JSON input as in Console. Your API token is in [Console → Settings → API & Integrations](https://console.apify.com/settings/integrations).

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("genial_candlestand/openfda-recalls-scraper").call(run_input={"maxItemsPerQuery": 10})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

**Node.js** (`npm install apify-client`):

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('genial_candlestand/openfda-recalls-scraper').call({"maxItemsPerQuery": 10});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**HTTP** — one request runs the actor and returns the results (runs up to 5 minutes; longer ones: [run asynchronously](https://docs.apify.com/api/v2/act-runs-post)):

```bash
curl -X POST "https://api.apify.com/v2/acts/genial_candlestand~openfda-recalls-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"maxItemsPerQuery":10}'
```

**AI agents (MCP).** Add the actor as a tool of the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp). Claude Code:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=genial_candlestand/openfda-recalls-scraper"
```

Claude Desktop, Cursor or VS Code: `{"mcpServers": {"apify": {"url": "https://mcp.apify.com?tools=genial_candlestand/openfda-recalls-scraper"}}}`. Then ask, for example:

- "Get new Class I food and drug recalls since 2026-10-01"
- "List ongoing recalls by firms in CA"
- "Get Medtronic 510(k) clearances since 2024"

**Integrations.** Run it on a schedule with [Apify Schedules](https://docs.apify.com/platform/schedules) and send the results to Google Sheets, Slack, Zapier, Make, n8n or your webhook — see [Apify integrations](https://docs.apify.com/platform/integrations).

### FAQ

**Is it legal to scrape FDA data?**<br>
The data comes from the official openFDA API, which FDA publishes for public use. You are responsible for how you use it. Adverse event reports are as FDA publishes them.

**Do I need an openFDA API key?**<br>
No. The actor works without one and uses the proxy to stay within the keyless per-IP quota.

**Can I search several datasets and several terms in one run?**<br>
Yes. Each term runs on every selected dataset, and each row carries its `dataset` and `query`.

**How is it different from other openFDA actors?**<br>
It returns food, drug and device recalls plus CDRH device recall details and seven other record datasets in one run, with typed filters, cursor paging past 25,000 records, and a flat output. It charges $2.70 per 1,000 records with no per-request event.

### Also useful

- [SEC EDGAR Filings Search](https://apify.com/genial_candlestand/sec-edgar-filings-search) — find US regulatory filings of the companies behind recalls
- [Google News Scraper](https://apify.com/genial_candlestand/google-news-articles-search-scraper) — follow news coverage of a recall or a recalling firm
- [Trustpilot Reviews Scraper](https://apify.com/genial_candlestand/trustpilot-reviews-scraper) — read customer ratings and company replies for a recalling brand

# Actor input Schema

## `datasets` (type: `array`):

Which FDA datasets to search; several per run, each row is labelled with its dataset. Default: food, drug and device recalls. Recall filters work only with recall datasets; dates work with every dataset except drug shortages.

## `queries` (type: `array`):

One search per line, run on every selected dataset (e.g. listeria, metformin, pacemaker). Several words mean OR; put phrases and hyphenated values in double quotes. openFDA field syntax also works, e.g. openfda.brand_name:"tylenol". Empty = all records matching the filters, newest first.

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

Only records dated on or after this day (YYYY-MM-DD). The date is the recall report date for recalls, the posting date for device recall details, the label effective date, the date FDA received an adverse event, the 510(k) decision date, the NDC marketing start date, or any submission action date for drug approvals. Not available for drug shortages.

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

Only records dated on or before this day (YYYY-MM-DD), same date per dataset as From date. Must not be earlier than From date. Not available for drug shortages.

## `classifications` (type: `array`):

Only recalls of these FDA hazard classes: Class I = may cause serious harm or death, Class II = temporary or reversible harm, Class III = unlikely to cause harm. Works with food, drug and device recalls (Enforcement Reports) only, not with device recall details or other datasets.

## `recallStatus` (type: `array`):

Only recalls in these states: Ongoing (still open), Completed, Terminated (closed by FDA). Works with the four recall datasets only.

## `states` (type: `array`):

Only recalls by firms located in these US states, two-letter codes (CA, NY, TX). This is where the firm is, not where the product was distributed. Works with the four recall datasets only.

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

Only recalls by firms whose name contains this word or phrase, e.g. Pfizer or Kraft Heinz. Works with the four recall datasets only.

## `maxItemsPerQuery` (type: `integer`):

Stop each dataset × search term after this many records (newest first). Up to 25,000 per search are reachable directly; beyond that the actor follows the openFDA cursor.

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

Stop the whole run after this many records across all datasets and search terms. Empty = no total limit.

## `pageSize` (type: `integer`):

How many records to ask openFDA for in one request (1–100). Device recall datasets always use at most 25, because single device recall records can be megabytes long. Lower it only if requests time out.

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

openFDA allows about 1,000 requests a day per IP address without a key; the Apify datacenter proxy spreads requests over many IPs. Turn it off only for small runs.

## Actor input object example

```json
{
  "datasets": [
    "foodRecalls",
    "drugRecalls",
    "deviceRecalls"
  ],
  "queries": [
    "listeria"
  ],
  "maxItemsPerQuery": 50,
  "pageSize": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Dataset with all FDA records (overview table)

## `allFields` (type: `string`):

Dataset with all fields of every record

# 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 = {
    "datasets": [
        "foodRecalls",
        "drugRecalls",
        "deviceRecalls"
    ],
    "queries": [
        "listeria"
    ],
    "maxItemsPerQuery": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("genial_candlestand/openfda-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 = {
    "datasets": [
        "foodRecalls",
        "drugRecalls",
        "deviceRecalls",
    ],
    "queries": ["listeria"],
    "maxItemsPerQuery": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("genial_candlestand/openfda-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 '{
  "datasets": [
    "foodRecalls",
    "drugRecalls",
    "deviceRecalls"
  ],
  "queries": [
    "listeria"
  ],
  "maxItemsPerQuery": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call genial_candlestand/openfda-recalls-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,genial_candlestand/openfda-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/XcofCdlZahmHUAqd9/builds/UhroQ2ZbZ6rT3eGyS/openapi.json
