OrbTop

openFDA Drug & Device Data Crawler

BUSINESSLEAD GENERATIONOTHER

openFDA Drug & Device Data Crawler

Query the FDA's public API for drug adverse events, recalls, drug labels, NDC codes, device events, and 510(k) clearances. Eight datasets, one actor, no authentication required.

Features

  • Queries all eight openFDA endpoints — drug adverse events (FAERS), drug recalls, drug labels (SPL), drug approvals (Drugs@FDA), NDC directory, device adverse events (MAUDE), 510(k) clearances, and device recalls
  • Filters by drug name, manufacturer, and date range — field mapping is handled per-endpoint automatically
  • Limits adverse event results to serious reports — death, hospitalization, life-threatening outcomes, and permanent disability
  • Filters recalls by severity class — Class I (risk of death), Class II (moderate), or Class III (least severe)
  • Paginates past the 25,000-record API cap — uses date-range windowing for large result sets
  • Decodes numeric codes into readable values — drug characterization, sex, reaction outcome, and reporter qualification are translated from FDA codes to plain text
  • Returns a unified schema across all endpoints — adverse event fields and recall fields coexist in each record; unused fields are empty rather than absent

Use Cases

Who is pulling this data and why?

  • Pharmacovigilance analysts monitoring adverse event signals for a specific drug or drug class
  • Compliance teams tracking open recalls by class and distribution region before a product launch
  • Healthcare data engineers building pipelines that enrich internal drug databases with FAERS data
  • Medical device researchers screening 510(k) clearance history for a competitor's device portfolio
  • Insurance underwriters assessing liability exposure tied to Class I recall history for a manufacturer
  • Academic researchers studying patient demographics and reaction outcomes across a drug category

How It Works

  1. Select an FDA dataset endpoint and apply filters (drug name, manufacturer, date range, severity).
  2. The actor constructs the openFDA search= query, paginates through results in batches of 100, and respects the 240 req/min rate limit with a 250ms delay between requests.
  3. Raw API records are decoded — numeric sex/outcome/characterization codes become human-readable strings, dates are normalized to YYYY-MM-DD.
  4. Each record is written to the Apify dataset in the unified schema. Adverse event fields are populated for drug/event and device/event runs; recall fields are populated for enforcement and recall runs.

Input

{
  "endpoint": "drug/event",
  "drugName": "metformin",
  "manufacturer": "",
  "dateFrom": "2023-01-01",
  "dateTo": "2023-12-31",
  "seriousOnly": true,
  "recallClass": "",
  "maxItems": 500
}
Field Type Default Description
endpoint string drug/event FDA dataset to query. See endpoint table below.
drugName string Drug brand or generic name. Partial match supported.
manufacturer string Manufacturer or recalling firm name. Partial match supported.
dateFrom string Start date (YYYY-MM-DD). For adverse events, filters by FDA receive date.
dateTo string End date (YYYY-MM-DD). Defaults to today when dateFrom is set.
seriousOnly boolean false Return only serious reports (adverse event endpoints only).
recallClass string Class I, Class II, or Class III. Recall endpoints only.
maxItems integer 100 Maximum records to return.

Available Endpoints

Value Dataset Records Available
drug/event Drug Adverse Events (FAERS) 20M+
drug/enforcement Drug Recalls 18K+
drug/label Drug Labels (SPL) 257K+
drug/drugsfda Drug Approvals (Drugs@FDA) 29K+
drug/ndc NDC Directory 134K+
device/event Device Adverse Events (MAUDE) 24M+
device/510k Device 510(k) Clearances 174K+
device/recall Device Recalls

Output Fields

