Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

FDA Data Scraper — openFDA Recalls, Adverse Events & Drug Labels (No API Key)

Apify Actor No API key required Pay per result Category Export

One click, no setup — the hosted Actor turns the official openFDA datasets into clean, flat, export-ready rows.

Scrape U.S. FDA drug, device and food data straight from the official openFDA API — no API key, no login. This FDA data scraper pulls drug recalls, drug adverse events (20M+ records), drug labels, device recalls, device adverse events (24M+ records), 510(k) clearances and food recalls into clean, flat, structured JSON — with recalling firm, product description, recall reason, Class I/II/III classification, status and report dates — filtered with openFDA's own search syntax. Because it reads the official government open-data API there are no captchas and no fragile HTML parsing, and one run can return tens of thousands of records.

Pick a dataset, add an optional searchQuery (e.g. classification:"Class I" or recalling_firm:pfizer), and export an FDA safety dataset for legal case-sourcing, regulatory compliance monitoring, drug-safety research and pharmacovigilance. You only need a free Apify account.

This is a documentation & usage guide. The scraper itself runs on the Apify platform — open it here.


📚 Table of contents


🎁 What you get

Flat, structured JSON records. The common enforcement/recall fields surfaced across datasets:

Field Description
_dataset The openFDA dataset this record came from (e.g. drug/enforcement)
recalling_firm Company that initiated the recall (enforcement datasets)
product_description Description of the recalled or reported product
reason_for_recall Stated reason for the recall
classification FDA recall classification (Class I, II or III)
status Recall status (Ongoing, Completed, Terminated)
recall_number FDA-assigned unique recall identifier
report_date Date the recall was reported (YYYYMMDD)
recall_initiation_date Date the recall was initiated (YYYYMMDD)
voluntary_mandated Whether the recall was voluntary or FDA-mandated
distribution_pattern Geographic distribution of the recalled product
product_quantity Quantity of product in distribution
city / state / country Location of the recalling firm
scrapedAt ISO 8601 timestamp of when the record was scraped

ℹ️ Note: enforcement/recall datasets share the fields above. Other datasets return their own native openFDA schema — e.g. drug/event and device/event return the full adverse-event report (patient, reaction, drug/device details), drug/label returns SPL label sections, and device/510k returns clearance metadata. Every native openFDA field for the chosen dataset is preserved.

  • 💊 9 FDA datasets — drug recalls, drug adverse events, drug labels, device recalls, device adverse events, device 510(k) clearances, food recalls, food adverse events, and animal & veterinary adverse events.
  • 🛡️ Official openFDA API — reliable, never blocked, no captchas, no HTML breakage on redesigns.
  • 🔎 Powerful filtering — openFDA search syntax by recalling_firm, classification, report_date ranges, product type and any other field.
  • 📈 Massive scale — 20M+ drug and 24M+ device adverse events; tens of thousands of records per run.
  • 🔓 No API key / no login — an openFDA key is fully optional (higher rate limits only); just a free Apify account.

💡 Use cases

  • Legal case sourcing — product-liability and drug-injury firms monitor recalls and adverse events at scale to identify plaintiffs and cases.
  • Regulatory compliance — maintain an always-current FDA enforcement feed for your own product categories and classifications.
  • Competitor & market intelligence — track competitor recalls, adverse-event reports and 510(k) clearances.
  • Drug & device safety — pharmacovigilance and post-market surveillance from FDA's official adverse-event data.
  • Risk & insurance analytics — quantify recall frequency and severity by firm, product type and classification.
  • Journalism & watchdogs — surface Class I recalls and safety trends as they are reported.
  • Research datasets — build reproducible, exportable FDA datasets for academic or health-tech work.

🚀 Quick start (4 ways)

1. Apify Console (no code)

  1. Open the Actor: apify.com/logiover/fda-data-scraper
  2. Click Try for free.
  3. Leave everything empty for the most recent drug recalls, or pick a dataset and add a searchQuery filter, then click Start.
  4. When the run finishes, open the Output tab and export to CSV / JSON / Excel.

2. Apify CLI

npm i -g apify-cli
apify login
apify call logiover/fda-data-scraper

3. API / curl (run sync, get dataset items)

curl -X POST "https://api.apify.com/v2/acts/logiover~fda-data-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "dataset": "drug/enforcement",
    "searchQuery": "classification:\"Class I\"",
    "maxRecords": 10000
  }'

4. apify-client (JavaScript & Python)

