Research FDA drug recalls by firm and year in Python

Compare reported recall records with distinct events, then inspect the product and reason using a genuine sample and copyable Python.

Research a firm's reported recalls

A pharmaceutical research analyst wants to review the products and reasons behind a firm's reported recalls. This example selects the exact source firm name Aurobindo Pharma USA Inc and report years 2024 and 2025. The prepared reference supplies recall numbers, event relationships, classifications, dates and original descriptions in one table.

The optional input.csv contains those two research selections. The same selections appear in the research_requests list in the Python code below. These are real firm/year selections; no recall observations are invented.

Download recalls.csv into your working folder. This is a genuine subset of the paid product: all six records for that exact firm name and those report years, with every main-table column unchanged. The complete download covers all firms in the retained export and includes four companion tables.

Code example

Run the code in a notebook cell, IPython or a Python script. It uses the Python standard library. It first compares recall records and distinct events, then prints the product description and reason for the selected Class I record.

Paths are relative to your working folder; use from pathlib import Path; print(Path.cwd()) to check it, or supply full paths.

Python 3.10+ · Jupyter, IPython or a script
"""Compare reported recall records and events for one exact firm name."""
import csv
from collections import Counter
from pathlib import Path

folder = Path('.')
research_requests = [
    {'recalling_firm': 'Aurobindo Pharma USA Inc', 'report_year': '2024'},
    {'recalling_firm': 'Aurobindo Pharma USA Inc', 'report_year': '2025'},
]
with (folder / 'recalls.csv').open(newline='', encoding='utf-8') as source:
    recalls = list(csv.DictReader(source))

results = []
for request in research_requests:
    matched = [r for r in recalls if all(r[k] == v for k, v in request.items())]
    classes = Counter(r['classification'] for r in matched)
    result = dict(request, recall_records=len(matched),
                  distinct_events=len({r['event_id'] for r in matched}),
                  class_i=classes['Class I'], class_ii=classes['Class II'],
                  class_iii=classes['Class III'], unclassified=classes['Not Yet Classified'])
    results.append(result)

print('Report year | Recall records | Distinct events | Class I | Class II | Class III | Unclassified')
for r in results:
    print(f"{r['report_year']} | {r['recall_records']} | {r['distinct_events']} | "
          f"{r['class_i']} | {r['class_ii']} | {r['class_iii']} | {r['unclassified']}")

print('\nClass I records in the requested firm/year groups:')
for r in recalls:
    if r['classification'] == 'Class I' and any(
        all(r[k] == v for k, v in request.items()) for request in research_requests
    ):
        print(f"{r['recall_number']} | report {r['report_date']} | event {r['event_id']}")
        print('Product:', r['product_description'])
        print('Reason:', r['reason_for_recall'])

Replace research_requests with your own exact firm names and report years, or load the same columns from a CSV using csv.DictReader. Firm names are preserved as reported: spelling variations are not merged, and a recalling firm is not necessarily the manufacturer.

Analysis of the output

Report year | Recall records | Distinct events | Class I | Class II | Class III | Unclassified
2024 | 5 | 3 | 1 | 4 | 0 | 0
2025 | 1 | 1 | 0 | 1 | 0 | 0

Class I records in the requested firm/year groups:
D-0641-2024 | report 2024-08-28 | event 94966
Product: Healthy Living Acetaminophen, Aspirin (NSAID) and Caffeine, tablets USP, 250 mg/250 mg/65 mg, 100-count bottles, Distributed by: Aurohealth LLC, 279 Princeton-Hightstown Road, East Windsor, NJ , Made in India, NDC 58602-882-21.
Reason: Labeling: Missing Label - some bottles are missing the the manufacturers label that includes the drug facts information.

For the selected firm name, the 2024 records belong to three distinct events. The recall number identifies an individual record; event_id groups records associated with the same event. This distinction lets an analyst inspect affected products without counting a multi-product event repeatedly.

The selected Class I record describes a missing bottle label and supplies the product name, package description and FDA recall number for follow-up research. Product and reason text remain exactly as reported, including source spelling. Classification describes the FDA record; the example does not infer a cause from the classification alone.

These counts describe records present in one source snapshot, grouped by report date. They do not measure a firm's overall product quality, market share or recall rate. Initiation, classification and termination dates have separate columns. The source's status is not verified as current, so consult FDA and the responsible firm for current action or alerts.

Using the full dataset

Extract the purchased ZIP and replace the sample with its recalls.csv. The same code works with all 18,043 records. You can change the selected firm/year pairs or filter on recall number, classification and product or reason text.

The five CSV tables include the main records, 4,713 event summaries, 92,107 optional annotation values, report-year/classification coverage and an outcome for every original source record. The package also includes field definitions, source references, validation results, checksums and this example.

Join companion annotations using the edition-specific record_id. Only 3,097 recall records have optional drug annotations. Identifier, name and manufacturer arrays are separate lists; their positions do not establish pairs. This product does not supply a comprehensive recall-to-NDC crosswalk. The FDA NDC reference offers separate listing context, while Drugs@FDA supplies application and submission records.

Sources and versions

Source: FDA openFDA drug enforcement, export dated October 23, 2026, retained by ACD October 24. The observed report dates run from June 20, 2012 through October 14, 2026. That last observed date is not an independently established completeness cutoff. Some initiation dates precede 2012.

FDA can revise historical records. This fixed export does not reconstruct what was known at a past date or provide a complete recall-status history. The FDA interpretation notes explain these limitations. Read our source and preparation record for this edition.

The original data are publicly available. ACD sells the prepared tables, preserved relationships, documentation, validation and delivery. This is independent preparation with no FDA endorsement. Processing improvements to the same retained inputs are included; later source editions may be sold separately.

Example checked October 24, 2026 against both these samples and the complete purchased files. Source and processing records, sample checksums · Expected result CSV. Independent preparation; no agency endorsement.