openFDA Drug & Food Safety Scraper avatar

openFDA Drug & Food Safety Scraper

Pricing

Pay per usage

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

Pay per usage

Rating

0.0

(0)

Developer

oscar lira

oscar lira

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Categories

Share

Apify actor that pulls structured data from the openFDA API — no browser required, pure HTTP.

Supported Datasets

KeyEndpointDescription
drug_events/drug/eventAdverse event reports for drugs
drug_labels/drug/labelDrug product labeling (SPL)
food_recalls/food/enforcementFood recall enforcement reports
device_events/device/eventMedical device adverse events

Input Parameters

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

Search Query Examples

openfda.brand_name:aspirin
patient.drug.medicinalproduct:ibuprofen+AND+serious:1
recalling_firm:"Nestle"
device.generic_name:pacemaker

See full syntax: https://open.fda.gov/apis/query-syntax/

Output

Every record is normalized to a common shape:

{
"id": "...",
"dataset": "drug_events",
"title": "ASPIRIN",
"date": "2024-01-15",
"severity": "hospitalization",
"description": "Nausea; Vomiting; Headache",
"details": { ... },
"raw": { ... }
}
  • details — curated fields specific to the dataset
  • raw — the original unmodified openFDA record

Pagination

The openFDA API allows a maximum skip of 26,000 per query. The actor pages automatically within this limit. To access more data, narrow your search with date ranges or additional filters.

Running Locally

npm install
echo '{ "dataset": "drug_events", "searchQuery": "openfda.brand_name:aspirin", "maxResults": 10 }' > input.json
npx apify-cli run -i input.json