Why I Built This
Last year, my grandmother was taking warfarin (a blood thinner) and started drinking chamomile tea daily because she read it was "calming." What she didn't know — and what her doctor didn't mention — is that chamomile can increase warfarin's anticoagulant effect, raising the risk of dangerous bleeding.
This isn't rare. A 2019 systematic review found that 40% of adults in the Americas use some form of herbal supplement, and many don't tell their doctors. The interaction data exists in PubMed — it's just not accessible to regular people.
So I built an herb-drug interaction checker that anyone can use for free. No signup, no ads. Here's what I learned building it.
The Data Problem
The first challenge was sourcing reliable interaction data. There's no single "herb-drug interaction API." The data lives in:
- PubMed — 35+ million papers, but no structured interaction database
- Natural Medicines Database — comprehensive but costs $1,500/year
- WHO monographs — authoritative but covers only ~120 plants
- Individual clinical trial papers — scattered across journals
I ended up building my own database by cross-referencing multiple sources. The current version covers 250 medicinal plants and 401 documented interactions across 30 drug classes.
Data Structure
Each interaction record looks like this:
{
"herb": "St. John's Wort",
"drug_class": "SSRIs",
"severity": "high",
"mechanism": "CYP3A4 induction + serotonin syndrome risk",
"evidence_level": "strong",
"pubmed_ids": ["12345678", "23456789"],
"clinical_note": "Contraindicated. Can reduce SSRI efficacy by 50%+ and independently increase serotonin, risking serotonin syndrome."
}
Key design decisions:
- Drug classes, not individual drugs. Warfarin interactions apply to all vitamin K antagonists. Grouping by mechanism (not brand name) means better coverage with less data.
- Evidence levels. Not all interactions are equal. "Strong" means randomized trials or pharmacokinetic studies. "Moderate" means case reports or in vitro data. "Theoretical" means mechanism-based prediction without clinical confirmation.
- Severity scoring. High = hospitalization risk. Moderate = requires monitoring. Low = be aware.
The Frontend
The checker is a single HTML file with no dependencies. No React, no build step, no npm. Just vanilla JavaScript with a search-as-you-type interface.
Why? Because:
- Health tools must be fast. Someone checking an interaction might be anxious. A 3-second spinner is unacceptable.
- Offline capability. The entire database is embedded in the HTML. Works on spotty hospital WiFi.
- Zero maintenance. No server costs, no API to keep alive, no dependencies to update.
The search uses a simple fuzzy matching algorithm:
function searchInteractions(query) {
const terms = query.toLowerCase().split(/\s+/);
return interactions.filter(item => {
const searchable = [
item.herb, item.drug_class,
item.mechanism, item.clinical_note
].join(' ').toLowerCase();
return terms.every(term => searchable.includes(term));
});
}
Nothing fancy. For 401 records, Array.filter() runs in <1ms. Don't reach for Elasticsearch when includes() will do.
What the Data Reveals
After compiling 401 interactions, some patterns emerged:
The Top 5 Most Dangerous Herbs (by interaction count)
| Herb | Interactions | Highest Severity Drug |
|---|---|---|
| St. John's Wort | 23 | Immunosuppressants (organ rejection risk) |
| Ginkgo biloba | 18 | Anticoagulants (bleeding risk) |
| Garlic (therapeutic dose) | 14 | Anticoagulants, HIV protease inhibitors |
| Ginger (therapeutic dose) | 12 | Anticoagulants, diabetes drugs |
| Turmeric/Curcumin | 11 | Anticoagulants, chemotherapy drugs |
Notice a pattern? Four of five interact with blood thinners. If you're on warfarin, heparin, or any anticoagulant, you need to be extremely careful with herbal supplements.
The CYP450 Connection
Most herb-drug interactions happen through the cytochrome P450 enzyme system — the liver's drug processing machinery. When an herb induces (speeds up) or inhibits (slows down) a CYP enzyme, it changes how fast your body processes drugs:
- CYP3A4 — processes ~50% of all prescription drugs. St. John's Wort is a potent inducer.
- CYP2D6 — processes many antidepressants and opioids. Goldenseal inhibits it.
- CYP1A2 — processes caffeine, theophylline, some antipsychotics. Echinacea can inhibit it.
This is why "natural" doesn't mean "safe." An herb that induces CYP3A4 can make your birth control pills, immunosuppressants, or HIV medications less effective — potentially with life-threatening consequences.
Lessons for Developers Building Health Tools
Get the data right first. I spent 60% of development time on data curation and 40% on the UI. Health data errors can hurt people.
Add disclaimers, but make them useful. "Consult your doctor" is a legal necessity but unhelpful alone. I include the PubMed search link for every interaction so users can show their doctor the actual evidence.
Don't require accounts. Health information seeking is private. Nobody wants to create an account to check if their supplement interacts with their medication.
Cite everything. Every interaction in the checker links to PubMed. If you can't cite it, don't include it.
Design for anxiety. People using a drug interaction checker might be scared. Use clear severity indicators (color-coded), plain language, and always explain what to DO (talk to your doctor, monitor for X symptoms).
Try It
The checker is live at botanicaandina.com/herramientas/interacciones/. The database covers 250 plants and 401 interactions.
If you're building health tools, I'd love to hear about your approach to data sourcing and evidence grading. And if you're a pharmacist or herbalist — I'd appreciate feedback on the interaction data. The goal is to make this the most accessible herb-drug interaction resource available.
This tool is part of Botánica Andina, an open encyclopedia of Andean medicinal plants. We also have a yerba mate caffeine calculator and a natural first-aid kit builder.
Top comments (0)