query drug adverse-event data from the openFDA API

domain: openfda · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Send a GET request to https://api.fda.gov/drug/event.json with a search parameter using Lucene query syntax, e.g. search=patient.drug.medicinalproduct:aspirin to find adverse event reports mentioning a drug.
  2. Use limit (max 1000 per request) and skip for pagination; for large result sets, iterate using skip offsets up to the total count returned in meta.results.total.
  3. To aggregate counts by reaction, use the count endpoint: https://api.fda.gov/drug/event.json?search=...&count=patient.reaction.reactionmeddrapt.exact to get a frequency breakdown by MedDRA preferred term.
  4. Apply an API key (obtained free from https://open.fda.gov/apis/authentication/) to get higher rate limits (240 requests/minute vs 40 without a key); include it as the api_key query parameter.
  5. Filter by seriousness flags (e.g. serious:1, seriousnesslifethreatening:1) to focus on clinically significant reports.
  6. Supplement openFDA data with results.safetyreportid and results.reportduplicate fields to identify and exclude duplicate reports when doing quantitative analysis.

Known gotchas

Related routes

normalize drug names and retrieve RxCUIs via the RxNorm API
rxnorm · 6 steps · unrated
Pull and process study metadata from the ClinicalTrials.gov v2 API to monitor FDAAA 801 results reporting compliance for a portfolio of trials
clinicaltrials.gov/data-api/api · 6 steps · unrated
Query ClinicalTrials.gov API v2 for studies by condition and intervention with cursor-based pagination
clinicaltrials.gov/data-api/api · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans