openFDA Drug Adverse Events & Recalls Scraper avatar

openFDA Drug Adverse Events & Recalls Scraper

Pricing

from $6.15 / 1,000 results

Go to Apify Store
openFDA Drug Adverse Events & Recalls Scraper

openFDA Drug Adverse Events & Recalls Scraper

Scrape FDA drug adverse event reports (FAERS) and drug recall actions from the official openFDA API. Get safety report ID, patient reactions, drugs, seriousness, recall class, reason and recalling firm. Export to JSON, CSV or Excel.

Pricing

from $6.15 / 1,000 results

Rating

5.0

(2)

Developer

Scrapers Lat

Scrapers Lat

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

20 hours ago

Last modified

Share

openFDA Drug Adverse Events & Recalls Scraper

openFDA Drug Adverse Events & Recalls Scraper

Here is one real result, with every field the actor returns (adverse-events shape). The drugs array is trimmed to 3 of its 8 real entries for readability; every value shown is real:

{
"safetyReportId": "10003349",
"reportType": "Spontaneous",
"serious": true,
"seriousnessReasons": ["Hospitalization", "Other"],
"receiveDate": "2014-03-12",
"receiptDate": "2014-03-12",
"primarySourceCountry": "US",
"occurCountry": "US",
"qualification": "5",
"patientSex": "Female",
"patientAge": null,
"reactions": ["Cerebrovascular accident", "Blood pressure increased", "Pain"],
"reactionCount": 3,
"drugs": [
{
"product": "AMLODIPINE",
"characterization": "Suspect",
"dosageText": "5 MG, UNK",
"indication": "HYPERTENSION",
"substances": ["AMLODIPINE BESYLATE", "AMLODIPINE", "AMLODIPINE BENZOATE"],
"action": "4",
"manufacturerName": "Pangea Pharmaceuticals, LLC",
"productNdc": "81279-133",
"applicationNumber": "NDA219531",
"rxcui": "2726058",
"unii": "864V2Q084H",
"pharmClass": ["Dihydropyridine Calcium Channel Blocker [EPC]", "Calcium Channel Blocker [EPC]", "Calcium Channel Antagonists [MoA]", "Cytochrome P450 3A Inhibitors [MoA]"],
"brandName": "SDAMLO",
"genericName": "AMLODIPINE",
"productType": "HUMAN PRESCRIPTION DRUG",
"route": "ORAL",
"authorizationNumber": null,
"batchNumber": "UNKNOWN",
"startDate": null,
"endDate": null
},
{
"product": "ASPIRIN",
"characterization": "Concomitant",
"dosageText": null,
"indication": "PRODUCT USED FOR UNKNOWN INDICATION",
"substances": ["ASPIRIN"],
"action": null,
"manufacturerName": "Unifirst First Aid Corporation",
"productNdc": "47682-456",
"applicationNumber": "M013",
"rxcui": "211874",
"unii": "R16CO5Y76E",
"pharmClass": ["Nonsteroidal Anti-inflammatory Drug [EPC]", "Platelet Aggregation Inhibitor [EPC]", "Cyclooxygenase Inhibitors [MoA]"],
"brandName": "BAYER GENUINE ASPIRIN",
"genericName": "ASPIRIN",
"productType": "HUMAN OTC DRUG",
"route": "ORAL",
"authorizationNumber": null,
"batchNumber": null,
"startDate": null,
"endDate": null
},
{
"product": "FIORICET",
"characterization": "Concomitant",
"dosageText": null,
"indication": "MIGRAINE",
"substances": ["BUTALBITAL", "ACETAMINOPHEN", "CAFFEINE"],
"action": null,
"manufacturerName": "Actavis Pharma, Inc.",
"productNdc": "52544-080",
"applicationNumber": "ANDA040885",
"rxcui": "889520",
"unii": "KHS0AZ4JVK",
"pharmClass": ["Barbiturate [EPC]", "Central Nervous System Stimulant [EPC]", "Methylxanthine [EPC]"],
"brandName": "FIORICET",
"genericName": "BUTALBITAL, ACETAMINOPHEN, AND CAFFEINE",
"productType": "HUMAN PRESCRIPTION DRUG",
"route": "ORAL",
"authorizationNumber": null,
"batchNumber": null,
"startDate": null,
"endDate": null
}
],
"drugCount": 8,
"companyNumber": "US-PURDUE-USA-2014-0111828",
"reactionOutcomes": [
{"reaction": "Cerebrovascular accident", "outcome": "Unknown"},
{"reaction": "Blood pressure increased", "outcome": "Unknown"},
{"reaction": "Pain", "outcome": "Unknown"}
],
"reporterCountry": "US",
"reporterQualification": "Consumer or non-health professional",
"senderOrganization": "FDA-Public Use",
"fulfillExpediteCriteria": true,
"patientWeight": null,
"patientDeathDate": null,
"transmissionDate": "2014-10-02",
"observedAt": "2026-08-10T14:41:09.459Z",
"error": null
}

