openFDA Drug Adverse Event Scraper avatar

openFDA Drug Adverse Event Scraper

Pricing

Pay per event

Go to Apify Store
openFDA Drug Adverse Event Scraper

openFDA Drug Adverse Event Scraper

๐Ÿ’Š Export FDA FAERS/openFDA drug adverse event reports by drug, reaction, manufacturer, country, date, and seriousness.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Share

Export FDA FAERS drug adverse event reports from the public openFDA Drug Event API.

Use this actor to monitor adverse event reports by drug name, active ingredient, manufacturer, reaction term, country, received date, and seriousness flag.

Important: FDA/openFDA adverse event reports are unvalidated safety reports. They do not prove causation and are not medical advice.

What does openFDA Drug Adverse Event Scraper do?

The actor calls https://api.fda.gov/drug/event.json and saves one dataset item per adverse event report.

It normalizes report identifiers, dates, seriousness, reporter country, patient fields, drug arrays, reaction arrays, and raw openFDA records.

It is designed for repeatable exports, dashboards, and compliance workflows that need the same query to run regularly.

Who is it for?

Pharmacovigilance teams use it to monitor safety reports for products or active ingredients.

Regulatory affairs teams use it to prepare periodic evidence snapshots.

Compliance and legal teams use it to collect traceable public FDA records.

Competitive intelligence teams use it to compare report patterns across drugs, manufacturers, or reactions.

Health data analysts use it as a clean Apify dataset wrapper around openFDA.

Why use this actor instead of direct API calls?

You get Apify scheduling, datasets, API access, integrations, retries, typed output, and pay-per-result billing in one reusable package.

The output includes a source URL and raw record so analysts can audit exactly which openFDA query produced each row.

Data source

The source is the official public openFDA Drug Adverse Event endpoint.

The API is public and does not require a login for basic use.

openFDA applies rate limits and query syntax rules, so very large or invalid searches can fail.

What data can I extract?

FieldDescription
safetyReportIdFDA safety report identifier
receivedDateFDA received date
seriousSerious/non-serious flag
drugNamesDrug/product names in the report
reactionTermsMedDRA reaction terms
drugsNormalized drug objects with openFDA fields
reactionsNormalized reaction objects
rawRecordFull original openFDA record

How much does it cost to scrape openFDA adverse event reports?

This actor uses pay-per-event pricing.

There is a small start charge per run and a per-report charge for each dataset item saved.

Because the actor uses a public API and no browser, compute costs are low for normal exports.

How to scrape drug adverse events

  1. Add one or more drug names in Drug names or active ingredients.
  2. Optionally add a reaction term, manufacturer, country, date range, or seriousness filter.
  3. Set Maximum reports to the number of reports you need.
  4. Run the actor.
  5. Export the dataset as JSON, CSV, Excel, or via API.

Input options

searchTerms searches patient.drug.medicinalproduct.

reactionTerm searches MedDRA preferred terms.

manufacturerName searches openFDA manufacturer fields.

country filters occurrence or primary source country.

dateFrom and dateTo filter FDA received dates.

rawSearch lets advanced users append official openFDA syntax.

Example input

{
"searchTerms": ["aspirin"],
"reactionTerm": "nausea",
"dateFrom": "2024-01-01",
"seriousness": "all",
"maxItems": 100,
"pageSize": 100
}

Example output

{
"safetyReportId": "12345678",
"receivedDate": "20240115",
"serious": true,
"drugNames": ["ASPIRIN"],
"reactionTerms": ["Nausea"],
"openfdaDisclaimer": "FDA/openFDA adverse event reports are unvalidated safety reports..."
}

Tips for better results

Use generic ingredients and brand names separately if you need broad coverage.

Keep date windows bounded for scheduled monitoring.

Use rawSearch only when you already know openFDA syntax.

Start with 100 reports before increasing the maximum.

Integrations

Send datasets to Google Sheets for analyst review.

Connect Apify webhooks to Slack for new scheduled monitoring runs.

Use Make or Zapier to move CSV exports into compliance workflows.

Use the Apify API to refresh BI dashboards.

API usage

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/openfda-drug-adverse-event-scraper').call({
searchTerms: ['aspirin'],
maxItems: 100
});
console.log(run.defaultDatasetId);

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_APIFY_TOKEN')
run = client.actor('automation-lab/openfda-drug-adverse-event-scraper').call(run_input={
'searchTerms': ['aspirin'],
'maxItems': 100,
})
print(run['defaultDatasetId'])

cURL

curl "https://api.apify.com/v2/acts/automation-lab~openfda-drug-adverse-event-scraper/runs?token=$APIFY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"searchTerms":["aspirin"],"maxItems":100}'

MCP integration

Use Apify MCP with Claude Desktop or Claude Code:

https://mcp.apify.com/?tools=automation-lab/openfda-drug-adverse-event-scraper

Claude Code setup:

$claude mcp add apify-openfda "https://mcp.apify.com/?tools=automation-lab/openfda-drug-adverse-event-scraper"

Claude Desktop JSON configuration:

{
"mcpServers": {
"apify-openfda": {
"url": "https://mcp.apify.com/?tools=automation-lab/openfda-drug-adverse-event-scraper"
}
}
}

Example prompts:

  • "Run the openFDA adverse event scraper for metformin reports from 2024."
  • "Export serious aspirin adverse event reports and summarize reaction terms."
  • "Monitor nausea reports for a drug portfolio every week."

Scheduling

Create an Apify task with your fixed input and schedule it daily, weekly, or monthly.

This is useful for recurring pharmacovigilance and regulatory monitoring.

Data quality notes

FAERS reports can contain duplicates, misspellings, incomplete patient details, and non-causal associations.

Always review FDA methodology before drawing conclusions.

The actor preserves raw records to support downstream validation.

Legality and responsible use

The data source is a public U.S. FDA/openFDA API.

Use the output responsibly and respect openFDA API policies.

Do not present adverse event reports as proof that a drug caused an event.

Troubleshooting

If you receive no results, broaden the drug name, remove the reaction filter, or check openFDA query syntax.

If a raw search fails, run it against the openFDA API docs first and then paste the validated expression.

If the API rate limits a run, reduce page size or retry later.

FAQ

Does this actor diagnose drug safety issues?

No. It exports public reports. Medical and causality interpretation requires qualified review.

Does it need an FDA API key?

No key is required for the basic public endpoint used by this actor.

Can I query multiple drugs?

Yes. Add several terms to searchTerms. The actor ORs those drug terms together.

Can I export more than 1,000 reports?

Yes. The actor paginates with openFDA limit and skip, subject to openFDA limits.

Can I keep the full FDA record?

Yes. Every row includes rawRecord.

Changelog

Initial version: public openFDA Drug Event API extraction with normalized report fields, raw records, and FDA disclaimer.

Support

Open an Apify issue if a valid openFDA query fails or if you need an output field exposed in a normalized column.