TL;DR
The FDA Adverse Events API provides access to the FAERS (FDA Adverse Event Reporting System) database, containing millions of reports of adverse drug reactions, medication errors, and therapeutic failures submitted to the FDA. You can query by drug name, reaction (side effect), patient demographics, and outcomes. Each report includes the drug(s) involved, the reactions experienced, patient age/gender, reporter type, and serious outcomes (hospitalization, death, disability). This data powers drug safety monitoring worldwide.
Quick start: https://api.fda.gov/drug/event.json?search=patient.drug.openfda.brand_name:ibuprofen&limit=1
No API key needed — just make a request!
How to Use This API
1. Search by Brand Name
https://api.fda.gov/drug/event.json?search=patient.drug.openfda.brand_name:ibuprofen&limit=3
2. Search by Reaction
https://api.fda.gov/drug/event.json?search=patient.reaction.reactionmeddrapt:headache&limit=5
3. Filter by Serious Outcome
https://api.fda.gov/drug/event.json?search=patient.drug.openfda.brand_name:aspirin&serious=1&limit=5
4. JavaScript — Recent Reports
fetch('https://api.fda.gov/drug/event.json?search=patient.drug.openfda.generic_name:metformin&limit=5')
.then(r => r.json())
.then(d => {
d.results.forEach(r => {
const reactions = r.patient.reaction.map(x => x.reactionmeddrapt);
console.log(r.safetyreportid, '—', reactions.join(', '));
});
});
5. Python — Count Reactions for a Drug
import requests
# Count adverse events for ibuprofen
resp = requests.get('https://api.fda.gov/drug/event.json', params={
'search': 'patient.drug.openfda.brand_name:ibuprofen',
'count': 'patient.reaction.reactionmeddrapt.exact'
})
counts = resp.json()
for c in counts['results'][:10]:
print(f"{c['term']}: {c['count']:,} reports")
https://api.fda.gov/drug/event.json?search=patient.drug.openfda.brand_name:ibuprofen&limit=2
API Details
- API URL
https://api.fda.gov/drug/event.json- Documentation
- open.fda.gov/drug/event/
- Category
- Health
- Authentication
- Not Required
- Geographic Coverage
- USA (reports from US and worldwide)
Frequently Asked Questions
- What is FAERS?
- The FDA Adverse Event Reporting System is a database of adverse event reports, medication errors, and product quality complaints submitted to the FDA. It is the primary surveillance system for post-market drug safety.
- How can I get reactions for a specific drug?
- Use the
countparameter:?search=patient.drug.openfda.brand_name:DRUG&count=patient.reaction.reactionmeddrapt.exactto get a ranked list of reactions. - Can I search by patient demographics?
- Yes, filter by
patient.patientonsetage(age),patient.patientsex(1=male, 2=female), andpatient.patientweight. - What outcomes are tracked?
- Serious outcomes include death, life-threatening, hospitalization (initial/prolonged), disability, congenital anomaly, required intervention, and other serious outcomes.
- How far back does the data go?
- FAERS data is available from 1997 onwards, though electronic submissions became more comprehensive after 2010. The API covers the full historical archive.
- What is a safety report ID?
- Each report has a
safetyreportidthat uniquely identifies the submission. The same ID can be used to cross-reference reports across openFDA endpoints.
What You Can Build
- Drug side effect browser for patient education
- Pharmacovigilance dashboard tracking safety signals
- Medication comparison tool comparing adverse event profiles
- Clinical research data extraction tool
- Patient safety alert system for high-risk drugs