The most complete openFDA drug scraper available. It returns every field the FDA drug adverse-event (FAERS) and drug enforcement (recall) datasets expose for each record, normalizes coded values to plain English, flattens every reported drug with its NDC, RxCUI, UNII and pharmacologic class, and gives you one keyword or raw openFDA expression plus a date range to target exactly the records you need.

📥 Input · 📤 Output · 💰 Pricing · ▶️ Examples

Apify Coverage Output Billing

Table of contents

What it does

The actor calls the official openFDA drug datasets, applies the filters you pass as input, paginates through the matching records, and writes one normalized record per report to the run's dataset. Pick the Adverse Events (FAERS) dataset for patient reaction reports, or Recalls / Enforcement for drug recall actions. Coded FDA values are translated to plain English (report type, seriousness reasons, reaction outcomes, reporter qualification, drug characterization), dates are normalized to YYYY-MM-DD, empty and N/A source values are returned as null, and every reported drug is flattened into a structured object with its NDC, application number, RxCUI, UNII, pharmacologic class, brand and generic name.

Data covers US FDA drug data only. It does not include device or food recalls (see the openFDA Food Recall & Enforcement Scraper for food).

Quickstart

Open the actor, paste this into the input, and press Run. It returns 10 recent adverse-event reports that name aspirin.

{
"maxRecords": 10,
"dataset": "events",
"searchQuery": "aspirin"
}

Leave searchQuery empty to pull the most recent records with no keyword filter (events default to serious reports; recalls default to drug product type). Switch dataset to recalls for the drug enforcement database. Every input field is optional.

Input reference

FieldTypeRequiredDefaultDescription
maxRecordsintegerno10Maximum records to collect. openFDA paginates with a skip offset up to 25000 per query; for larger pulls, narrow the search or date range.
datasetenumnoeventsWhich openFDA drug dataset to pull. events = Adverse Events (FAERS) patient reaction reports. recalls = drug enforcement (recall) actions.
searchQuerystringno(empty)A plain keyword, matched to the drug product name for events, or to the product description for recalls (for example aspirin, metformin). OR a raw openFDA field expression such as reason_for_recall:contamination or patient.reaction.reactionmeddrapt:"Nausea". A value containing field: is treated as a raw expression. Empty pulls the most recent records.
dateFromstringno(empty)Include records on or after this date (YYYY-MM-DD). For events this filters the FDA receive date, for recalls the report date.
dateTostringno(empty)Include records on or before this date (YYYY-MM-DD).
proxyConfigurationobjectno(none)Standard Apify proxy configuration. Not required; the openFDA API is not bot protected.

Output reference

One dataset item per record. The fields depend on the chosen dataset. Types: string, integer, boolean, string[], object, object array, or null when the source value is absent.

Adverse event fields (dataset = events)

FieldTypeDescription
safetyReportIdstringFDA FAERS safety report ID (unique per report).
reportTypestringReport type: Spontaneous, Report from study, Other, or Not available to sender.
seriousbooleantrue if the FDA flagged the report as serious.
seriousnessReasonsstring[]Reasons the report is serious: Death, Life Threatening, Hospitalization, Disabling, Congenital Anomaly, Other. null when not serious.
receiveDatestringDate the FDA first received the report (YYYY-MM-DD).
receiptDatestringDate of the most recent information received (YYYY-MM-DD).
primarySourceCountrystringCountry of the primary reporter.
occurCountrystringCountry where the event occurred.
qualificationstringRaw FDA reporter qualification code.
patientSexstringMale, Female, or Unknown.
patientAgestringPatient age with unit, for example 66 year, or null.
reactionsstring[]MedDRA reaction terms reported.
reactionCountintegerNumber of reactions reported.
drugsobject[]One object per reported drug (see drug sub-fields below).
drugCountintegerNumber of drugs reported.
companyNumberstringManufacturer/sender case number.
reactionOutcomesobject[]Per-reaction outcome pairs (reaction, outcome), for example Recovered/resolved, Fatal, Unknown.
reporterCountrystringCountry of the primary source reporter.
reporterQualificationstringReporter type: Physician, Pharmacist, Other health professional, Lawyer, Consumer or non-health professional.
senderOrganizationstringOrganization that sent the report to the FDA.
fulfillExpediteCriteriabooleantrue if the report met expedited reporting criteria.
patientWeightstringReported patient weight in kg, or null.
patientDeathDatestringReported patient death date (YYYY-MM-DD), or null.
transmissionDatestringDate the report was transmitted (YYYY-MM-DD).
observedAtstringISO 8601 timestamp of when the record was collected.
errorstringnull on success. On a failed run, a single item with a populated error field is written instead.

