Openfda Scraper
Pricing
Pay per event
Openfda Scraper
Extract FDA drug adverse event reports by drug name. Get reactions, patient outcomes, demographics, and report details. Filter by serious events only.
Pricing
Pay per event
Rating
0.0
(0)
Developer

Stas Persiianenko
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Share
OpenFDA Drug Events Scraper
Extract FDA drug adverse event reports from the OpenFDA database. Search by drug name and get reactions, outcomes, patient demographics, reporter types, and seriousness indicators.
What does OpenFDA Drug Events Scraper do?
OpenFDA Drug Events Scraper searches the FDA Adverse Event Reporting System (FAERS) database and extracts structured adverse event reports. For each drug, it returns the reported reactions, seriousness level, patient age/sex, reporter type (physician, pharmacist, consumer), and outcome details.
Filter for serious events only (hospitalization, death, disability) to focus on the most significant reports.
Why use FDA adverse event data?
The FDA FAERS database contains millions of adverse event reports dating back to 2004. Use cases include:
- Pharmacovigilance — monitor drug safety signals and adverse reaction patterns
- Drug research — analyze side effect profiles for pharmaceutical research
- Clinical analysis — study adverse event demographics and outcomes
- Regulatory intelligence — track FDA safety reports for compliance and risk management
- Academic research — build datasets for epidemiology and drug safety studies
- Healthcare analytics — evaluate drug safety for formulary decisions
How much does it cost?
| Event | Price |
|---|---|
| Run started | $0.001 |
| Report extracted | $0.001 per report |
Example costs:
- 50 adverse events for aspirin: ~$0.051
- 100 serious events for ibuprofen: ~$0.101
- 500 reports for a new drug: ~$0.501
Platform costs are minimal. The OpenFDA API is free (40 requests/minute without key).
Input parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
drugName | string | Brand or generic drug name | Required |
seriousOnly | boolean | Only return serious adverse events | false |
maxResults | integer | Maximum reports to extract (1-1000) | 100 |
Input example
{"drugName": "aspirin","seriousOnly": true,"maxResults": 50}
Output example
Each adverse event report is returned as a JSON object:
{"reportId": "10003349","drugName": "MORPHINE SULFATE","drugNames": ["MORPHINE SULFATE", "ASPIRIN", "LISINOPRIL"],"reactions": ["Cerebrovascular accident", "Blood pressure increased", "Pain"],"serious": true,"seriousOutcomes": ["Hospitalization", "Other serious"],"receiveDate": "20100101","country": "US","patientAge": 72,"patientSex": "Female","patientWeight": 65.5,"reporterType": "Physician","companynumb": "PHEH2009US00001","scrapedAt": "2026-03-03T05:10:00.000Z"}
Output fields
| Field | Type | Description |
|---|---|---|
reportId | string | FDA safety report identifier |
drugName | string | Primary drug name |
drugNames | string[] | All drugs in the report |
reactions | string[] | Reported adverse reactions (MedDRA terms) |
serious | boolean | Whether the event was classified as serious |
seriousOutcomes | string[] | Death, Hospitalization, Disability, Life-threatening, etc. |
receiveDate | string | Date the report was received (YYYYMMDD) |
country | string | Country where the event occurred |
patientAge | number | Patient age at event onset |
patientSex | string | Patient sex (Male/Female/Unknown) |
patientWeight | number | Patient weight in kg |
reporterType | string | Who reported: Physician, Pharmacist, Consumer, etc. |
companynumb | string | Company report number |
scrapedAt | string | ISO timestamp of extraction |
How to use the OpenFDA API
Python
from apify_client import ApifyClientclient = ApifyClient("YOUR_API_TOKEN")run = client.actor("automation-lab/openfda-scraper").call(run_input={"drugName": "aspirin","seriousOnly": True,"maxResults": 100,})for event in client.dataset(run["defaultDatasetId"]).iterate_items():reactions = ", ".join(event["reactions"][:3])outcomes = ", ".join(event["seriousOutcomes"])print(f"Report {event['reportId']}: {reactions}")print(f" Patient: age={event['patientAge']} sex={event['patientSex']}")print(f" Outcomes: {outcomes}")
Node.js
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });const run = await client.actor('automation-lab/openfda-scraper').call({drugName: 'aspirin',seriousOnly: true,maxResults: 100,});const { items } = await client.dataset(run.defaultDatasetId).listItems();items.forEach(event => {console.log(`${event.reportId}: ${event.reactions.join(', ')}`);});
Integrations
Connect OpenFDA Scraper to apps:
- Google Sheets — export adverse event data for analysis
- Slack — alerts for new serious adverse events
- Zapier / Make — automate pharmacovigilance workflows
- Webhook — pipe data to your safety monitoring system
Tips and best practices
- Serious events filter — use
seriousOnly: trueto focus on hospitalization, death, and disability reports. - Drug name variations — try both brand and generic names (e.g., "Tylenol" vs "acetaminophen").
- Multiple drugs per report — many reports list several drugs. The
drugNamesarray shows all drugs the patient was taking. - MedDRA terms — reactions use standardized MedDRA medical terminology.
- Report ≠ causation — adverse event reports indicate temporal association, not proven causation.
- Date format —
receiveDateuses YYYYMMDD format (e.g., "20240115"). - API limits — free tier: 40 requests/minute, max 5000 records per query via skip pagination.
FAQ
Q: How many reports are in the database? A: FAERS contains over 20 million adverse event reports dating back to 2004, growing by ~2 million per year.
Q: Does it need an API key? A: No. The OpenFDA API is free without authentication (40 requests/minute). An API key raises the limit to 240/minute.
Q: Can I search by reaction instead of drug? A: This scraper searches by drug name. The OpenFDA API does support reaction-based queries for advanced use cases.
Q: Is this data the same as clinical trial data? A: No. FAERS contains post-market surveillance reports — voluntary reports submitted after a drug is on the market.