@pipeworx/openfda

Connect: https://gateway.pipeworx.io/openfda/mcp · Install: one-click buttons

Tools: 18

The U.S. Food and Drug Administration’s open data platform. Adverse event reports (FAERS), drug approvals, drug labels, recalls, device reports, food recalls, tobacco enforcement. The official source for what’s been reported to or by the FDA. Free, no auth required (rate-limited).

Why this matters for AI agents

Drug-safety questions resolve here. Adverse event volumes, label changes, approval timelines, recall posture — all structured. For the full drug picture, pair with RxNorm (canonical IDs) and ClinicalTrials.gov (trials).

Common flows:

  • Adverse events for a drug. “Reports for Ozempic” → fda_drug_events({query: "ozempic"}) → individual safety reports + counts.
  • Bucket reactions. “Top reactions reported for Ozempic” → fda_event_counts({query: "ozempic", count_field: "patient.reaction.reactionmeddrapt.exact"}) → MedDRA-coded counts.
  • Approval history. “When was Ozempic approved and for what?” → fda_drug_approvals({query: "ozempic"}).
  • Recalls. “Any Ozempic recalls?” → fda_drug_recalls({query: "ozempic"}).
  • Label content. “What does the FDA label say about contraindications?” → fda_drug_labels({query: "ozempic"}).
  • All applications for a company. “Every Drugs@FDA application Eli Lilly has filed” → fda_applications_by_cik({cik_or_ticker: "LLY"}). Resolves the company via SEC and aggregates across every sponsor_name spelling it filed under — see the pitfall below before reaching for fda_drug_approvals with a guessed sponsor name.

Used by the pharma_drug_profile and pharma_safety_report compounds.

Auth

Public, no key required. Anonymous limit is ~240 requests/min and 1,000/day, counted per IP — so every caller sharing an egress address shares one 1,000/day budget, not one each.

api.fda.gov runs on api-umbrella, the same stack as api.data.gov, so an api.data.gov key authenticates it and lifts the daily limit to 120,000. Pipeworx injects a platform key (PLATFORM_DATAGOV_KEY); bring your own with _apiKey and your calls draw on your quota instead. Register free at https://open.fda.gov/apis/authentication/.

A key that is rejected or revoked does not fail the call — the pack retries once anonymously, since openFDA is fully usable without one.

Datasets

DatasetEndpoint familyCoverage
Drug adverse events (FAERS)fda_drug_events1968-present, ~20M+ reports
Drug approvalsfda_drug_approvals1939-present (NDA/BLA/ANDA)
Drug labelsfda_drug_labelsCurrent SPL labels
Drug recallsfda_drug_recallsClass I/II/III enforcement actions
Device adverse events(separate tools)MAUDE database
Food recalls(separate tools)FSIS + FDA recalls
Warning lettersfda_warning_letters~3,660 published letters, fda.gov (not api.fda.gov)

