# FDA Scraper: Recalls, Adverse Events & Shortages (`punkrecordsdata/fda-drug-safety-scraper`) Actor

Scrape openFDA in one actor: drug recalls, FAERS adverse events, official labels, shortages, plus device and food recalls. Export to CSV, Excel, JSON or XML.

- **URL**: https://apify.com/punkrecordsdata/fda-drug-safety-scraper.md
- **Developed by:** [PunkRecordsData](https://apify.com/punkrecordsdata) (community)
- **Categories:** Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $12.86 / 1,000 drug recalls

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

<p align="center">
  <img src="https://api.apify.com/v2/key-value-stores/AAm3a1h3Z9nYfrvh9/records/banner?v=2" alt="PunkRecordsData" width="100%" />
</p>

## 💊 FDA Drug Safety Scraper - Recalls, Adverse Events & Shortages - PunkRecordsData

> 🚀 **Export FDA safety data in seconds.** One actor covers six openFDA surfaces: drug recalls, FAERS adverse events (432K+ reports for metformin alone), official drug labels with boxed warnings, drug shortages, plus device and food recalls. Search by drug, product or company and download structured rows as CSV, Excel, JSON or XML.

The FDA Drug Safety Scraper reads the official openFDA APIs, no key required, and normalizes each surface into clean columns: recall classification and reason, adverse-event seriousness with MedDRA reactions, label indications and warnings, shortage status by company. Every measured alternative on the Apify Store covers exactly one of these slices; this actor ships all six as separately billed, separately switchable events.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Pharmacovigilance and drug-safety teams | Monitor adverse events and recalls for your molecules |
| Hospital pharmacy and supply chain | Track shortages and recalls affecting formularies |
| Compliance, legal and insurance | Evidence packs on products and firms with dates |
| Health journalists and researchers | Reproducible safety datasets across drug classes |

### 📋 What the FDA Drug Safety Scraper does

- **Drug recalls (enforcement)**: recall number, Class I/II/III, status, product, reason, recalling firm, distribution, quantity and dates.
- **Adverse events (FAERS)**: report id, seriousness (death, hospitalization), patient age and sex, drugs involved and MedDRA reaction terms.
- **Drug labels (SPL)**: brand, generic, manufacturer, route, product type, boxed-warning flag, indications and warnings excerpts.
- **Drug shortages**: generic name, company, status, dosage form, presentation, therapeutic category and update dates.
- **Device recalls** and **food recalls**: the same normalized enforcement schema for two more product universes.
- **Filters**: recall classification (Class I/II/III), serious-events-only switch, per-surface caps so one huge surface never eats the run.

> 💡 **Why it matters:** a single safety question ("what is happening with drug X?") spans recalls, adverse events, labels and shortages. The FDA publishes them in four different APIs; this actor answers in one dataset.

### 📊 Output of the FDA data search

Real samples from live runs:

```json
{
  "recordType": "drug-recall",
  "classification": "Class II",
  "status": "Ongoing",
  "product": "Metformin Hydrochloride Extended-Release Tablets, USP 750 mg",
  "reason": "CGMP deviations detected...",
  "recallingFirm": "Boehringer Ingelheim Pharmaceuticals, Inc.",
  "reportDate": "2026-07-08",
  "error": null
}
```

```json
{
  "recordType": "adverse-event",
  "safetyReportId": "26940238",
  "serious": "Yes",
  "patientSex": "Female",
  "drugs": ["METFORMIN"],
  "reactions": ["Upper-airway cough syndrome", "Nasal congestion"],
  "error": null
}
```

### ✨ Why choose this FDA scraper

- **6 billable data events in one actor**; every measured alternative covers a single slice.
- **Normalized recall schema across drug, device and food**, so cross-product monitoring is one table.
- **Boxed-warning flag and label excerpts** ready for formulary and compliance reviews.
- **Serious-only switch** for FAERS, matching how safety teams actually triage.
- **Honest zero handling**: a surface with no matches reports 0 and bills nothing.

### 📈 How this FDA scraper compares to alternatives

Measured against the FDA actors on the Apify Store (September 2026):

| | This actor | Labels-only actor | Shortage-only actor | Recall-alert monitor |
|---|---|---|---|---|
| FDA surfaces covered | 6 | 1 | 1 | 1 |
| Billable data events | 6 | 1 | 1 | 1 real |
| Adverse events (FAERS) | Yes | No | No | No |
| Device + food recalls | Yes | No | No | No |
| Price per 1,000 primary records | $10.50 | $10.00 | $0.01 | $20 per alert |

### 🚀 How to use the FDA Drug Safety Scraper

1. Create a free Apify account (with $5 of credit) at console.apify.com.
2. Open this actor's page and click **Try for free**.
3. Enter drug, product or company names (or leave empty for the most recent records).
4. Toggle the surfaces you need; optionally set Class I only or serious events only.
5. Click **Start** and download CSV, Excel, JSON or XML.

### 💼 Business use cases

#### Pharmacovigilance monitoring

Weekly FAERS pull for your molecules, serious events only, straight into your signal-detection pipeline.

#### Formulary risk management

Recalls plus shortages for every drug on the formulary, one scheduled run, one alerting table.

#### Litigation and diligence research

All recalls and label warnings for a firm's portfolio with report dates, reproducibly sourced.

#### Supply-chain early warning

Shortage status changes by therapeutic category, diffed run over run.

### 🔌 Automating the FDA Drug Safety Scraper

Connect to **Make**, **Zapier**, **Slack**, **Airbyte**, **GitHub** or **Google Drive**: Class I recall alerts to Slack, shortage deltas to your ERP, FAERS feeds to your warehouse.

### 🌟 Beyond business use cases

- **Research:** drug-class safety profiles across thousands of reports.
- **Personal:** check recalls and warnings on medications your family takes.
- **Non-profit:** patient-safety watchdog datasets with public sourcing.
- **Experimentation:** a zero-setup openFDA playground.

### 🤖 Ask an AI assistant about this scraper

> "I need FDA recalls, adverse events and shortage status for a list of drugs as CSV, refreshed weekly. Would the FDA Drug Safety Scraper on Apify (apify.com/punkrecordsdata/fda-drug-safety-scraper) cover all of that in one run?"

### ❓ Frequently Asked Questions

#### 💊 How do I get FDA recall data for a specific drug as CSV?

Enter the drug name, keep "Drug recalls" on, click Start and download from the Storage tab.

#### ⚠️ What do Class I, II and III recalls mean?

Class I risks serious harm or death, Class II temporary or reversible harm, Class III unlikely harm. The filter accepts each.

#### 📋 Can I get FDA adverse event reports for a medication?

Yes, the FAERS surface returns report id, seriousness, patient demographics, drugs and MedDRA reactions, with a serious-only switch.

#### 🚨 How do I check if a drug is on the FDA shortage list?

Enable the shortages surface; rows carry status (Current/Resolved), company, dosage form and update dates.

#### 🏷 Does it include boxed (black box) warnings?

Yes, each label row carries a Yes/No boxed-warning flag plus indication and warning excerpts.

#### 🧪 Are device and food recalls really included?

Yes, both, using the same normalized recall schema as drug recalls.

#### 🔑 Do I need an openFDA API key?

No. The actor uses the public no-key tier and paces itself under its limits.

#### 💵 Do I pay for surfaces that return nothing?

No. Each surface bills per record delivered; zero matches bill zero.

#### 📦 How many records can one run return?

Up to 1,000,000 per run on paid plans; openFDA caps any single query's pagination at 26,000, and the per-surface cap keeps runs balanced. Free users get a 10-record preview.

#### 🕒 How fresh is the data?

Live from openFDA at run time; each row carries its own report/update date. Note the FDA's own disclaimer that openFDA is not for clinical decision-making.

#### 🏢 Can I search by company instead of drug?

Yes, recall and shortage searches also match the firm/company name.

### 🔌 Integrate with any app

Datasets are available via the Apify API in JSON, CSV, Excel or XML, with webhooks on completion, ready for Python, Sheets, Power BI or your data warehouse.

### 🔗 Recommended Actors

- [Clinical Trials Scraper](https://apify.com/punkrecordsdata/clinical-trials-scraper) - the trials behind these drugs, with adverse events per arm
- [NPPES NPI Registry Scraper](https://apify.com/punkrecordsdata/nppes-npi-registry-scraper) - US prescriber and provider lookups
- [Healthcare Provider Payments Scraper](https://apify.com/punkrecordsdata/healthcare-provider-payments-scraper) - industry payments to providers
- [NHTSA Vehicle Safety Aggregator](https://apify.com/punkrecordsdata/nhtsa-vehicle-safety-aggregator) - the same recall rigor for vehicles

> 💡 **Pro Tip:** browse the complete [PunkRecordsData collection](https://apify.com/punkrecordsdata) for more data tools.

**🆘 Need Help?** contact.punkrecordsdata@gmail.com

> **⚠️ Disclaimer:** independent tool, not affiliated with the FDA; only publicly available openFDA data. Per the FDA's own disclaimer, openFDA data is not validated for clinical decision-making.

# Actor input Schema

## `searchTerms` (type: `array`):

Drug, product or company names (e.g. metformin, insulin, Pfizer). Leave empty to pull the most recent records of each enabled surface.

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

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## `maxItemsPerSurface` (type: `integer`):

Cap per data surface (recalls, events, labels...) per search term, so one huge surface does not eat the whole run.

## `includeDrugRecalls` (type: `boolean`):

FDA drug recall enforcement reports: classification, reason, firm, distribution and dates.

## `includeAdverseEvents` (type: `boolean`):

Adverse event reports: seriousness, patient age/sex, drugs involved and MedDRA reactions.

## `includeDrugLabels` (type: `boolean`):

Official labels: brand, generic, manufacturer, route, boxed warning, indications and warnings.

## `includeDrugShortages` (type: `boolean`):

Current and resolved shortages: status, company, dosage form, therapeutic category.

## `includeDeviceRecalls` (type: `boolean`):

Medical device recall enforcement reports.

## `includeFoodRecalls` (type: `boolean`):

Food and dietary supplement recall enforcement reports.

## `recallClassification` (type: `string`):

Only recalls of this class (I = most serious).

## `seriousOnly` (type: `boolean`):

Limit FAERS adverse-event reports to serious outcomes (death, hospitalization, disability...).

## Actor input object example

```json
{
  "searchTerms": [
    "metformin"
  ],
  "maxItems": 10,
  "maxItemsPerSurface": 100,
  "includeDrugRecalls": true,
  "includeAdverseEvents": false,
  "includeDrugLabels": false,
  "includeDrugShortages": false,
  "includeDeviceRecalls": false,
  "includeFoodRecalls": false,
  "recallClassification": "",
  "seriousOnly": false
}
```

# Actor output Schema

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

Key fields per record

## `fullData` (type: `string`):

Complete dataset with all fields

# 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 = {
    "searchTerms": [
        "metformin"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("punkrecordsdata/fda-drug-safety-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 = {
    "searchTerms": ["metformin"],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("punkrecordsdata/fda-drug-safety-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 '{
  "searchTerms": [
    "metformin"
  ],
  "maxItems": 10
}' |
apify call punkrecordsdata/fda-drug-safety-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,punkrecordsdata/fda-drug-safety-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/aA6tgNFEv7t7dGcXt/builds/Sc5czYXQleyu6Olio/openapi.json