Drug sub-object fields (inside drugs[]): product, characterization (Suspect/Concomitant/Interacting), dosageText, indication, substances (string or string[]), action, manufacturerName, productNdc, applicationNumber, rxcui, unii, pharmClass (string[]), brandName, genericName, productType, route, authorizationNumber, batchNumber, startDate, endDate. Any absent value is null.

Recall fields (dataset = recalls)

FieldTypeDescription
recallNumberstringFDA recall number (unique per recall).
statusstringRecall status: Ongoing, Completed, Terminated, or Pending.
classificationstringHazard class: Class I, Class II, or Class III.
productTypestringProduct type. Drugs for this dataset.
productDescriptionstringFull labeled description of the recalled product.
reasonForRecallstringNarrative reason the product was recalled.
recallingFirmstringFirm or manufacturer subject to the recall.
firmStreetstringFirm street address (address lines joined), or null.
citystringCity of the recalling firm.
statestringTwo-letter state code of the recalling firm.
countrystringCountry of the recalling firm.
postalCodestringPostal code of the recalling firm.
distributionPatternstringFree-text description of where the product was distributed.
productQuantitystringQuantity of product in distribution.
codeInfostringLot codes, NDCs, expiration dates identifying affected product.
voluntaryMandatedstringWhether the recall was firm initiated (voluntary) or FDA mandated.
initialFirmNotificationstringHow the firm first notified the public or trade.
recallInitiationDatestringDate the firm started the recall (YYYY-MM-DD).
centerClassificationDatestringDate the FDA center classified the recall (YYYY-MM-DD).
reportDatestringDate the recall was first reported by the FDA (YYYY-MM-DD).
terminationDatestringDate the recall was terminated (YYYY-MM-DD), or null if still open.
eventIdstringFDA event ID grouping related recalls.
brandNamesstring[]openFDA brand name(s) for the product, or null.
genericNamesstring[]openFDA generic name(s) for the product, or null.
observedAtstringISO 8601 timestamp of when the record was collected.
errorstringnull on success; populated on a failed run.

Example output record

Real adverse-event record from a live run (input {"dataset":"events","searchQuery":"aspirin","maxRecords":10}). The drugs array is trimmed to 2 of its 9 real entries; every value shown is real:

{
"safetyReportId": "10003304",
"reportType": "Spontaneous",
"serious": false,
"seriousnessReasons": null,
"receiveDate": "2014-03-12",
"receiptDate": "2014-04-24",
"primarySourceCountry": "US",
"occurCountry": "US",
"qualification": "1",
"patientSex": "Female",
"patientAge": null,
"reactions": ["Drug hypersensitivity"],
"reactionCount": 1,
"drugs": [
{
"product": "DOXYCYCLINE HYCLATE",
"characterization": "Suspect",
"dosageText": "UNK",
"indication": null,
"substances": ["DOXYCYCLINE HYCLATE", "DOXYCYCLINE ANHYDROUS"],
"action": "5",
"manufacturerName": "Epic Pharma, LLC",
"productNdc": "42806-310",
"applicationNumber": "ANDA062269",
"rxcui": "1650143",
"unii": "19XTS3T51U",
"pharmClass": ["Tetracycline-class Drug [EPC]"],
"brandName": "DOXYCYCLINE HYCLATE",
"genericName": "DOXYCYCLINE HYCLATE",
"productType": "HUMAN PRESCRIPTION DRUG",
"route": "ORAL",
"authorizationNumber": "050007",
"batchNumber": null,
"startDate": null,
"endDate": null
},
{
"product": "ASPIRIN",
"characterization": "Suspect",
"dosageText": "UNK",
"indication": null,
"substances": ["ASPIRIN"],
"action": "5",
"manufacturerName": "Unifirst First Aid Corporation",
"productNdc": "47682-456",
"applicationNumber": "M013",
"rxcui": "211874",
"unii": "R16CO5Y76E",
"pharmClass": ["Nonsteroidal Anti-inflammatory Drug [EPC]", "Platelet Aggregation Inhibitor [EPC]", "Cyclooxygenase Inhibitors [MoA]"],
"brandName": "BAYER GENUINE ASPIRIN",
"genericName": "ASPIRIN",
"productType": "HUMAN OTC DRUG",
"route": "ORAL",
"authorizationNumber": null,
"batchNumber": null,
"startDate": null,
"endDate": null
}
],
"drugCount": 9,
"companyNumber": "US-PFIZER INC-2014063856",
"reactionOutcomes": [
{"reaction": "Drug hypersensitivity", "outcome": "Unknown"}
],
"reporterCountry": "US",
"reporterQualification": "Physician",
"senderOrganization": "FDA-Public Use",
"fulfillExpediteCriteria": false,
"patientWeight": null,
"patientDeathDate": null,
"transmissionDate": "2014-12-12",
"observedAt": "2026-08-10T14:41:09.458Z",
"error": null
}

