# FDA Adverse Events Scraper - FAERS + MAUDE Export (`maydit/us-fda-adverse-events-scraper`) Actor

Scrape FDA adverse events from FAERS (drugs) and MAUDE (devices) via openFDA. Deeply nested reports flattened to one clean row each. Export to CSV, JSON, or Excel.

- **URL**: https://apify.com/maydit/us-fda-adverse-events-scraper.md
- **Developed by:** [Brandt May](https://apify.com/maydit) (community)
- **Categories:** Developer tools, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 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 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 Adverse Events Scraper - FAERS + MAUDE Data Export

> Pull FDA drug and medical-device adverse event reports from openFDA, flattened to one clean row per report, and export to CSV, JSON, or Excel.

### What it does

This **FDA adverse events scraper** queries the official **openFDA API** and returns two kinds of safety reports in one tool: **FAERS** adverse drug reaction reports (20M+) and **MAUDE** medical device event reports (25M+). Unlike drug-only scrapers and bloated "everything openFDA" generalists that dump raw nested JSON, it flattens each deeply nested openFDA report into a single, analysis-ready row - so **FAERS data**, **drug adverse event exports**, and **MAUDE database exports** land in your dataset already cleaned. Filter by product, reaction or device problem, seriousness, country, and received-date window, then export to CSV or Excel for pharmacovigilance, post-market surveillance, and drug safety signal detection.

### Who it's for

- **Pharmacovigilance and drug-safety teams** monitoring products for new or serious adverse events
- **Medical-device safety, regulatory, and QA teams** tracking device malfunctions and injuries
- **Pharma and medtech researchers** running comparative or epidemiologic analyses
- **Product-liability and litigation professionals** pulling report narratives and metadata for cases
- **Academics and data scientists** who need standardized, flattened adverse-event datasets

### What you get / Output

Each report is flattened to one row with these fields:

| Field | Description |
|---|---|
| `reportId` | Unique FDA report identifier |
| `receivedDate` | Date the FDA received the report |
| `serious` | Seriousness flag (death, hospitalization, life-threatening, disability) |
| `products` | Reported product / brand name(s) |
| `genericNames` | FDA-enriched generic name(s) |
| `manufacturer` | Manufacturer / applicant information |
| `indications` | Reported reason the product was used |
| `reactions` | MedDRA-coded reactions, with outcome codes |
| `productProblems` | Device problem descriptors (device mode) |
| `eventType` | Event classification (death / injury / malfunction) |
| `deviceClass` | FDA device class / model (device mode) |
| `narrative` | Truncated event narrative text |
| `patientAge` | Patient age |
| `patientSex` | Patient sex |
| `occurCountry` | Country where the event occurred |

Fields populate according to mode: drug (FAERS) reports emphasize reactions, indications, and demographics; device (MAUDE) reports emphasize product problems, event type, and device class.

### Input / How to query

| Input | What it does |
|---|---|
| `reportType` | `drug` = FAERS drug reports; `device` = MAUDE device reports |
| `productName` | Brand or generic drug name (e.g. `OZEMPIC`, `metformin`) or device name (e.g. `insulin pump`, `IMPELLA`); matched against reported and FDA-enriched names. Leave empty for all |
| `reactionOrProblem` | Drug mode: MedDRA reaction term (e.g. `Pancreatitis`). Device mode: product problem (e.g. `Battery Problem`). Leave empty for all |
| `seriousOnly` | Drug mode: only serious reports (death, hospitalization, life-threatening, disability). Device mode: only Death or Injury events |
| `country` | Two-letter country where the event occurred (drug mode only; ignored in device mode) |
| `receivedSince` | Only reports received on or after this date (`YYYY-MM-DD`) |
| `receivedUntil` | Only reports received on or before this date (`YYYY-MM-DD`) |
| `maxResults` | Upper bound on reports returned per run |

### Example use cases

- **Drug safety signal detection:** Pull every serious FAERS report for a single drug over the last quarter and scan reaction terms for emerging patterns.
- **Device post-market surveillance:** Export MAUDE malfunction and injury events for an insulin pump line to feed a QA / complaint-handling review.
- **Product-liability research:** Collect adverse-event narratives, manufacturer, and outcome data tied to a specific product for a lawsuit.
- **Competitive intelligence:** Track a competitor's drug or device adverse events and manufacturer trends over a date range.
- **Epidemiologic analysis:** Build a standardized, flattened adverse drug reaction dataset filtered by reaction, country, and demographics for a research study.

### Recurring use / scheduling

Run it on a **schedule** (daily, weekly, or monthly) to monitor a product for new or serious adverse events - true post-market surveillance without manual polling. Set `receivedSince` to your last run date so each run only pulls newly received reports, then dedupe on `reportId` when appending to your master dataset to keep the history clean. Point the run's dataset at a webhook or your BI tool to get alerted when new serious reports appear.

### How do I download FAERS data without hitting the openFDA 25,000 record API limit?

Set your filters (product, reaction, date window, `seriousOnly`) to scope the query, and use `maxResults` plus incremental `receivedSince` / `receivedUntil` windows to page through data across scheduled runs instead of pulling everything at once. Each run writes a clean dataset you can append and dedupe on `reportId`.

### How can I export FDA adverse event reports to CSV or Excel?

Every run stores results in an Apify dataset that you export in one click to **CSV, Excel, JSON, or XML**, or pull via the API. Because reports are already flattened to one row each, the CSV opens cleanly in Excel with no nested-JSON wrangling.

### How do I search the MAUDE database for medical device adverse events in bulk?

Set `reportType` to `device`, optionally add a `productName` (e.g. `IMPELLA`) and a `reactionOrProblem` device problem (e.g. `Material Rupture`), then raise `maxResults` and use a `receivedSince` / `receivedUntil` window to collect device events in bulk.

### How do I get both FAERS drug and MAUDE device adverse events in one dataset?

This is the tool's core differentiator. Run it once with `reportType` = `drug` and once with `reportType` = `device` (or on two schedules) - both write the same flattened schema, so you can merge them into a single combined adverse-events dataset.

### How do I monitor a drug for new adverse event reports (signal detection)?

Schedule the Actor with a fixed `productName` and roll `receivedSince` forward each run so it only returns newly received reports. Dedupe on `reportId` and watch the `serious`, `reactions`, and `eventType` fields for emerging safety signals.

### How do I pull only serious adverse events (death, hospitalization, disability) from FAERS?

Set `seriousOnly` to `true` in drug mode to return only reports flagged serious - death, hospitalization, life-threatening, or disability. In device mode the same flag returns only Death or Injury events.

### Do I need an API key to access the openFDA adverse events API?

No. openFDA adverse-event endpoints are public and this Actor handles the querying for you - you only provide the search filters. You just need an Apify account to run the Actor.

### How do I flatten nested openFDA adverse event JSON into one row per report?

That is exactly what this scraper does automatically. openFDA returns deeply nested report objects; the Actor converts each one into a single flat row with the fields listed in the Output table, so you never have to write JSON-flattening code.

### How do I get adverse event data for a product liability lawsuit?

Filter by the product (and optionally reaction / problem, seriousness, and date range), then export the dataset. The `narrative`, `manufacturer`, `reactions`, `productProblems`, and `receivedDate` fields give you the report metadata and event descriptions commonly used in forensic and litigation research.

### What is the difference between FAERS and MAUDE data?

**FAERS** is the FDA Adverse Event Reporting System for **drugs** - it captures adverse drug reactions, MedDRA-coded reactions, indications, and patient demographics. **MAUDE** is the FDA's **medical device** event database - it captures device malfunctions, injuries, and deaths with product problems and device class. This Actor covers both via the `reportType` input.

### Data source & notes

- **Source:** the official, public [openFDA](https://open.fda.gov/) adverse-event endpoints - `drug/event` (FAERS, 20M+ reports) and `device/event` (MAUDE, 25M+ reports). This is public U.S. government data, free to use.
- **Cleaning:** deeply nested openFDA report JSON is flattened to one row per report; the `narrative` field is truncated.
- **Coverage limits:** the `country` filter applies to drug mode only. Field population depends on what the reporter submitted - adverse-event reports are voluntary and can be incomplete, and a report does not establish that a product caused the event. Data reflects openFDA's own refresh cadence.

# Actor input Schema

## `reportType` (type: `string`):

Drug = FAERS adverse drug reaction reports (20M+). Device = MAUDE medical-device event reports (25M+).
## `productName` (type: `string`):

Drug name (brand or generic, e.g. 'OZEMPIC', 'metformin') or device name (e.g. 'insulin pump', 'IMPELLA'). Matched against reported names and FDA-enriched brand/generic names. Leave empty for all products.
## `reactionOrProblem` (type: `string`):

Drug mode: reaction term (MedDRA), e.g. 'Nausea', 'Pancreatitis'. Device mode: product problem, e.g. 'Material Rupture', 'Battery Problem'. Leave empty for all.
## `seriousOnly` (type: `boolean`):

Drug mode: only reports marked serious (death, hospitalization, life-threatening, disability). Device mode: only Death or Injury events (excludes malfunctions).
## `country` (type: `string`):

Two-letter country where the event occurred, e.g. 'US'. Ignored in device mode.
## `receivedSince` (type: `string`):

Only reports the FDA received on or after this date (YYYY-MM-DD).
## `receivedUntil` (type: `string`):

Only reports the FDA received on or before this date (YYYY-MM-DD).
## `maxResults` (type: `integer`):

Upper bound on reports returned per run.

## Actor input object example

```json
{
  "reportType": "drug",
  "productName": "OZEMPIC",
  "seriousOnly": false,
  "receivedSince": "2026-01-01",
  "maxResults": 500
}
````

# 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("maydit/us-fda-adverse-events-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("maydit/us-fda-adverse-events-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 maydit/us-fda-adverse-events-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "FDA Adverse Events Scraper - FAERS + MAUDE Export",
        "description": "Scrape FDA adverse events from FAERS (drugs) and MAUDE (devices) via openFDA. Deeply nested reports flattened to one clean row each. Export to CSV, JSON, or Excel.",
        "version": "1.0",
        "x-build-id": "paCgXeCvXn1YPcaq5"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/maydit~us-fda-adverse-events-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-maydit-us-fda-adverse-events-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/maydit~us-fda-adverse-events-scraper/runs": {
            "post": {
                "operationId": "runs-sync-maydit-us-fda-adverse-events-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/maydit~us-fda-adverse-events-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-maydit-us-fda-adverse-events-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": {
                    "reportType": {
                        "title": "Report type",
                        "enum": [
                            "drug",
                            "device"
                        ],
                        "type": "string",
                        "description": "Drug = FAERS adverse drug reaction reports (20M+). Device = MAUDE medical-device event reports (25M+).",
                        "default": "drug"
                    },
                    "productName": {
                        "title": "Product name",
                        "type": "string",
                        "description": "Drug name (brand or generic, e.g. 'OZEMPIC', 'metformin') or device name (e.g. 'insulin pump', 'IMPELLA'). Matched against reported names and FDA-enriched brand/generic names. Leave empty for all products."
                    },
                    "reactionOrProblem": {
                        "title": "Reaction / product problem",
                        "type": "string",
                        "description": "Drug mode: reaction term (MedDRA), e.g. 'Nausea', 'Pancreatitis'. Device mode: product problem, e.g. 'Material Rupture', 'Battery Problem'. Leave empty for all."
                    },
                    "seriousOnly": {
                        "title": "Serious events only",
                        "type": "boolean",
                        "description": "Drug mode: only reports marked serious (death, hospitalization, life-threatening, disability). Device mode: only Death or Injury events (excludes malfunctions).",
                        "default": false
                    },
                    "country": {
                        "title": "Country (drug mode only)",
                        "type": "string",
                        "description": "Two-letter country where the event occurred, e.g. 'US'. Ignored in device mode."
                    },
                    "receivedSince": {
                        "title": "Received since",
                        "type": "string",
                        "description": "Only reports the FDA received on or after this date (YYYY-MM-DD)."
                    },
                    "receivedUntil": {
                        "title": "Received until",
                        "type": "string",
                        "description": "Only reports the FDA received on or before this date (YYYY-MM-DD)."
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Upper bound on reports returned per run.",
                        "default": 500
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
