free api
no key, no sign-up, no limits. the api is a set of static JSON files, so it is fast everywhere and can't go down under load. use it in apps, clinics, pharmacies and research.
1. find an ingredient
GET https://both.apexlinks.org/api/v1/index.json: all names, once. look up a brand or generic name (lowercase, no accents) in t to get ingredient indexes into c.
{
"i": "2026-11-18", // data version
"c": [["warfarin", "warfarin"], …], // ingredients: [name, file slug]; slug "" = no known interactions
"t": [["coumadin", 6512], …], // search names (brands, other languages) -> ingredient indexes
"k": { "nsaid": "NSAID pain reliever …" }, // class names
"s": { "us": ["US FDA drug labels …", url, licence] }, // sources
"f": { "bleed": "more risk of bleeding" } // effect words
} 2. get its interactions
GET https://both.apexlinks.org/api/v1/drug/<slug>.json: every known interaction of one ingredient with its evidence.
{
"i": "warfarin", "a": ["B01AA03"], "x": ["11289"], "u": [], "e": ["Vitamin K Antagonist [EPC]"],
"k": ["anticoagulant"], // classes it belongs to
"p": [[193, "a", "us,no,va", [0, 4]], …], // [partner index, severity, sources, evidence]
"v": [["us", "a", "avoid", "text…", "plain text for patients", url, title, "via class", ["bleed"], [raises], [lowers]], …]
} severity: x contraindicated, a avoid, c use with care, m minor, n no meaningful interaction. source mech means inferred from mechanism, not stated by a source.
3. check a list
load the file of each ingredient, then for every pair look up the partner's index in p.
const ix = await (await fetch('https://both.apexlinks.org/api/v1/index.json')).json()
const id = name => ix.t.find(([t]) => t === name)?.[1]
const file = async n => (await fetch(`https://both.apexlinks.org/api/v1/drug/${ix.c[n][1]}.json`)).json()
const [a, b] = [id('warfarin'), id('aspirin')]
const hit = (await file(a)).p.find(([p]) => p === b) // [partner, severity, sources, evidence] licence
CC BY 4.0. credit "both" and its sources (see data). the whole dataset is also downloadable as CSV and JSON.