Common pitfalls

  • Reports are not unique patients. A single hospitalization can produce multiple FAERS reports. The total field is reports, not adverse-event-suffering-individuals.
  • Causality not implied. A FAERS report links a drug to an event temporally; it does not prove the drug CAUSED the event. Use language carefully.
  • Brand vs generic naming. Searching “ozempic” finds Ozempic-tagged reports. Searching “semaglutide” finds reports for any semaglutide product. They can differ — the user’s intent determines which to search.
  • Query syntax is FDA’s, not ours. OpenFDA uses Lucene-style search with field-specific queries. Pipeworx tool descriptions show the syntax. Quotation marks matter.
  • Reaction names use MedDRA word order. Natural phrasing can differ from the preferred term stored by FDA — ISCHAEMIC OPTIC NEUROPATHY is filed as OPTIC ISCHAEMIC NEUROPATHY. Reaction-filtered tools retry two- and three-word phrases in alternate word orders and disclose the resolved term in reaction_resolved.
  • Reaction filters match one whole preferred term. They are not substring or token matches, so NEUROPATHY returns only reports filed under that exact term (~1,700) rather than every term containing the word (~117,000). This is deliberate: a disproportionality table needs one case definition, not an ad-hoc grouping. To find the terms FDA actually stores, count on patient.reaction.reactionmeddrapt.exact.
  • An unmatched term is reported, not silently zeroed. When no word order matches, tools return reaction_resolution: "not_a_meddra_preferred_term" with a hint. Treat that as “the filter missed,” never as “no reports exist.”
  • Warning-letter search matches the RECIPIENT by default. fda_warning_letters sits on fda.gov’s solr index, which covers each letter’s full body as well as the company column — so a raw full-text query answers “letters that mention X”, not “letters issued to X”. Those are very different claims about a named firm, and the difference was live: search: "Merck" returned exactly one letter, addressed to Elanco Animal Health, which merely names Merck in its text. search now filters on the addressed company, every row carries matched_field (company vs letter_text), and match: "fulltext" is the opt-in for body search. A recipient search with no hits returns found: false with the full-text count, so “no letters” is never confused with “we did not look”.
  • Warning-letter counts over broad terms are a floor. Recipient matching pages the full-text superset up to 600 candidates. Past that the response sets scan_complete: false and a scope_note, and total_matching is a lower bound — narrow the term for an exact count.
  • Lag from event to report. FAERS reports lag the event by months — sometimes years. The “last 30 days” view is misleading; recent counts will keep growing as reports flow in.
  • sponsor_name has no company-ID and is EXACT-match, not full-text. fda_drug_approvals queries like search=sponsor_name:"ELI LILLY AND COMPANY" match only that literal string — Eli Lilly’s real applications are split across “LILLY” (116), “ELI LILLY AND CO” (22), “ELI LILLY CO” (4), and “LILLY RES LABS” (1), and the SEC-registered name matches none of them. Use fda_applications_by_cik (CIK/ticker in, every sponsor_name form aggregated out) instead of guessing spellings.

