# openFDA Recalls Scraper | Drug, Food & Device Recalls (`muzafferkadir/openfda-recalls-scraper`) Actor

Scrape FDA drug, food and device recalls from the official openFDA API: classification, reason, recalling firm, dates, and location. No API key.

- **URL**: https://apify.com/muzafferkadir/openfda-recalls-scraper.md
- **Developed by:** [Muzaffer Kadir YILMAZ](https://apify.com/muzafferkadir) (community)
- **Categories:** Business, E-commerce, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 recalls

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

## openFDA Recalls Scraper

Scrape **FDA drug, food, and device recalls** (enforcement reports) from the **official openFDA API** — **classification, reason for recall, recalling firm, distribution, dates, and location**. No API key or setup needed.

Pick your categories, filter by a product keyword and a start date, and get a clean, dated list of recalls — ready to export to CSV, Excel, or JSON, or to power a compliance / safety monitor.

### Features

- **Official, reliable source** — reads the public openFDA enforcement API.
- **Every recall class** — Class I, II, and III, across drugs, food, and devices.
- **Rich detail** — reason for recall, recalling firm, distribution pattern, voluntary/mandated, and where it was distributed.
- **Monitoring-ready** — schedule it on your keywords and catch new recalls as they post.

### Use cases

- **Compliance & safety monitoring** — pharmacies, importers, and QA teams tracking recalls in their space.
- **Allergen & food-safety alerts** — filter food recalls by keyword (e.g. `allergen`, `undeclared`).
- **Medical device surveillance** — track device recalls by class and firm.
- **Research & journalism** — build datasets of recalls by category, firm, or date.

### Input

| Field | Type | Description |
| --- | --- | --- |
| `categories` | enum\[] | `drug`, `food`, `device`. Default `["drug", "food"]`. |
| `keyword` | string | Optional term matched against the product description. |
| `sinceDate` | string | `YYYY-MM-DD`; only recalls reported on/after this. Defaults to the last 180 days. |
| `maxItems` | integer | Max recalls per category. Default 100. |

#### Example

```json
{
  "categories": ["drug", "food"],
  "keyword": "allergen",
  "sinceDate": "2026-01-01",
  "maxItems": 100
}
```

### Output

```json
{
  "category": "drug",
  "recallNumber": "D-0301-2026",
  "status": "Ongoing",
  "classification": "Class II",
  "productDescription": "Metformin Hydrochloride Tablets USP, 500 mg",
  "reason": "CGMP Deviations",
  "recallingFirm": "Example Pharma Inc.",
  "distributionPattern": "Nationwide",
  "voluntaryMandated": "Voluntary: Firm initiated",
  "initiationDate": "2026-01-21",
  "reportDate": "2026-02-11",
  "city": "East Brunswick",
  "state": "NJ",
  "country": "United States",
  "keyword": "allergen",
  "scrapedAt": "2026-08-11T19:00:00.000Z"
}
```

Download the dataset as **JSON, CSV, Excel, or XML**, or pull it via the Apify API.

### Pricing

Pay-per-event: **$0.01 per run start** (per GB of run memory) plus **$0.50 per 1,000 recalls**. You only pay for recalls actually returned. See the **Pricing** tab for current rates.

### FAQ

**Do I need an API key?**
No. openFDA's enforcement API is public and free; this Actor packages it into clean, filtered rows.

**What do the recall classes mean?**
Class I is the most serious (risk of serious harm or death), Class II is moderate, Class III is the least serious.

**Can I monitor for new recalls?**
Yes — schedule the Actor (e.g. daily) with your categories and keyword.

**Why did a search return nothing?**
openFDA returns a 404 when a query matches no recalls; this Actor treats that as an empty result, not an error.

### Disclaimer

This Actor uses the **public openFDA API**. It is not affiliated with or endorsed by the U.S. FDA. The data is public; you are responsible for how you use it.

# Actor input Schema

## `categories` (type: `array`):

Which recall categories to scrape from the openFDA enforcement API.

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

Optional term matched against the product description, e.g. "allergen", "metformin". Leave empty to get all recalls in the date range.

## `sinceDate` (type: `string`):

YYYY-MM-DD; only recalls with report_date on/after this. Defaults to the last 180 days.

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

Max recalls per category.

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

Optional. Leave empty for most runs.

## Actor input object example

```json
{
  "categories": [
    "drug",
    "food"
  ],
  "maxItems": 100
}
```

# Actor output Schema

## `results` (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 = {
    "categories": [
        "drug",
        "food"
    ],
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("muzafferkadir/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 = {
    "categories": [
        "drug",
        "food",
    ],
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("muzafferkadir/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 '{
  "categories": [
    "drug",
    "food"
  ],
  "maxItems": 100
}' |
apify call muzafferkadir/openfda-recalls-scraper --silent --output-dataset

```

## MCP server setup

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