# OpenFDA Adverse Events & Recalls Extractor (`xtracto/openfda-events`) Actor

Extract FDA drug/device adverse events (FAERS/MAUDE), recalls, and 510(k) clearances — one record per row. Tens of millions of records available. Public FDA data, no login.

- **URL**: https://apify.com/xtracto/openfda-events.md
- **Developed by:** [xtractoo](https://apify.com/xtracto) (community)
- **Categories:** Lead generation
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

## OpenFDA Adverse Events & Recalls Scraper

Extract FDA safety data at scale — **drug adverse events (FAERS)**, **device adverse events (MAUDE)**, **drug / food / device recalls**, **device clearances and approvals**, drug labels, and the NDC/UDI directories — one record per row, ready for a pharmacovigilance, risk, or litigation pipeline.

Built for pharma and medical-device safety teams, insurers, medical-malpractice and product-liability attorneys, and life-science analysts.

---

### Why use this actor

- **No account, no API key required.**
- **Enormous volume** — tens of millions of records available (drug adverse events 20M+, device adverse events 24M+, plus recalls, clearances, and the device UDI directory at 4.9M+).
- **One record per row**, with the FDA's own fields kept as-is.
- **Targeted or broad** — pull everything, or narrow with a search query (by drug, device, date, manufacturer, or reaction).

### How it works

1. You pick one or more **FDA datasets** from the list (drug events, device events, recalls, clearances, labels…).
2. *(Optional)* Add a **search query** to focus on a specific drug, device, manufacturer, or date range.
3. The actor collects every matching record and streams it into your dataset, ready to download as JSON, CSV, or Excel.

You don't manage any scrapers, accounts, or infrastructure — just pick datasets and press **Run**.

### Use cases

**Drug & device safety monitoring (pharmacovigilance)**
Pull adverse events for a specific product and track report volume and seriousness over time to spot emerging safety signals.

**Recall intelligence**
Pull drug/food/device recalls filtered by date to monitor competitor and supplier recalls as they're posted.

**Litigation & claims research**
Pull adverse events and recalls tied to a product line to build an evidence base for product-liability or malpractice work.

### Input

| Field | Type | Description |
| --- | --- | --- |
| `endpoints` | multi-select | FDA datasets: Drug events (FAERS), Device events (MAUDE), Drug/Food/Device recalls, Device clearances, Drug labels, NDC/UDI directories. |
| `search` | string | Optional FDA query, e.g. `patient.drug.medicinalproduct:"aspirin"` or `receivedate:[20260101 TO 20261231]`. |
| `apiKey` | string | Optional free FDA key — raises the daily limit for big jobs. |
| `pageSize` | integer | 1–1000 (default 1000). |
| `maxItemsPerEndpoint` | integer | 0 = up to the per-query maximum. |

`endpoints` is a **dropdown of fixed datasets** — no codes to remember.

### Output — one record per FDA record

```json
{
  "_input": "drug-recall",
  "_source": "S1-openfda",
  "_scrapedAt": "2026-06-03T10:00:00Z",
  "recordType": "FDA_RECORD",
  "fda_endpoint": "drug-recall",
  "recall_number": "D-1234-2026",
  "status": "Ongoing",
  "recalling_firm": "...",
  "reason_for_recall": "...",
  "product_description": "...",
  "classification": "Class II",
  "report_date": "20260214"
}
````

(Fields vary per dataset — the FDA's field names are passed through as-is.)

### Tip for very large pulls

A single search returns up to ~26,000 rows. To pull more for a broad dataset, **split by date** and run the actor per slice, e.g. `receivedate:[20260101 TO 20260331]`, then the next quarter. The run log tells you when a query is larger than one pull.

### Known limits

- Public FDA data — no account needed. Add a free FDA key for higher daily throughput on big jobs.
- Verified live: drug adverse events 20.3M, device adverse events 24.7M, device UDI directory 4.9M.

# Actor input Schema

## `endpoints` (type: `array`):

Pick one or more FDA datasets to extract.

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

OpenFDA query syntax, e.g. patient.drug.medicinalproduct:"aspirin"  or  receivedate:\[20260101 TO 20261231]. Leave blank for everything (capped at 26,000 rows/run — narrow to go deeper).

## `apiKey` (type: `string`):

Free key from open.fda.gov/apis/authentication — raises the daily rate limit.

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

How many records to fetch per request.

## `maxItemsPerEndpoint` (type: `integer`):

Maximum records per selected dataset. Set 0 for all (up to OpenFDAs ~26,000-per-query cap; narrow with search/date filters to go deeper).

## `maxConcurrency` (type: `integer`):

How many items to process in parallel.

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

Not required (public API). Leave off unless rate-limited.

## Actor input object example

```json
{
  "endpoints": [
    "drug-event"
  ],
  "search": "",
  "pageSize": 999,
  "maxItemsPerEndpoint": 1000,
  "maxConcurrency": 2,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "endpoints": [
        "drug-event"
    ],
    "search": "",
    "apiKey": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/openfda-events").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 = {
    "endpoints": ["drug-event"],
    "search": "",
    "apiKey": "",
}

# Run the Actor and wait for it to finish
run = client.actor("xtracto/openfda-events").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 '{
  "endpoints": [
    "drug-event"
  ],
  "search": "",
  "apiKey": ""
}' |
apify call xtracto/openfda-events --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "OpenFDA Adverse Events & Recalls Extractor",
        "description": "Extract FDA drug/device adverse events (FAERS/MAUDE), recalls, and 510(k) clearances — one record per row. Tens of millions of records available. Public FDA data, no login.",
        "version": "0.1",
        "x-build-id": "dM0pFai9s4zhdyOug"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/xtracto~openfda-events/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-xtracto-openfda-events",
                "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/xtracto~openfda-events/runs": {
            "post": {
                "operationId": "runs-sync-xtracto-openfda-events",
                "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/xtracto~openfda-events/run-sync": {
            "post": {
                "operationId": "run-sync-xtracto-openfda-events",
                "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",
                "required": [
                    "endpoints"
                ],
                "properties": {
                    "endpoints": {
                        "title": "FDA datasets",
                        "type": "array",
                        "description": "Pick one or more FDA datasets to extract.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "drug-event",
                                "device-event",
                                "drug-recall",
                                "food-recall",
                                "device-recall",
                                "device-510k",
                                "drug-label",
                                "drug-ndc",
                                "device-classification",
                                "device-pma",
                                "device-udi",
                                "food-event",
                                "animalvet-event",
                                "tobacco-problem"
                            ],
                            "enumTitles": [
                                "Drug adverse events (FAERS)",
                                "Device adverse events (MAUDE)",
                                "Drug recalls (enforcement)",
                                "Food recalls (enforcement)",
                                "Device recalls",
                                "Device 510(k) clearances",
                                "Drug labels (SPL)",
                                "Drug NDC directory",
                                "Device classifications",
                                "Device PMA approvals",
                                "Device UDI directory (4.9M)",
                                "Food adverse events (CAERS)",
                                "Animal & veterinary events",
                                "Tobacco problem reports"
                            ]
                        },
                        "default": [
                            "drug-event"
                        ]
                    },
                    "search": {
                        "title": "OpenFDA search query (optional)",
                        "type": "string",
                        "description": "OpenFDA query syntax, e.g. patient.drug.medicinalproduct:\"aspirin\"  or  receivedate:[20260101 TO 20261231]. Leave blank for everything (capped at 26,000 rows/run — narrow to go deeper).",
                        "default": ""
                    },
                    "apiKey": {
                        "title": "OpenFDA API key (optional)",
                        "type": "string",
                        "description": "Free key from open.fda.gov/apis/authentication — raises the daily rate limit."
                    },
                    "pageSize": {
                        "title": "Page size",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "How many records to fetch per request.",
                        "default": 999
                    },
                    "maxItemsPerEndpoint": {
                        "title": "Max items per dataset (0 = up to the 26,000 cap)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum records per selected dataset. Set 0 for all (up to OpenFDAs ~26,000-per-query cap; narrow with search/date filters to go deeper).",
                        "default": 1000
                    },
                    "maxConcurrency": {
                        "title": "Max concurrent datasets",
                        "minimum": 1,
                        "maximum": 6,
                        "type": "integer",
                        "description": "How many items to process in parallel.",
                        "default": 2
                    },
                    "proxyConfiguration": {
                        "title": "Proxy",
                        "type": "object",
                        "description": "Not required (public API). Leave off unless rate-limited.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