Tools

  • fda_drug_events — Search FAERS adverse event reports by drug name, MedDRA reaction term, or date range. Returns report counts, reaction types, seriousness levels, and dates. Natural multi-word reaction phrasing is retr
  • fda_drug_approvals — Find FDA-approved drugs by brand name, active ingredient, or application number. To find generic versions of a drug, search by active ingredient using products.active_ingredients.name (NOT openfda.gen
  • fda_applications_by_cik — Find ALL Drugs@FDA applications for a company by SEC CIK, ticker, or company name — without needing to know its FDA sponsor_name spelling. Drugs@FDA has no company-ID field: sponsor_name is free text,
  • fda_novel_approvals — Most recent novel drug approvals — the newest drugs approved by the FDA. Use for “what is the most recent novel drug the FDA approved”, “latest FDA drug approvals”, “recently approved new drugs or bio
  • fda_drug_labels — Get FDA drug labeling (SPL) by drug name OR by INDICATION. This is the tool for “what drugs are approved to treat ” — it searches the indications_and_usage text, which the drugsfda approval
  • fda_drug_recalls — Search FDA drug recalls and enforcement actions by drug name or reason — returns recall classification, date, reason and enforcement status. A multi-word search is tried as ALL terms first and falls b
  • fda_drug_shortages — Search the FDA Drug Shortages database by generic or brand name, manufacturer, status, or an advanced openFDA query. Returns national supply records and available FDA dates; reason and other details a
  • fda_shortage_changes — FDA drug-shortage records ordered by update_date, newest first, then restricted to the requested look-back window. Use for recently updated, discontinued, or resolved national shortages; this does not
  • fda_complete_response_letters — Search FDA-disclosed Complete Response Letters for drug and biologic applications. Defaults to letter_type “COMPLETE RESPONSE”; optionally include other letter types in the same dataset. Returns the a
  • fda_crl_detail — Retrieve one FDA Complete Response Letter by application number and optionally letter date. Returns the FDA-disclosed letter text and document URL. Confidential commercial and trade-secret material ma
  • fda_food_recalls — Search FDA FOOD recall / enforcement reports (openFDA /food/enforcement) — product recalls, reasons, classification, recalling firm, distribution, and status. Use for food-safety / recall-history ques
  • fda_event_counts — Aggregate adverse events by reaction type, patient age, or outcome. Returns top reactions for a drug and event trends over time.
  • fda_warning_letters — Search FDA WARNING LETTERS — official enforcement letters FDA sends firms for violations (CGMP, adulterated/misbranded products, unapproved claims). Answers “has received an FDA warning lett
  • fda_faers_signal_summary — Calculate report-level FAERS disproportionality routing metrics for one drug/reaction pair using a 2×2 reporting table. The reaction argument matches one whole MedDRA preferred term, so a broad word l
  • fda_faers_reaction_profile — Summarize the most frequently co-reported FAERS reactions plus serious/non-serious report counts for a drug. Counts are spontaneous reports with duplicates, co-medications, and reporting bias—not even
  • fda_faers_trend — Aggregate daily FAERS report counts into calendar months for a drug and optional reaction over a bounded date window. The reaction argument matches one whole MedDRA preferred term, so a broad word lik
  • fda_application_history — Retrieve one Drugs@FDA NDA, ANDA, or BLA application and return its products and chronological submission-action history. Submission codes require regulatory interpretation and do not by themselves es
  • fda_postmarket_risk_profile — Combine a drug’s FAERS reporting profile, label warning fields, and FDA recall records for review routing. This is not a validated safety comparison, causal assessment, incidence estimate, or substitu

Tools

  • fda_application_history — Retrieve one Drugs@FDA NDA, ANDA, or BLA application and return its products and chronological submission-action history. Submission codes require regulatory interpretation and do not by themselves es
  • fda_applications_by_cik — Find ALL Drugs@FDA applications for a company by SEC CIK, ticker, or company name — without needing to know its FDA sponsor_name spelling. Drugs@FDA has no company-ID field: sponsor_name is free text,
  • fda_complete_response_letters — Search FDA-disclosed Complete Response Letters for drug and biologic applications. Defaults to letter_type COMPLETE RESPONSE ; optionally include other letter types in the same dataset. Returns the ap
  • fda_crl_detail — Retrieve one FDA Complete Response Letter by application number and optionally letter date. Returns the FDA-disclosed letter text and document URL. Confidential commercial and trade-secret material ma
  • fda_drug_approvals — Find FDA-approved drugs by brand name, active ingredient, or application number. To find generic versions of a drug, search by active ingredient using products.active_ingredients.name (NOT openfda.gen
  • fda_drug_events — Search FAERS adverse event reports by drug name, MedDRA reaction term, or date range. Returns report counts, reaction types, seriousness levels, and dates. Natural multi-word reaction phrasing is retr
  • fda_drug_labels — Get FDA drug labeling (SPL) by drug name OR by INDICATION. This is the tool for what drugs are approved to treat <condition> — it searches the indications_and_usage text, which the drugsfda approvals
  • fda_drug_recalls — Search FDA drug recalls and enforcement actions by drug name or reason — returns recall classification, date, reason and enforcement status. A multi-word search is tried as ALL terms first and falls b
  • fda_drug_shortages — Search the FDA Drug Shortages database by generic or brand name, manufacturer, status, or an advanced openFDA query. Returns national supply records and available FDA dates; reason and other details a
  • fda_event_counts — Aggregate adverse events by reaction type, patient age, or outcome. Returns top reactions for a drug and event trends over time.
  • fda_faers_reaction_profile — Summarize the most frequently co-reported FAERS reactions plus serious/non-serious report counts for a drug. Counts are spontaneous reports with duplicates, co-medications, and reporting bias—not even
  • fda_faers_signal_summary — Calculate report-level FAERS disproportionality routing metrics for one drug/reaction pair using a 2×2 reporting table. The reaction argument matches one whole MedDRA preferred term, so a broad word l
  • fda_faers_trend — Aggregate daily FAERS report counts into calendar months for a drug and optional reaction over a bounded date window. The reaction argument matches one whole MedDRA preferred term, so a broad word lik
  • fda_food_recalls — Search FDA FOOD recall / enforcement reports (openFDA /food/enforcement) — product recalls, reasons, classification, recalling firm, distribution, and status. Use for food-safety / recall-history ques
  • fda_novel_approvals — Most recent novel drug approvals — the newest drugs approved by the FDA. Use for what is the most recent novel drug the FDA approved , latest FDA drug approvals , recently approved new drugs or biolog
  • fda_postmarket_risk_profile — Combine a drug’s FAERS reporting profile, label warning fields, and FDA recall records for review routing. This is not a validated safety comparison, causal assessment, incidence estimate, or substitu
  • fda_shortage_changes — FDA drug-shortage records ordered by update_date, newest first, then restricted to the requested look-back window. Use for recently updated, discontinued, or resolved national shortages; this does not
  • fda_warning_letters — Search FDA WARNING LETTERS — official enforcement letters FDA sends firms for violations (CGMP, adulterated/misbranded products, unapproved claims). Answers has <company> received an FDA warning lette

Regenerated from source · build September 10, 2026