openFDA Drug & Food Safety Scraper avatar

openFDA Drug & Food Safety Scraper

Pricing

from $2.00 / 1,000 results

Go to Apify Store
openFDA Drug & Food Safety Scraper

openFDA Drug & Food Safety Scraper

Scrape FDA drug adverse events, drug labels, food recalls, and medical device reports. Uses the free openFDA API. No API key, no browser needed. 20M+ drug safety records available.

Pricing

from $2.00 / 1,000 results

Rating

0.0

(0)

Developer

deusex machine

deusex machine

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

17 days ago

Last modified

Categories

Share

Pull drug adverse events, drug labels, food recalls, and medical device reports from the openFDA API. Pure HTTP, no browser.

What data does it extract?

FieldDescription
idUnique record identifier (safety report ID, recall number, etc.)
datasetWhich dataset the record came from (drug_events, drug_labels, food_recalls, device_events)
titleDrug name, product description, or device name
dateEvent or report date (YYYY-MM-DD)
severitySeverity level (e.g. hospitalization, death, non-serious, FDA classification)
descriptionAdverse reactions, recall reason, or event narrative
detailsDataset-specific fields (drugs involved, patient demographics, manufacturer, etc.)
rawOriginal unmodified openFDA record

Use cases

  • Pharmacovigilance monitoring -- Track adverse events for a specific drug or active ingredient over time.
  • Food safety research -- Pull recall data by company, product type, or date range.
  • Medical device surveillance -- Monitor reported device failures and patient injuries.
  • Regulatory compliance -- Build dashboards of FDA enforcement actions for compliance teams.
  • Competitive intelligence -- Compare adverse event profiles across competing drugs.

How to use

Search for aspirin adverse events:

{
"dataset": "drug_events",
"searchQuery": "openfda.brand_name:aspirin",
"maxResults": 50
}

Food recalls from a specific company:

{
"dataset": "food_recalls",
"searchQuery": "recalling_firm:\"Nestle\"",
"maxResults": 100,
"dateFrom": "20240101",
"dateTo": "20241231"
}

Pacemaker device events:

{
"dataset": "device_events",
"searchQuery": "device.generic_name:pacemaker",
"maxResults": 200
}

Input parameters

ParameterTypeDefaultDescription
datasetenumdrug_eventsWhich dataset to query: drug_events, drug_labels, food_recalls, device_events
searchQuerystring(empty)openFDA search syntax (e.g. openfda.brand_name:aspirin)
maxResultsinteger100Number of records to fetch (1-1000)
dateFromstring(none)Start date filter in YYYYMMDD format
dateTostring(none)End date filter in YYYYMMDD format

Full query syntax docs: https://open.fda.gov/apis/query-syntax/

Output example

{
"id": "10284719",
"dataset": "drug_events",
"title": "ASPIRIN",
"date": "2024-03-15",
"severity": "hospitalization",
"description": "Nausea; Vomiting; Gastrointestinal haemorrhage",
"details": {
"drugs": ["ASPIRIN"],
"reactions": ["Nausea", "Vomiting", "Gastrointestinal haemorrhage"],
"reporterCountry": "US",
"patientAge": "67",
"patientSex": "Female"
},
"raw": { "..." : "..." }
}

Performance & cost

  • Fetches up to 100 records per API call with automatic pagination.
  • 1,000 records typically complete in under 30 seconds.
  • No browser needed -- runs on minimal compute. A typical run costs less than $0.01 in Apify platform credits.

FAQ

What's the maximum number of records I can get? The actor caps at 1,000 per run. The openFDA API itself has a hard skip limit of 26,000 records per query. For larger datasets, narrow your search with date ranges.

Do I need an API key? No. The openFDA API is free and public. No authentication needed.

Can I combine multiple search conditions? Yes. Use +AND+ syntax, e.g. patient.drug.medicinalproduct:ibuprofen+AND+serious:1.

Why did I get zero results? The search query might be malformed. Check the openFDA query syntax docs. Also verify the field name matches your chosen dataset.