# FDA Data Scraper (`logiover/fda-data-scraper`) Actor

Scrape FDA drug, device and food data from the official openFDA API — no login, no API key, no blocking. Drug recalls, adverse events (20M+), drug labels, device recalls and 510(k) clearances. Filter by firm, classification and date. Tens of thousands of records per run.

- **URL**: https://apify.com/logiover/fda-data-scraper.md
- **Developed by:** [Logiover](https://apify.com/logiover) (community)
- **Categories:** Automation, Developer tools
- **Stats:** 8 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## 💊 FDA Data Scraper — Drug & Device Recalls, Adverse Events & Labels via openFDA API

Scrape **FDA drug, device and food data** straight from the **official [openFDA API](https://open.fda.gov)** — drug recalls, drug adverse events (20M+ records), drug labels, device recalls, device adverse events (24M+ records), 510(k) clearances and food recalls. This **FDA data scraper** needs **no login and no API key**, and one run can return tens of thousands of structured records ready to export to JSON, CSV or Excel.

Because it reads the official openFDA API, results are reliable and don't break with website redesigns. Use openFDA's powerful search syntax to filter by recalling firm, classification, date range and more, and schedule the Actor to keep an always-current FDA enforcement and safety feed.

### ✨ What this Actor does / Key features

- **Official openFDA API** — 100% reliable, never blocked, no fragile HTML parsing.
- **No API key, no login** — just configure and run.
- **Nine FDA datasets** — drug recalls, drug adverse events, drug labels, device recalls, device adverse events, device 510(k) clearances, food recalls, food adverse events and animal & veterinary adverse events.
- **Massive scale** — 20M+ drug adverse events, 24M+ device adverse events; tens of thousands of records per run.
- **Powerful filtering** — use openFDA search syntax to filter by `recalling_firm`, `classification`, `report_date` ranges and any other field.
- **Adjustable run size** — set `maxRecords` to cap the run or `0` to pull everything available for the query.
- **Structured, export-ready output** — flat JSON records, perfect for JSON, CSV, Excel, databases or BI tools.
- **Built for scheduling** — recalls and adverse events update constantly; run on a schedule for a fresh feed.

### 🔍 Input

| Field | Type | Description |
|-------|------|-------------|
| `dataset` | string (enum) | Which openFDA dataset to scrape: `drug/enforcement` (drug recalls), `drug/event` (drug adverse events, 20M+), `drug/label` (drug labels), `device/recall`, `device/event` (device adverse events, 24M+), `device/510k` (510(k) clearances), `food/enforcement` (food recalls), `food/event` (food adverse events), `animalandveterinary/event`. Default `drug/enforcement`. |
| `searchQuery` | string | Optional openFDA search filter, e.g. `classification:"Class I"`, `recalling_firm:pfizer`, or `report_date:[20260101+TO+20261231]`. Leave empty for all records. |
| `maxRecords` | integer | Maximum records to save. `0` = all available for the query (up to ~26,000 per query — narrow with `searchQuery` for more). Minimum `0`. |

### 🚀 Example input

```json
{
  "dataset": "drug/enforcement",
  "searchQuery": "classification:\"Class I\"",
  "maxRecords": 10000
}
````

Pull all device recalls for a specific firm:

```json
{
  "dataset": "device/recall",
  "searchQuery": "recalling_firm:medtronic",
  "maxRecords": 0
}
```

### 📦 Output

Each item in the dataset is one FDA record. Output is flat, structured JSON. The fields below are the common enforcement/recall fields surfaced across datasets; the exact fields available depend on the chosen `dataset`.

| Field | Description |
|-------|-------------|
| `_dataset` | The openFDA dataset this record came from (e.g. `drug/enforcement`). |
| `recalling_firm` | Name of the firm that initiated the recall. |
| `product_description` | Description of the recalled or reported product. |
| `reason_for_recall` | Stated reason for the recall. |
| `classification` | FDA recall classification (Class I, II or III). |
| `status` | Recall status (e.g. Ongoing, Completed, Terminated). |
| `city` | City of the recalling firm. |
| `state` | State of the recalling firm. |
| `country` | Country of the recalling firm. |
| `recall_number` | FDA's unique recall identifier. |
| `report_date` | Date the recall was reported. |
| `recall_initiation_date` | Date the recall was initiated. |
| `product_type` | Product type (Drugs, Devices, Food, etc.). |
| `scrapedAt` | ISO timestamp of when the record was scraped. |

#### Example output record

```json
{
  "_dataset": "drug/enforcement",
  "recalling_firm": "Example Pharma Inc.",
  "product_description": "Example Drug 10mg Tablets",
  "reason_for_recall": "Failed dissolution specifications",
  "classification": "Class I",
  "status": "Ongoing",
  "city": "Trenton",
  "state": "NJ",
  "country": "United States",
  "recall_number": "D-1234-2026",
  "report_date": "20260115",
  "recall_initiation_date": "20260108",
  "product_type": "Drugs",
  "scrapedAt": "2026-05-15T08:30:00.000Z"
}
```

### 💡 Use cases

- **Product-liability & drug-injury law firms** — monitor recalls and adverse events at scale to identify cases.
- **Pharma & medical-device safety teams** — track competitor recalls and adverse-event reports.
- **Compliance & regulatory teams** — maintain an always-current FDA enforcement feed for your product categories.
- **Health-tech companies & researchers** — build research datasets from FDA's open data.
- **Insurers & risk analysts** — quantify recall frequency and severity by firm, product type and classification.
- **Journalists & watchdogs** — surface Class I recalls and safety trends as they're reported.

### ❓ Frequently Asked Questions

**Do I need an FDA or openFDA API key?**
No. The Actor uses the public openFDA API, which is accessible without an API key, account or login.

**Is it legal to scrape FDA data?**
Yes — openFDA is the FDA's official open-data API, intended for public programmatic access. You are responsible for how you use and present the data.

**Which datasets can I scrape?**
Nine: drug recalls, drug adverse events (20M+), drug labels, device recalls, device adverse events (24M+), device 510(k) clearances, food recalls, food adverse events, and animal & veterinary adverse events.

**How much data can I get in one run?**
Tens of thousands of records. openFDA caps a single query at roughly 26,000 records — to extract more, split your work with narrower `searchQuery` filters (e.g. by date range or firm) across multiple runs.

**How do I filter the results?**
Use the `searchQuery` field with openFDA's search syntax. Examples: `classification:"Class I"`, `recalling_firm:pfizer`, `report_date:[20260101+TO+20261231]`. Leave it empty to pull everything.

**How fast is it and does it get blocked?**
It's fast and reliable — because it uses the official API there are no captchas or anti-bot blocks. Cost depends only on the Apify compute used.

**Can I schedule it and what formats are supported?**
Yes. Schedule it on Apify to keep recalls and adverse events continuously up to date. Results export to JSON, CSV, Excel or XML, or via the Apify API.

### ⏰ Scheduling & integration

Schedule this Actor on Apify to run daily for an always-fresh FDA recalls and adverse-events feed. Export results to JSON, CSV or Excel, pull them through the Apify API, or connect the dataset to Google Sheets, webhooks or your compliance and analytics pipelines.

# Actor input Schema

## `dataset` (type: `string`):

Which openFDA dataset to scrape. Recalls/enforcement and adverse events are the highest-demand for legal & compliance use.

## `searchQuery` (type: `string`):

Optional openFDA search filter, e.g. 'classification:"Class I"' or 'recalling\_firm:pfizer' or 'report\_date:\[20260101+TO+20261231]'. Leave empty for all records.

## `maxRecords` (type: `integer`):

Maximum records to save. 0 = all available for the query (up to 26,000 per query; narrow with the search filter for more).

## Actor input object example

```json
{
  "dataset": "drug/enforcement",
  "searchQuery": ""
}
```

# Actor output Schema

## `_dataset` (type: `string`):

\_dataset

## `recalling_firm` (type: `string`):

recalling\_firm

## `product_description` (type: `string`):

product\_description

## `reason_for_recall` (type: `string`):

reason\_for\_recall

## `classification` (type: `string`):

classification

## `status` (type: `string`):

status

## `report_date` (type: `string`):

report\_date

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/fda-data-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("logiover/fda-data-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 '{}' |
apify call logiover/fda-data-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "FDA Data Scraper",
        "description": "Scrape FDA drug, device and food data from the official openFDA API — no login, no API key, no blocking. Drug recalls, adverse events (20M+), drug labels, device recalls and 510(k) clearances. Filter by firm, classification and date. Tens of thousands of records per run.",
        "version": "1.0",
        "x-build-id": "Qudq56og8VaEvCCjI"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/logiover~fda-data-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-logiover-fda-data-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/logiover~fda-data-scraper/runs": {
            "post": {
                "operationId": "runs-sync-logiover-fda-data-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/logiover~fda-data-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-logiover-fda-data-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "dataset": {
                        "title": "Dataset",
                        "enum": [
                            "drug/enforcement",
                            "drug/event",
                            "drug/label",
                            "device/recall",
                            "device/event",
                            "device/510k",
                            "food/enforcement",
                            "food/event",
                            "animalandveterinary/event"
                        ],
                        "type": "string",
                        "description": "Which openFDA dataset to scrape. Recalls/enforcement and adverse events are the highest-demand for legal & compliance use.",
                        "default": "drug/enforcement"
                    },
                    "searchQuery": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Optional openFDA search filter, e.g. 'classification:\"Class I\"' or 'recalling_firm:pfizer' or 'report_date:[20260101+TO+20261231]'. Leave empty for all records.",
                        "default": ""
                    },
                    "maxRecords": {
                        "title": "Max Records",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum records to save. 0 = all available for the query (up to 26,000 per query; narrow with the search filter for more)."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