{
  "report_id": "12345678",
  "endpoint": "drug/event",
  "drug_name": "METFORMIN HYDROCHLORIDE",
  "drug_active_ingredients": ["METFORMIN HYDROCHLORIDE"],
  "drug_manufacturer": "Amneal Pharmaceuticals",
  "drug_characterization": "Suspect",
  "drug_indication": "TYPE 2 DIABETES MELLITUS",
  "drug_route": "Oral",
  "reactions": ["Nausea", "Vomiting", "Lactic acidosis"],
  "reaction_outcomes": ["Recovered", "Recovered", "Hospitalized"],
  "serious": true,
  "seriousness_death": false,
  "seriousness_hospitalization": true,
  "patient_age": "67",
  "patient_sex": "Female",
  "report_country": "US",
  "report_source": "Physician",
  "receive_date": "2023-04-18",
  "recall_number": "",
  "recall_class": "",
  "recall_status": "",
  "recall_reason": "",
  "recall_product": "",
  "recall_firm": "",
  "recall_state": "",
  "recall_distribution": ""
}
Field Description
report_id Unique report or record identifier (FAERS safety report ID, recall number, NDC code, etc.)
endpoint FDA dataset this record came from
drug_name Drug brand name or generic name
drug_active_ingredients Active ingredient(s) in the drug
drug_manufacturer Drug manufacturer or reporting company
drug_characterization Role of drug in the report: Suspect, Concomitant, or Interacting
drug_indication Condition the drug was prescribed for
drug_route Route of administration (Oral, Intravenous, Topical, etc.)
reactions Adverse reaction terms (MedDRA preferred terms)
reaction_outcomes Outcome per reaction: Recovered, Recovering, Not Recovered, Recovered with Sequelae, Fatal, Unknown
serious Whether the report is classified as serious
seriousness_death Whether the event resulted in death
seriousness_hospitalization Whether the event resulted in hospitalization
patient_age Patient age at time of event
patient_sex Patient sex (Male, Female, Unknown)
report_country Country where the report originated
report_source Reporter type (Physician, Pharmacist, Consumer, etc.)
receive_date Date the FDA received the report or recall initiation date (YYYY-MM-DD)
recall_number FDA recall number (recall and enforcement records)
recall_class Class I, II, or III
recall_status Ongoing, Completed, or Terminated
recall_reason Reason for the recall
recall_product Description of the recalled product
recall_firm Firm initiating or subject to the recall
recall_state State of the recalling firm
recall_distribution Distribution pattern of the recalled product

FAQ

How much data is available for drug adverse events? The openFDA Drug Adverse Events (FAERS) dataset contains over 20 million reports accumulated since the 1960s. The Device Adverse Events (MAUDE) dataset has over 24 million. This actor paginates through results up to the maxItems limit you set.

Does this actor require an API key? No. The openFDA API is a free government service that requires no authentication. Without a key, the rate limit is 240 requests per minute. This actor stays within that limit and does not currently support API key injection.

What happens when results exceed 25,000 records? The openFDA API has a hard cap of 25,000 on the skip offset (skip + limit must not exceed 25,000). This actor detects that boundary and stops pagination at the cap. For datasets larger than 25,000, use a narrow date range to retrieve specific windows of data across multiple runs.

Can I get only deaths or hospitalizations? Set seriousOnly: true to restrict drug/event and device/event results to serious reports. Within those results, seriousness_death and seriousness_hospitalization are boolean fields you can filter on in your downstream pipeline. The actor does not currently support single-outcome filtering as a direct input parameter.

Are all fields present in every record? The actor uses a unified schema across all eight endpoints. Fields that do not apply to a given endpoint (e.g., recall fields on an adverse event record) are returned as empty strings or empty arrays rather than omitted. This keeps downstream schema handling consistent.

Need More Features?

Open an issue or contact us at apify.com/jungle_synthesizer/openfda-drug-crawler to request additional endpoints, new filter parameters, or a custom build.

Why Use This Actor

  • No scraping, no rate-limit workarounds — the openFDA API returns clean JSON; this actor handles pagination, decoding, and schema normalization so you do not have to
  • Eight datasets in one interface — adverse events, recalls, labels, approvals, NDC codes, and device data are all accessible through the same input format
  • Numeric codes are decoded — FDA uses integer codes for sex, reaction outcome, drug characterization, and reporter type; this actor converts them to readable strings before writing to your dataset