Run via API and CLI

Start a run and wait for it to finish, then read the dataset. Replace <TOKEN> with your Apify API token.

Run synchronously and get dataset items in one call:

curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~openfda-drug-events-scraper/run-sync-get-dataset-items?token=<TOKEN>" \
-H "Content-Type: application/json" \
-d '{"dataset":"events","searchQuery":"aspirin","maxRecords":25}'

Start a run asynchronously:

curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~openfda-drug-events-scraper/runs?token=<TOKEN>" \
-H "Content-Type: application/json" \
-d '{"dataset":"recalls","searchQuery":"contamination","maxRecords":100}'

Apify CLI:

apify call scrapers_lat/openfda-drug-events-scraper \
--input '{"dataset":"recalls","dateFrom":"2024-01-01"}'

Fetch results

Every run writes to a dataset. Fetch items as JSON, CSV, or Excel by changing format:

# JSON
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=json"
# CSV
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=csv"
# Paginate large datasets
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&offset=1000&limit=1000"

<DATASET_ID> is returned as defaultDatasetId in the run object. Use offset and limit to page through large result sets. clean=true drops empty and internal fields.

Billing and limits

  • Pay per result. You are charged per record returned (result event). See the pricing tab for the current per-result price.
  • No charge on failure. If a run errors, the actor writes a single item with a populated error field and does not charge for it. Empty runs cost nothing.
  • Spend cap respected. Set maxTotalChargeUsd on the run; once reached, the actor stops emitting and charging further billable results.
  • Free Apify plans are capped at 10 records per run. Upgrade for higher maxRecords.
  • Source pagination ceiling. openFDA allows a skip offset up to 25000 per query. For pulls beyond that, split the work with narrower filters or date ranges.

FAQ and troubleshooting

A run returned 0 records. Why? The search combination matched nothing in the source. Loosen the keyword or widen the date range. Zero-result runs are not charged.

What is the difference between adverse events and recalls? Adverse events (FAERS) are individual patient reaction reports. Recalls are drug enforcement actions where a firm removed a product from the market. Choose with the dataset input.

What is the difference between searchQuery keyword mode and raw mode? A plain word (for example aspirin) is matched to the drug product name (events) or product description (recalls). A value containing field: (for example reason_for_recall:contamination) is passed through as a raw openFDA search expression.

Why are some drug fields null? openFDA only harmonizes drugs it can match to its product database. Free-text drug names reported by consumers often have no NDC, RxCUI or class. Missing source values are returned as null, never invented.

Which date does the date range filter apply to? For events, the FDA receive date. For recalls, the report date.

Is this an official FDA tool? No. This actor is independent and has no affiliation with the FDA or openFDA. It reads only data that is publicly available through the openFDA API. Use it in accordance with the openFDA terms of service.

More scrapers at scrapers.lat

Built and maintained by scrapers.lat, where we publish scrapers for US and Latin American public platforms: company registries, government data, finance, e-commerce and more. Browse the catalog or request a custom scraper at scrapers.lat.


Independent tool, not affiliated with the FDA or openFDA. Accesses only publicly available openFDA data. Use in accordance with the openFDA terms of service.