# openFDA Medical Device Events Scraper (`parseforge/openfda-device-event-scraper`) Actor

Scrapes medical device adverse event reports from the openFDA database. Returns each event as a flat row with device, manufacturer, event type, and date.

- **URL**: https://apify.com/parseforge/openfda-device-event-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Business, Other, Education
- **Stats:** 2 total users, 1 monthly users, 89.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $18.00 / 1,000 result items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

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

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

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

# README

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### openFDA Medical Device Events Scraper

**Scrape medical device adverse event reports from the openFDA database, up to a million per run.** Each event comes with device name, manufacturer, event type, and date. No API key or login. Export to CSV, JSON, Excel, or XML.

The FDA's openFDA API has rate limits and requires parsing nested JSON. This Actor reads the public device event endpoint directly, filters by device name, brand, manufacturer, event type, and date range, and returns each match in one flat row. It is built for medical device safety monitoring, post-market surveillance, and regulatory research.

| Who uses it | What they scrape openFDA for |
|---|---|
| Medical device safety researchers | Monitor adverse event trends for specific device types or manufacturers |
| Regulatory affairs professionals | Gather post-market surveillance data for regulatory submissions |
| Healthcare data analysts | Build datasets for device safety analytics and reporting |
| Patient advocacy groups | Track safety issues with devices used by their communities |

### What it does

This Actor collects medical device adverse event reports from openFDA and returns each event as a flat row with device, manufacturer, event type, and date.

- 🔍 **Device filters:** generic name, brand name, and manufacturer substring search
- 📅 **Date range:** event date from and to in YYYYMMDD format
- ⚠️ **Event type:** filter by Malfunction, Injury, Death, Other, or No answer provided
- 📊 **Flat output:** each event is one row, ready for CSV, JSON, Excel, or XML export

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with openFDA data

**📈 Monitor device safety trends.**

A safety researcher tracks monthly adverse events for insulin pumps by setting deviceName to INSULIN PUMP and a date range, then exports the data for trend analysis.

**🔍 Investigate manufacturer event patterns.**

A regulatory analyst filters by manufacturerName MEDTRONIC and eventType Injury to identify recurring issues for a post-market surveillance report.

**⚠️ Track death reports for specific devices.**

A patient advocate sets eventType to Death and deviceName to CATHETER to collect all reported deaths involving catheters for a safety petition.

**📊 Build a device safety dataset.**

A data analyst runs the Actor with no filters to collect a broad sample of device events, then loads the CSV into a database for exploratory analysis.

### Why choose this scraper

| | What you get |
|---|---|
| **No API key** | Uses the public openFDA endpoint, no registration required |
| **Up to 1M events** | Collect up to one million device events per run |
| **Flat schema** | Nested JSON is flattened into one row per event |
| **Flexible filters** | Combine device, manufacturer, event type, and date filters |

### How it compares

This Actor focuses on medical device adverse events from openFDA, while the competitors below cover broader FDA data or different event types.

| Feature | ParseForge | Clinical Trials & FDA Pipeline Intelligence Scraper | 💊 OpenFDA Drug Intelligence - Adverse Events + AI | 🚨 FDA Recall Intelligence - Drug, Device & Food |
|---|---|---|---|---|
| Medical device adverse events | Yes | Yes | Not listed | Not listed |
| Filter by device name | Yes | Not listed | Not listed | Not listed |
| Filter by manufacturer | Yes | Not listed | Not listed | Not listed |
| Filter by event type (Malfunction, Injury, Death) | Yes | Not listed | Not listed | Not listed |
| Date range filter | Yes | Not listed | Not listed | Not listed |
| AI severity scoring | Not listed | Not listed | Yes | Yes |
| Drug adverse events | Not listed | Not listed | Yes | Not listed |

### Configure the run

Drive the Actor with device name, brand, manufacturer, event type, and date range filters. Filters are applied as the API is queried, so only matching events reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

```json
{
 "maxItems": 10
}
```

A larger pull:

```json
{
 "maxItems": 200
}
```

### Pricing

Pay-per-result: **$0.024 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $2.40 |
| 1,000 results | $24.00 |
| 10,000 results | $240.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [openFDA Medical Device Events Scraper](https://apify.com/parseforge/openfda-device-event-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to openFDA through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=parseforge/openfda-device-event-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Check your filters. If you set a device name or manufacturer, make sure it is a substring that appears in the data. Also verify your date range is valid and not too narrow.

**Why is the run slow?**

Large date ranges or broad filters can return many events. Reduce the maximum items or narrow your filters to speed up the run.

**Why do I get an error about date format?**

Dates must be in YYYYMMDD format, for example 20230101. Check that your input has exactly 8 digits and no dashes or slashes.

**Why are some events missing fields?**

openFDA data is not always complete. Some events may not have a brand name or manufacturer reported. That is normal for the source.

### FAQ

| Question | Answer |
|---|---|
| What is openFDA? | openFDA is a public data platform from the U.S. Food and Drug Administration that provides access to FDA datasets, including medical device adverse event reports. |
| Do I need an API key? | No. This Actor uses the public openFDA endpoint, which does not require an API key or registration. |
| What data does each event include? | Each event includes device generic name, brand name, manufacturer, event type, and event date. The full field list is shown in the sample output. |
| How do I filter by device name? | Enter a substring in the Device Generic Name field, such as INFUSION PUMP. The filter matches any device whose generic name contains that text. |
| Can I filter by manufacturer? | Yes, use the Manufacturer Name field with a substring like MEDTRONIC or BAXTER. |
| What event types are available? | You can filter by Malfunction, Injury, Death, Other, or No answer provided. Leave the field empty to include all types. |
| How do I set a date range? | Use the Event Date From and Event Date To fields in YYYYMMDD format, for example 20200101 to 20231231. |
| What is the maximum number of events I can collect? | You can collect up to 1,000,000 events per run by setting the Maximum device events field. |
| What output formats are supported? | The Actor exports to CSV, JSON, Excel, and XML, depending on your Apify dataset settings. |
| Is this data updated in real time? | openFDA data is updated periodically by the FDA. The Actor fetches the latest available data at the time of the run. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by U.S. Food and Drug Administration. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

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

How many device adverse events to collect per run.

## `deviceName` (type: `string`):

Generic device name (substring), e.g. INFUSION PUMP, INSULIN PUMP, CATHETER.

## `brandName` (type: `string`):

Device brand / trade name.

## `manufacturerName` (type: `string`):

Device manufacturer name (substring), e.g. MEDTRONIC, BAXTER, ABBOTT.

## `eventType` (type: `string`):

Severity classification of the event.

## `dateFrom` (type: `string`):

Lower bound on the event date. Format: YYYYMMDD. Example: 20200101.

## `dateTo` (type: `string`):

Upper bound on the event date. Format: YYYYMMDD. Example: 20231231.

## Actor input object example

```json
{
  "maxItems": 10
}
```

# Actor output Schema

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

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/openfda-device-event-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 = { "maxItems": 10 }

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

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

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

```

## CLI example

```bash
echo '{
  "maxItems": 10
}' |
apify call parseforge/openfda-device-event-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/openfda-device-event-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/GE3SCcgwiQWAG5THn/builds/ud1ZqWqzh7wd9kHeK/openapi.json
