A simple Python script to extract raw data from FDA MAUDE database using the FDA API.
-
Download the script:
git clone https://github.com/MohamedMaroufMD/maude-batch-extractor.git cd maude-batch-extractor -
Create a file with FDA MAUDE URLs:
https://www.accessdata.fda.gov/scripts/cdrh/cfdocs/cfMAUDE/Detail.CFM?MDRFOI__ID=21944442&pc=HQL https://www.accessdata.fda.gov/scripts/cdrh/cfdocs/cfMAUDE/Detail.CFM?MDRFOI__ID=21933846&pc=HQL -
Run the script:
python3 batch_extractor.py your_file.txt
# Auto-detect FDA MAUDE files in current directory
python3 batch_extractor.py
# Use specific file
python3 batch_extractor.py my_urls.txt
# Test with limited records
python3 batch_extractor.py my_urls.txt --limit 10
# Custom output directory
python3 batch_extractor.py my_urls.txt -o results
# Show help
python3 batch_extractor.py --helpThe script creates:
extracted_data/maude_batch_data_TIMESTAMP.json- Raw data from FDA APIextracted_data/maude_batch_data_TIMESTAMP.csv- Flattened data for analysis
- ✅ Works with any filename
- ✅ Auto-detects FDA MAUDE files
- ✅ Fast extraction (optimized API calls)
- ✅ Raw data preservation
- ✅ JSON and CSV output formats
- Python 3.6+
- No additional packages needed (uses built-in libraries)
MIT License - see LICENSE file for details.