import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('logiover/fda-data-scraper').call({
    dataset: 'device/recall',
    searchQuery: 'recalling_firm:medtronic',
    maxRecords: 0,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("logiover/fda-data-scraper").call(run_input={
    "dataset": "device/recall",
    "searchQuery": "recalling_firm:medtronic",
    "maxRecords": 0,
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

More end-to-end snippets: examples/cli.md · examples/api-curl.md · examples/javascript.md · examples/python.md

📥 Input

Pick a dataset — everything else is optional. Empty input returns the most recent drug recalls.

Field Type Default Description
dataset enum drug/enforcement Which openFDA dataset: drug/enforcement (drug recalls), drug/event (drug adverse events, 20M+), drug/label (drug labels, 258K), device/recall, device/event (device adverse events, 24M+), device/510k (510(k) clearances), food/enforcement (food recalls), food/event (food adverse events), animalandveterinary/event.
sort enum newest newest, oldest (by the dataset's primary date field) or default (openFDA native order).
searchQuery string "" Optional openFDA search filter, e.g. classification:"Class I", recalling_firm:pfizer, report_date:[20260101+TO+20261231]. Empty = all records.
maxRecords integer Max records to save. 0 = all available for the query (openFDA caps a single query at ~26,000 — narrow with searchQuery for more).
apiKey string (secret) Optional openFDA API key for higher rate limits. The Actor works fine without it.
proxyConfiguration object auto Leave empty to let the Actor auto-pick a working proxy group.

Example — the most serious (Class I) drug recalls

{ "dataset": "drug/enforcement", "searchQuery": "classification:\"Class I\"", "maxRecords": 10000 }

Example — every device recall for a specific firm

{ "dataset": "device/recall", "searchQuery": "recalling_firm:medtronic", "maxRecords": 0 }

Example — drug adverse events in a date range (pharmacovigilance)

{ "dataset": "drug/event", "searchQuery": "receivedate:[20260101+TO+20261231]", "maxRecords": 5000 }

Search filter syntax: openFDA uses a simple field:value syntax. Combine terms with +AND+, use quotes for phrases (classification:"Class I"), and use [start+TO+end] for date/number ranges. Field names differ per dataset — see the openFDA field reference for each endpoint.

📤 Output

One flat record per FDA row. Trimmed sample (drug recall):

{
  "_dataset": "drug/enforcement",
  "recalling_firm": "Example Pharma Inc.",
  "product_description": "Example Drug 10mg Tablets, 100-count bottle",
  "reason_for_recall": "Failed dissolution specifications",
  "classification": "Class I",
  "status": "Ongoing",
  "city": "Trenton",
  "state": "NJ",
  "country": "United States",
  "recall_number": "D-1234-2026",
  "report_date": "20260115",
  "recall_initiation_date": "20260108",
  "voluntary_mandated": "Voluntary: Firm initiated",
  "scrapedAt": "2026-07-06T08:30:00.000Z"
}

The default FDA Records dataset view shows dataset, recalling firm, product, reason, classification, status and report date as a sortable table in the Apify UI.

🔌 Integrations & automation

  • Schedules — run daily for an always-fresh FDA recalls and adverse-events feed; recalls update constantly.
  • Webhooks — fire on run finish to trigger compliance alerts or a database load.
  • Google Sheets / Excel — push records to a spreadsheet for monitoring dashboards.
  • Cloud storage — export to Amazon S3, Google Cloud Storage or your data warehouse via the API.
  • No-code automation — connect to Zapier, Make, n8n or Pipedream through Apify to build regulatory-monitoring workflows.

📁 Export formats

Every dataset can be downloaded or fetched via the API as JSON, CSV, Excel (XLSX), JSONL, XML or HTML.

❓ FAQ

Do I need an FDA or openFDA API key?

No. The Actor uses the public openFDA API, which is accessible without an API key, account or login. You can optionally add a free openFDA key for higher rate limits, but it is not required.

Can I scrape FDA data without an API key or login?

Yes. There is no FDA account, login or API key required — only an Apify account. The Actor pulls publicly available FDA records over the official openFDA API.

Is this an openFDA API alternative?

It is a ready-to-run openFDA data extraction tool that calls the official openFDA API for you, so you skip writing code, handling pagination and managing rate limits — a practical openFDA API alternative for non-developers who just want the data in CSV or JSON.

Which FDA datasets can I scrape?

Nine: drug recalls (enforcement), drug adverse events (20M+), drug labels (258K), device recalls, device adverse events (24M+), device 510(k) clearances, food recalls, food adverse events, and animal & veterinary adverse events.

How do I get only Class I FDA drug recalls?

Pick the drug/enforcement dataset and set searchQuery to classification:"Class I" to export just the most serious drug recalls.

Can I pull all FDA recalls for a specific company?

Yes. Use a searchQuery like recalling_firm:pfizer on any enforcement dataset to collect every recall linked to that firm.

How much data can I get in one run?

Tens of thousands of records. openFDA caps a single query at roughly 26,000 records — to extract more, split your work with narrower searchQuery filters (e.g. by date range or firm) across multiple runs.

How do I export openFDA data to CSV or JSON?

Pick a dataset, run the Actor, then download the results as CSV, JSON, Excel or XML from the dataset — or pull them via the Apify API.

How fast is it and does it get blocked?

It's fast and reliable — because it uses the official API there are no captchas or anti-bot blocks. The Actor auto-selects a working proxy group to avoid openFDA's shared-pool rate limits.

Is it free?

The Actor runs on Apify's pay-per-result model and can be tried on the free tier first — you're only charged for the records saved. See the Pricing tab on the Actor page.

Is it legal to scrape FDA data?

Yes — openFDA is the FDA's official open-data API, intended for public programmatic access. The Actor collects only publicly available data. You are responsible for how you use and present it.

🔗 Related actors

Building a compliance, health or public-data research pipeline? Pair the FDA scraper with these:

👉 Browse all logiover actors on Apify Store — 180+ scrapers across real estate, jobs, crypto, social media & B2B data.


📄 Documentation only — this repository contains no source code. The Actor runs on the Apify platform. ▶️ Run it: https://apify.com/logiover/fda-data-scraper

Licensed under the MIT License · © 2026 logiover

About

FDA data scraper — openFDA drug/device/food recalls, adverse events & 510(k) clearances as JSON/CSV. No API key, no login.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors