openFDA has no drug interaction endpoint. Its interaction data is the drug_interactions field of the openFDA drug label API, which holds a label's drug interactions section as free text, plus a raw table field. You get one manufacturer's prose about other drugs, with no severity field and no index of drug pairs.
openFDA is the obvious place to look after NLM retired the RxNav drug interaction API on January 2, 2024. The endpoint is free, documented, and returns JSON. This post covers what the label API returns, a real query and code, where a naive string match fails on real labels, and what you have to build before the data can sit behind a prescribing screen. It is written for software builders and clinical informatics leads, and none of it is medical advice.
What does the openFDA drug label API return for drug interactions?
Each record in /drug/label.json is one Structured Product Labeling (SPL) document converted to JSON. Interaction content lives in a handful of text fields, and identifiers for matching live in a separate openfda object that only some records have.
openFDA explains that manufacturers and distributors submit labels to FDA in SPL format, and openFDA converts them to JSON and adds annotations. The dataset updates weekly, and the page warns that the labeling may not match what is currently distributed and that its content has not been altered or verified by FDA. Every response also carries a meta.disclaimer saying not to rely on openFDA for medical care decisions. The field descriptions below come from openFDA's drug label field definitions and from live responses.
| Field | What it holds | How to use it in an interaction pipeline |
|---|---|---|
drug_interactions | Array of strings: section 7 of PLR labels, or the drug interactions subsection under Precautions in older labels, with headings flattened into the prose | Primary source text. Needs parsing, entity extraction, and clinical review |
drug_interactions_table | Array of raw SPL table markup strings, including styleCode attributes and captions | Often the most structured part of the section. Parse the markup rather than the flattened prose |
contraindications, boxed_warning | Section 4 text and the boxed warning, when present | Contraindicated and most serious combinations often appear here first |
warnings_and_cautions, warnings, precautions | Section 5 in PLR labels; separate Warnings and Precautions in older labels | Context for interactions that section 7 cross-references |
dosage_and_administration | Section 2 text | Dose limits tied to specific co-medications. Simvastatin's label has a subsection on dosage modifications due to drug interactions |
clinical_pharmacology, pharmacokinetics | Section 12 text, including interaction study results | Mechanism and magnitude, such as AUC changes |
ask_doctor_or_pharmacist, do_not_use | OTC Drug Facts sections | Where OTC labels put interaction cautions, since few OTC labels have drug_interactions |
set_id, version, effective_time | Label GUID stable across revisions, sequential version number, and version date (YYYYmmdd) | Primary key, versioning, and change detection for one labeling document |
openfda.rxcui | RxNorm product-level concepts matched to the label, such as 198211 (simvastatin 40 MG Oral Tablet) | Join to your medication list after mapping to product concepts. Missing on many records |
openfda.generic_name, openfda.substance_name | Harmonized generic and active ingredient names | Ingredient-level grouping |
openfda.pharm_class_epc, openfda.pharm_class_moa | FDA Established Pharmacologic Class and mechanism of action class | A seed for class expansion, though label classes like "strong CYP3A4 inhibitors" are not EPC values |
openfda.manufacturer_name, openfda.product_ndc, openfda.original_packager_product_ndc | Labeler, product NDCs, and the original packager's NDC on repackaged products | Grouping repackager labels with their source product |
Don't assume the openfda object is present. openFDA's harmonization documentation says the section is only added when a record matches exactly, so searches on openfda fields cover a subset of the endpoint. On November 15, 2026 (data last updated November 13), 87,232 of 264,748 label records had openfda.spl_set_id, which we used as the marker for a harmonization block, and 177,516 did not. Product type is itself a harmonized field, so the prescription counts that follow cover harmonized records only: 37,430 were typed as human prescription drugs, and 8,918 of those had no drug_interactions field.
How do you query openFDA for a drug's interaction section?
Send a GET to https://api.fda.gov/drug/label.json with a search expression, and shape the result with limit, skip, sort, and count. No key is needed to start, and a free key raises the daily cap.
This is a real query. It returns one simvastatin label and reports the match count in meta.results.total:
GET https://api.fda.gov/drug/label.json?search=openfda.generic_name:"simvastatin"&limit=1
# Trimmed response (illustrative excerpt of a live result, 2026-11-15)
{
"meta": {
"disclaimer": "Do not rely on openFDA to make decisions regarding medical care. ...",
"last_updated": "2026-11-13",
"results": { "skip": 0, "limit": 1, "total": 121 }
},
"results": [
{
"set_id": "00896fff-081d-4553-be8c-1999a8a73dda",
"version": "23",
"effective_time": "20260226",
"drug_interactions": [
"7 DRUG INTERACTIONS See full prescribing information for details regarding concomitant use of simvastatin with other drugs or grapefruit juice that increase the risk of myopathy and rhabdomyolysis. ... Table 2: Drug Interactions that Increase the Risk of Myopathy and Rhabdomyolysis with Simvastatin Strong CYP3A4 inhibitors Clinical Impact: ... Examples: Select azole anti-fungals (e.g., itraconazole, ketoconazole, posaconazole, and voriconazole), ... cobicistat-containing products, and nefazodone. ..."
],
"drug_interactions_table": [
"<table ID=\"ID71\" width=\"624\" styleCode=\"Noautorules\"><caption>Table 2: Drug Interactions that Increase the Risk of Myopathy and Rhabdomyolysis with Simvastatin</caption>..."
],
"openfda": {
"generic_name": ["SIMVASTATIN"],
"manufacturer_name": ["PD-Rx Pharmaceuticals, Inc."],
"rxcui": ["198211"],
"spl_set_id": ["00896fff-081d-4553-be8c-1999a8a73dda"],
"pharm_class_epc": ["HMG-CoA Reductase Inhibitor [EPC]"]
}
}
]
}
Here is the same call in Python, with the two error paths you will hit first. A search with no matches returns HTTP 404 and an error body of NOT_FOUND with the message "No matches found!", which your code must not treat as "no interactions."
# Illustrative example. Requires the requests package.
import requests
BASE = "https://api.fda.gov/drug/label.json"
def label_interactions(generic_name, api_key=None):
params = {"search": f'openfda.generic_name:"{generic_name}"', "limit": 5}
if api_key:
params["api_key"] = api_key
r = requests.get(BASE, params=params, timeout=30)
if r.status_code == 404:
# No label matched: report "not checked", never "no interactions"
return None
r.raise_for_status() # throttling and server errors surface here
labels = []
for rec in r.json()["results"]:
labels.append({
"set_id": rec["set_id"],
"version": rec.get("version"),
"effective_time": rec.get("effective_time"),
"labeler": rec.get("openfda", {}).get("manufacturer_name"),
"section_7": " ".join(rec.get("drug_interactions", [])) or None,
})
return labels
for lab in label_interactions("simvastatin") or []:
print(lab["set_id"], lab["effective_time"], (lab["section_7"] or "MISSING")[:120])
Query patterns that come up in interaction work, all run on November 15, 2026:
search=openfda.rxcui:"198211"matched 43 labels harmonized to simvastatin 40 mg oral tablet. DailyMed's web services returned 74 SPLs for the same RxCUI, and the difference is the harmonization gap described above.search=openfda.substance_name:"SIMVASTATIN"matched all 121 simvastatin labels across strengths, which is the simpler ingredient-level lookup.search=set_id:"00896fff-081d-4553-be8c-1999a8a73dda"fetches one label by its stable ID.search=_exists_:drug_interactionsand_missing_:openfda.spl_set_idproduced the coverage counts above.search=drug_interactions:"St. John's Wort"runs a phrase search inside section text (2,900 labels matched).count=openfda.manufacturer_name.exactadded to the simvastatin search counts labels per labeler. The top three were repackagers.
The authentication page, where you also request a key, sets the limits: without a key, 240 requests per minute and 1,000 per day per IP address; with one, 240 per minute and 120,000 per day per key. Pass it as the api_key parameter or as a basic auth username. The query parameter docs cap limit at 1,000 and skip at 25,000. For larger sets, the paging docs describe search_after: drop skip, sort, and follow the Link: rel="next" header until it disappears. For the whole corpus, openFDA's zipped JSON downloads, indexed at api.fda.gov/download.json, beat paging through the live API.
Why is label text not a drug interaction engine?
A label is written by one manufacturer about one product, for human readers. An interaction engine needs an index you can query in either order, with the direction of the effect, a severity, and a management recommendation attached to each pair. Label text has the recommendation in prose and none of the rest as structure.
Under 21 CFR 201.57(c)(8), section 7 "must contain a description of clinically significant interactions, either observed or predicted, with other prescription or over-the-counter drugs, classes of drugs, or foods (e.g., dietary supplements, grapefruit juice), and specific practical instructions for preventing or managing them," and the mechanism must be briefly described if known. The rule asks for guidance a clinician can read. It sets no severity scale or controlled vocabulary for the other drug, and nothing requires the other product's label to say the same thing.
On real labels that shows up in several ways:
- The text is prose. Headings, table cells, and cross-references such as "( 7.2 )" are flattened into one string per section.
- Each label speaks from its own product's perspective. Drug A's label may cover the pair while drug B's label never mentions A.
- The other drug is often named as a class. Simvastatin's label groups interactions under "Strong CYP3A4 inhibitors" and "Fibrates (other than Gemfibrozil)," with a few named examples.
- There is no severity field. Words like "contraindicated," "avoid," and "monitor" carry the clinical weight, and you have to map them yourself.
- One ingredient has many labels: 121 for simvastatin, many of them from repackagers whose text you have to compare against the source product's label.
- Older labels use a different structure. 21 CFR 201.56 applies the PLR format by application status and date: NDAs, BLAs, and efficacy supplements approved from June 30, 2001, or pending or submitted on or after June 30, 2006. Other products follow 21 CFR 201.80, where drug interactions sit inside Precautions. openFDA maps that subsection to
drug_interactions, but there are no numbered subsections or Clinical Impact tables to parse. - Supplements have no label of their own in this endpoint. A drug label may mention St. John's Wort, but nothing on the supplement side lists what it interacts with.
What goes wrong when you string-match drug B in drug A's label?
The common first build fetches drug A's label and checks whether drug B's name appears in drug_interactions. On real labels this produces false negatives and misleading matches, and the false negatives are the dangerous ones.
We ran these checks against live openFDA records on November 15, 2026. They show failure modes in software, not clinical conclusions about any patient.
| Pair checked | Naive result | What the labels actually say | Failure mode |
|---|---|---|---|
| Simvastatin label, search for "idelalisib" | No match. The Zydelig label's section 7 does not name simvastatin either | Simvastatin's label contraindicates "strong CYP3A4 inhibitors." Zydelig's says to avoid "sensitive CYP3A substrates." FDA's CYP and transporter table lists idelalisib as a strong CYP3A inhibitor and simvastatin as a sensitive CYP3A substrate | False negative from class naming, in both directions |
| Simvastatin label, search for "fenofibrate" | No match | Covered under the heading "Fibrates (other than Gemfibrozil)" | False negative from class naming |
| Simvastatin label, search for "Paxlovid" or "nirmatrelvir" | No match | The label lists ritonavir among strong CYP3A4 inhibitor examples, and the Paxlovid label's section 7 names simvastatin | False negative from brand names and combination products unless you decompose to ingredients and check both labels |
| Trandolapril label, search for "digoxin" | Match | "No clinically significant pharmacokinetic interaction has been found between trandolaprilat and food, cimetidine, digoxin, or furosemide" | Match on a negative statement |
| Trandolapril label, search for "furosemide" | Match | The same negative sentence, but the label also has a Concomitant Diuretic Therapy subsection about hypotension risk | Right answer for the wrong reason. A negative pharmacokinetic finding does not rule out a pharmacodynamic interaction |
| Lovastatin label, search for "propranolol" | Match | Reports no clinically significant pharmacokinetic or pharmacodynamic interaction with single doses of propranolol | Match on a negative statement |
Negative statements are common. A phrase search for "no clinically significant" in drug_interactions, limited to prescription labels, matched 609 records, and a valacyclovir label's entire section 7 says no clinically significant drug-drug or drug-food interactions are known. The furosemide row shows why you cannot simply invert these: the negative finding covers what was studied, and another paragraph of the same label may describe a different interaction with the same drug or its class.
Other failures are quieter. Simvastatin's label discusses "Coumarin Anticoagulants" several times and names warfarin once, so a matcher looking for the brand name Coumadin finds nothing. Substring matching on short names catches the wrong drug inside a longer one. And a label without an openfda block never comes back from an RxCUI search, so the pair is never checked.
What does it take to make openFDA label data usable for interaction checking?
You need a curation layer between raw labels and alert logic: normalization, class expansion, two-way lookup, scoped negation, clinical review, and version tracking. The checklist below assumes an engineering team starting from openFDA.
- Normalize medications with RxNorm and keep the product context. Map brand names, combination products, and free text to ingredients so "Paxlovid" becomes nirmatrelvir plus ritonavir, but keep dose form, route, and strength.
openfda.rxcuiholds product concepts like 198211, so an ingredient RxCUI will not match directly: traverse to product concepts with the RxNorm APIs, which still run, or searchopenfda.substance_name. - Choose source labels deliberately. Prefer the source product's label over repackager copies, using fields like
openfda.original_packager_product_ndcto group them, and compare section 7 text before discarding a label, because generic and repackager labels can differ. Record whichset_ideach rule came from. - Extract from every relevant field: section 7 prose,
drug_interactions_table, contraindications, boxed warning, and dosage and administration, plus the OTC Drug Facts fields. PLR tables often follow a Clinical Impact, Intervention, Examples layout that parses more reliably than prose. - Expand classes, and budget for it. "Strong CYP3A4 inhibitors," "serotonergic drugs," and "fibrates" each need a maintained member list with clinical ownership. FDA's CYP and transporter table seeds enzyme-based classes, and
openfda.pharm_class_epchelps with pharmacologic ones. Expect this to be the largest ongoing cost in the pipeline. - Look up both directions and keep the direction. Check A's label for B and B's label for A, then merge while recording which drug affects which. The Paxlovid and simvastatin pair only surfaces from one side by name.
- Scope negative evidence. Store "no clinically significant pharmacokinetic interaction" as a finding about what was studied, not as a rule that suppresses every alert for the pair. Have a reviewer read each negative statement; 609 prescription labels contain that phrase alone.
- Assign severity and management through clinical review. Map label language such as "contraindicated," "avoid," and "monitor" to your scale, keep the label's dose and timing instructions, and have a pharmacist or physician sign off. If you are building a certified Health IT Module, 45 CFR 170.315(a)(4) (a)(4)(ii) also requires that the severity level of drug-drug interaction interventions be adjustable, with that ability limited to a specific set of identified users or to a system administrative function.
- Get supplement and OTC knowledge from somewhere else too. Drug labels mention some supplements, but no supplement-side label exists here, so supplement pairs need another reviewed source.
- Version everything. Store
set_id,version, andeffective_timewith every extracted rule. openFDA returns only the current version for a set ID, while DailyMed's/services/v2/spls/{setid}/history.jsonlists prior versions. Diff on each weekly refresh, re-review changed sections, and handle set IDs that drop out of the feed. - Fail loudly. A 404, a missing
drug_interactionsfield, a missingopenfdablock, or an unmapped medication means "not checked" in the UI, never "no interactions found."
The guide to adding drug interaction checking to an EHR covers the alerting and workflow side, and the OpenEMR drug interaction checking post shows where these checks plug into an open source EHR. If you would rather start from label data someone has already structured, RxLabelGuard's self-serve interaction API resolves drug names through RxNorm and returns severity-scored pairs extracted from FDA labels, each citing the SPL set ID it came from. You still validate the results against your own formulary.
Should you pull labels from openFDA or DailyMed?
Use openFDA when you want JSON with sections already split into fields and harmonized identifiers. Use DailyMed when you need full SPL XML, version history, or every SPL for an RxCUI. Many pipelines use both.
| Need | openFDA /drug/label | DailyMed web services |
|---|---|---|
| Section text as JSON fields | Yes, one field per section | No, you parse SPL XML (section 7 carries LOINC section code 34073-7) |
| Label version history | Current version per set ID only | Yes, history.json per set ID |
| Lookup by RxCUI | Only on records with an openfda block (43 for RxCUI 198211) | Yes, spls.json?rxcui= (74 for RxCUI 198211) |
| Bulk download | Zipped JSON via download.json | Zipped full releases of all labels |
| Rate limits | 240 per minute; 1,000 per day without a key, 120,000 with one | Not covered here; check NLM's current terms |
Neither source gives you drug pairs with severities attached. That layer is either something you build and maintain or something you license.
When does it make sense to build on openFDA yourself?
Build on openFDA when interaction checking is core to your product and you can staff clinical review for as long as the product exists. Weekly data refreshes, class lists, and negation review are ongoing work, and they don't end at launch.
openFDA works well for label lookup screens, research tools, and as the evidence link behind an alert. It is also a good way to audit another interaction source, since a rule that contradicts current label text deserves a look. Teams get into trouble when they put raw string matches behind a prescribing workflow and read silence as safety.
If you evaluate a commercial drug knowledge base instead, ask about coverage of your formulary and of OTC drugs and supplements, who does clinical review and how often, whether each result links to its evidence, how updates are versioned, and what the license allows you to display or redistribute. Orisan Sage is one option. It evaluates a full medication list at once, including OTC drugs and supplements, explains the mechanism behind each interaction, and links results to evidence. Its knowledge draws on FDA drug labeling, DailyMed, and our own clinical review, and it is available over REST and GraphQL. The Sage drug interaction API page has the technical details.
What should you check first?
If you already read drug_interactions somewhere, start there. Check whether the code maps to ingredients first, checks both labels, and shows "not checked" when the field, the openfda block, or the whole label is missing. Then run ten real medication lists from your test data through the matcher and have a clinician review every miss and every match on a negative statement against the label text. If you are still deciding whether to build on openFDA, that same test on a prototype will tell you how much of the checklist above you would own. If you want a second set of eyes on the integration, our integration team does this kind of review.