# OpenFDA Scraper – Drug Labels & Recalls (`ninhothedev/openfda-scraper`) Actor

$0.5/1K 🔥 Fast openFDA scraper! Drug labels, adverse events, recalls & device/food enforcement. No key. JSON, CSV, Excel or API in seconds. Query the FDA for pharma research, recall monitoring & compliance ⚡

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

## Pricing

from $0.50 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## OpenFDA Scraper – Drug Labels & Food/Drug/Device Recalls

**Pull clean, structured data straight from the U.S. FDA's free OpenFDA API: drug product labels (brand, generic, manufacturer, purpose) and food, drug & device recall enforcement reports (reason, classification, recalling firm, status, dates). Export as JSON, CSV or Excel. No API key, no proxy.**

### 💵 Pricing

**Pay per result — about $0.50 per 1,000 records.** No subscription and no proxy cost. New Apify accounts include free monthly credits, so you can test it for **$0**.

### 🔎 What can it extract?

- **Drug labels**: brand name, generic name, manufacturer, purpose / indications
- **Recalls (food, drug, device)**: recall number, reason for recall, classification (Class I/II/III), recalling firm, product description, status, city/state/country, report date
- Direct OpenFDA source URL for every record
- Four modes in one actor: `drugLabels`, `foodRecalls`, `drugRecalls`, `deviceRecalls`

### 🚀 How do I use it?

1. Click **Try for free**.
2. Pick a **mode** and a **search** query (see examples).
3. Click **Start** and download results as JSON, CSV or Excel — or pull them via the API / schedule them.

### ⚙️ Input example

```json
{
  "mode": "foodRecalls",
  "search": "reason_for_recall:\"salmonella\"&sort=report_date:desc",
  "maxItems": 200
}
```

Drug label example:

```json
{
  "mode": "drugLabels",
  "search": "openfda.brand_name:\"aspirin\"",
  "maxItems": 100
}
```

### 📦 Output example

```json
{
  "dataset": "foodRecalls",
  "id_or_recall_number": "F-0276-2017",
  "brand_name": null,
  "generic_name": null,
  "manufacturer_or_recalling_firm": "Pharmatech LLC",
  "product_description": "Dietary supplement, 30 count bottle",
  "reason_for_recall": "Potential for product contamination",
  "classification": "Class II",
  "status": "Terminated",
  "purpose": null,
  "city": "Davie",
  "state": "FL",
  "country": "United States",
  "report_date": "20161102",
  "url": "https://api.fda.gov/food/enforcement.json?search=recall_number:%22F-0276-2017%22",
  "scraped_at": "2026-07-01T09:00:00+00:00"
}
```

### 🎯 Use cases

- Pharmacovigilance & drug-safety monitoring
- Food-safety and recall alerting dashboards
- Medical-device compliance tracking
- Healthcare, insurance & pharma datasets
- AI assistants that answer drug and recall questions

### 💰 How much will it cost?

Pay only the per-result price (no proxy cost):
100 → ~$0.05 · 1,000 → ~$0.50 · 10,000 → ~$5

### 🆚 Why this one

| Feature | This actor | Others |
|---|---|---|
| Labels **and** recalls in one actor | ✅ | usually one only |
| Food + drug + device recalls | ✅ | partial |
| No key, no proxy | ✅ | sometimes |
| Nullable, ML-friendly schema | ✅ | inconsistent |

### 🔗 Related actors

- [Open Food Facts Scraper](https://apify.com/ninhothedev/open-food-facts-scraper) — food products
- [Wikipedia Scraper](https://apify.com/ninhothedev/wikipedia-scraper) — knowledge
- [Google News Scraper](https://apify.com/ninhothedev/google-news-scraper) — news
- [UPC Barcode Lookup Scraper](https://apify.com/ninhothedev/upc-barcode-lookup-scraper) — barcodes

### ❓ FAQ

**Key/proxy?** No — the OpenFDA API is free and public. **How many records?** Up to 1,000 per run (OpenFDA hard cap), paged automatically. **Search syntax?** Standard OpenFDA `field:value` expressions, with optional `&sort=`.

### 🛟 Support

Found a bug or need an extra field? Open an issue on the actor — fixes and new fields ship fast.

### Legal & privacy

Data via the public [OpenFDA](https://open.fda.gov/) API (U.S. Food & Drug Administration). This actor collects only public, non-personal regulatory data.

***

**Keywords:** openfda scraper, fda drug labels, drug recalls, food recalls, device recalls, pharmacovigilance, medical device data, food safety, drug safety, JSON CSV Excel

# Actor input Schema

## `mode` (type: `string`):

What to scrape: drugLabels (drug product labels), foodRecalls, drugRecalls, or deviceRecalls (FDA enforcement reports).

## `search` (type: `string`):

OpenFDA search expression. For labels e.g. openfda.brand\_name:"aspirin". For recalls e.g. reason\_for\_recall:"salmonella" or add \&sort=report\_date:desc. Plain text also works. Leave empty for the latest records.

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

Maximum number of records to return (paged in 100s). OpenFDA hard cap is 1000.

## Actor input object example

```json
{
  "mode": "drugLabels",
  "search": "aspirin",
  "maxItems": 100
}
```

# Actor output Schema

## `records` (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 = {
    "search": "aspirin",
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("ninhothedev/openfda-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 = {
    "search": "aspirin",
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("ninhothedev/openfda-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "search": "aspirin",
  "maxItems": 100
}' |
apify call ninhothedev/openfda-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ninhothedev/openfda-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/jQKO0eVmbJeWRqu7M/builds/ULTWainhOoG3KKgAD/openapi.json
