53 operations across 46 paths. Everything below is generated from the OpenAPI 3.1 document this API serves, so it cannot drift from what the server actually does.
/api/v1/openapi.json is public and needs no key. Point a client generator at it rather than transcribing this page. To run a call without writing any code, use the explorer.
A first call
A search across every country, and what comes back — trimmed. Anything derived from an ingested register carries _meta.sources: which source contributed and when it last synced cleanly.
Typeahead across all loaded jurisdictions. Filter by `country` (CH/GB/FR/DE/IT/AT/ES/DK/SE/FI/NO/NL/BE/IE/PT/US). Scope: `drugs:read`.
Query parameters
qstring
A name OR any code. Codes are tried first: ATC (C10AA05, or a class prefix like C10AA), NDC (dashed, 10- or 11-digit), GTIN-8/12/13/14, CIP13/CIP7, AIC, PZN, Swissmedic and other national pack/registration numbers, FDA UNII, RxCUI (`rxcui:83367`). Otherwise an ilike match on product_name OR substance_name, so an INN finds the brands that carry it. Each row and the response carry `matched_by`.
countrystringdefault CH
ISO 3166-1 alpha-2, or `ALL` for every register. Name search defaults to CH on /v1 (deprecated; responses without an explicit country carry a `Deprecation` header) — pass `country=ALL` for a global search. A code match is only narrowed by an explicit country.
atcstring
Prefix filter on atc_code.
limitintegerdefault 20
include_delistedbooleandefault false
Include products no longer marketed (their register stopped listing them; `delisted_at` set). An exact code match returns them regardless.
GET/v1/drugs/{id}/equivalentsdrugs:readThe same medicine in every other country.
Products in every register with the same active substance(s), strength, dose form and route (`same_medicine`, the pharmaceutical product) and with the same active substance(s) in any form (`same_substance`), grouped by country with exact counts. `basis` is `identity` (substance layer: UNII-keyed substances, salts folded to the active moiety), `atc` (fallback: same level-5 ATC class) or `none`. Scope: `drugs:read`.
GET/v1/drugs/{id}/profiledrugs:readEverything view for one drug.
The core record plus drug information texts (indications, contraindications, warnings, boxed warning, adverse reactions, drug interactions), Switzerland (BAG SL) + US (NADAC) pricing and this product’s own pack prices, known interactions for its ATC, a substance adverse-event signal, and cross-country availability. Each section is best-effort and may be null/empty. Scope: `drugs:read`.
GET/v1/drugs/lookupdrugs:readResolve an identifier to the canonical drug record.
Resolve any pack-level identifier (GTIN, Pharmacode, CIP-13, PZN, Swissmedic-No, EAN, NDC11, dm+d AMPPID) to the canonical drug record. Scope: `drugs:read`.
GET/v1/packs/{system}/{code}drugs:readPack lookup by identifier (path-shaped alias of /v1/drugs/lookup).
Resolve a pack-level identifier (GTIN, Pharmacode, CIP-13, PZN, Swissmedic-No, EAN, NDC11, dm+d AMPPID) to the canonical drug record. Same resolver as /v1/drugs/lookup; the identifier system is explicit in the URL path for cleaner integrations. Scope: `drugs:read`.
GET/v1/substances/{unii}drugs:readSubstance-level details by FDA UNII.
Returns the substance view (names across INN / RxNorm / EMA SPOR / CAS-RN, drugs that contain it, chemistry, ATC classes) keyed by FDA UNII. Scope: `drugs:read`.
Path parameters
uniistringrequired
FDA Unique Ingredient Identifier (e.g. WK2XYI10QM for ibuprofen).
GET/v1/therapies/{code}atc:readTherapeutic class lookup (alias of /v1/atc/{code}).
Developer-friendly alias for /v1/atc/{code}. Same response shape — "therapy" reads more naturally to non-pharma callers ("which drugs treat asthma? GET /v1/therapies/R03"). Scope: `atc:read`.
GET/v1/classesatc:readBrowse / search therapeutic classes across every axis.
Therapeutic classes on all axes — WHO ATC (levels 1–5) plus the FDA pharmacologic classes from RxClass (EPC / MoA / PE / CS) and MeSH pharmacologic actions. Every row carries its rollup (drug / substance / market counts), so "statins → how many products, in how many markets" is one call. Scope: `atc:read`.
Query parameters
systemstring
Restrict to one classification axis. Omit for all axes.atc · epc · moa · pe · cs · mesh_pa
qstring
Free-text match on label (substring) or code (prefix).
levelinteger
ATC level 1–5. The FDA/MeSH axes are flat and carry no level.
min_drugsinteger
Only classes with at least this many drugs.
marketstring
ISO 3166-1 alpha-2. Only classes with products in that market.
GET/v1/classes/{system}/{code}atc:readOne therapeutic class + hierarchy + cross-axis references.
A single class with its rollup, ancestor chain, direct children, a sample of member substances, and the classes on OTHER axes that share those substances. Scope: `atc:read`.
Path parameters
systemstringrequired
atc · epc · moa · pe · cs · mesh_pa
codestringrequired
ATC code (uppercased) or the opaque RxClass class id, e.g. `N0000175655`.
GET/v1/classes/{system}/{code}/drugsatc:readProducts in a therapeutic class, on any axis.
The drugs in a class, paginated. ATC is a prefix scan on the subtree; the FDA/MeSH axes walk class → substances → ATC codes → drugs. `country` is optional (unlike /v1/atc/{code}/drugs, which defaults to CH) because a class rollup is cross-market by nature. Scope: `atc:read`.
POST/v1/interactions/checkany valid keyPairwise + N-way interaction check across an ATC-mapped drug list.
N-way ATC interaction check; resolves each drug reference to an ATC and checks unique sorted pairs. Pairs are keyed on level-5 (substance) codes: an `atc_code` of level 1–4 is a class and is rejected with 422 (`details.reason: atc_not_substance`); a product whose register gives only a class is listed in `unresolved_drugs` with `reason: atc_class_only`. Any key: non-commercially licensed rows (DDInter, CC BY-NC 4.0) are returned to every plan, unmetered, each with its `licence` and `attributions`. Commercially licensed rows (mechanism + management) need `interactions:write` (growth+) and quota left; otherwise they are withheld and counted in `locked.count` (`locked.why`: `plan_does_not_include` | `no_credit_left`).
GET/v1/markets/overviewdrugs:readCross-market price-per-DDD comparison for a substance.
Substance-centric market comparison. `q` accepts ANY drug identifier — substance/INN, brand name, internal UUID, pharmacode / GTIN / NDC / CIP13 / PZN, or ATC code — and resolves it to the substance ATC, returning one comparable price-per-DDD (USD) per market. The price basis is reported explicitly per market (`per_ddd` / `per_unit` / `per_pack` / `none`): a gradient value is emitted ONLY where a true WHO DDD normalization was possible, so the number never over-claims comparability. Where it was not, each market also carries `price_per_ref_usd` — the unit price scaled to ONE reference amount of substance shared by every market in the response (`reference`: the DDD when it is mass-based, otherwise the most common strength on sale, e.g. 500 mg) — and `price_per_unit_usd`, the price of one tablet / capsule / vial at any strength. Scope: `drugs:read`.
Query parameters
qstringrequired
Substance, brand, UUID, pharmacode/GTIN/NDC/CIP13/PZN, or a level-5 ATC code. A level 1–4 ATC code is a class, not a substance: 422 with `details.reason` `atc_not_substance` and `details.substances_url`.
countriesstringdefault all
"all" (default) or a comma list, e.g. CH,US,FR.
price_levelstringdefault gross
"gross" compares retail / public prices (incl. margins and VAT). "net" compares list net prices where a market publishes them: ex-factory (CH, CZ, PL) or pharmacy purchase (NO), plus US NADAC acquisition cost; retail-only markets are left out. Confidential rebates are in no public register.gross · net
GET/v1/rxnorm/{rxcui}drugs:readOn-demand RxNorm enrichment by rxcui.
Enriches one RxNorm concept from the public RxNav API (name, ingredients, brands, dose-form drugs, ATC class, NDCs) and — when a UMLS license key is configured server-side — the licensed SNOMED CT / MeSH crosswalk. Each upstream degrades to partial data on failure. Scope: `drugs:read`.
GET/v1/rxnorm/resolvedrugs:readResolve a drug name to an RxNorm rxcui.
Maps a free-text name (substance, brand, or full product string) to an rxcui via RxNav — exact normalized match first, then approximate matching. Pair with /v1/rxnorm/{rxcui} for full enrichment. Scope: `drugs:read`.
One-call go/no-go view for a (drug, indication) pair — composes the evidence layers so you don't stitch /v1/targets → /v1/targets/genetics → /v1/signatures → /v1/guidelines → /v1/hta by hand. Returns the drug's targets each with human-genetic association + directionality-**concordance** (does the mechanism phenocopy protective genetics?) + a de-risking profile (essentiality, LoF constraint, tractability, safety liabilities); a curated LINCS reversal for the indication (flagging whether the drug itself is a reverser); clinical guidelines + HTA decisions; and a `summary` rollup for scoring. Each sub-signal is individually cached. Scope: `drugs:read`.
Query parameters
drugstringrequired
Drug name (e.g. evolocumab).
indicationstringrequired
Disease label or ontology id (e.g. familial hypercholesterolemia).
Line-of-therapy recommendations from ingested clinical guidelines — NOT ATC classification (cf. /v1/therapies). Filter by indication, ATC, or source; at least one required. **Coverage:** this catalogue is licensing-gated (NCCN licensed, NICE syndication key) and may not yet be populated — an empty match returns a `coverage` note rather than a 404. Scope: `drugs:read`.
Health-technology-assessment decisions with cost-effectiveness economics — ICER/QALY ratios, reimbursement decisions, AND the ICER Health-Benefit Price Benchmark (hbpb_low/hbpb_high = the value-based price range, with list_price for the value gap). The layer that list prices and a boolean reimbursement flag cannot express (cf. /v1/ch/price-comparison). Filter by drug, indication, country, or source; at least one required. Seeded with verified ICER assessments; NICE/CADTH population is licensing-gated. An empty match returns a `coverage` note rather than a 404. Scope: `drugs:read`.
Query parameters
drugstring
Drug name (substring match).
indicationstring
Condition / disease (substring match).
countrystring
ISO-3166 alpha-2 country of the HTA body (GB/US/CA/DE).
GET/v1/signaturesdrugs:readLINCS reversal for a curated disease signature (by indication).
Option-B lookup: resolve a curated per-indication disease signature from the drug-database (seeded from published GEO differential-expression studies) and run the same LINCS reversal scoring as the POST path — so you can ask "what reverses endometriosis?" without supplying a gene set. Returns the resolved `signature` (provenance + gene counts) alongside reverser/mimicker results. A 404 lists the indications currently curated. Scope: `drugs:read`.
Query parameters
indicationstring
Curated indication label (e.g. endometriosis).
efostring
EFO/ontology id (e.g. EFO_0001065). One of indication/efo is required.
POST/v1/signaturesdrugs:readLINCS / CMap signature-reversal scoring for a disease signature.
Score a caller-supplied disease expression signature (up- and down-regulated gene symbols) against LINCS L1000 (L1000FWD): which compounds REVERSE the signature (candidate therapeutics — a mechanism-agnostic efficacy signal independent of the target hypothesis) and which MIMIC it. Returns the top reversers/mimickers with a signed connectivity score and resolved compound identity (Broad BRD id + best-effort drug name, cell line, dose). Cached by the order-independent gene set. Scope: `drugs:read`.
GET/v1/targets/geneticsdrugs:readOpen Targets Genetics — L2G, direction of effect, drug concordance.
Human-genetic causal layer for a (gene, disease) pair from the Open Targets GraphQL platform: genetic-association score, per-datasource evidence with Locus-to-Gene scores and direction of effect (LoF/GoF on the target, risk/protect on the trait), and a summarised protective target direction. When `drug` is supplied, adds a directionality-**concordance** verdict — whether the drug's mechanism phenocopies the protective human genetics (`concordant`, de-risking) or opposes it (`discordant`, red flag). Scope: `drugs:read`.
Query parameters
genestringrequired
Gene symbol or Ensembl id (e.g. PCSK9 or ENSG00000169174).
diseasestringrequired
Disease label or ontology id (e.g. "familial hypercholesterolemia" or MONDO_0005439).
drugstring
Optional drug name — enables the directionality-concordance verdict against the drug's mechanism of action.
Validates a proposed prescription against a patient’s current medications entirely in-project, over our own reviewed interaction data — no external gateway. Drugs given as `system: atc` must be level-5 codes (a class code answers 422 `atc_not_substance`); label advisories come only from a label whose generic name is exactly the proposed substance. Scope: `interactions:write` (growth+). Processes and stores no protected health information (PHI): it accepts only drug identifiers plus coarse, non-identifying context (age band, sex, pregnancy, eGFR band, conditions, allergies). A defense-in-depth scrubber rejects any request body carrying identifying PHI fields (name, dob, mrn, email, ssn, ahv, address, …) with `422 phi_field_rejected`. On success the interaction decision is returned with `200`.
POST/v1/ch/price-comparisonch:claimsCheaper Swiss SL substitutes in the same ATC + pack size.
Finds cheaper SL substitutes in the same ATC and pack size (with substance/strength signature when available), including savings and co-insurance delta. Scope: `ch:claims` (growth+).
GET/v1/byol/{provider}/querybyol:writeBYOL live passthrough query.
Runs one authenticated call against the tenant’s OWN licensed provider using the stored credential and returns the provider payload under a uniform envelope. The plaintext credential is decrypted inside the vault RPC, used for this single outbound request, and never logged, cached, or shared cross-tenant. Scope: `byol:write` (growth+).
POST/v1/chatchat:writeAsk the Drug Database AI assistant.
Bearer-authed assistant over the Drug Database corpus. Non-streaming: the upstream token stream is consumed server-side so the real token count is known, then returned as one JSON object. Each turn draws on the monthly AI answer allowance included in the plan (Free 3, Pro 50, Starter 150, Growth 750), then on prepaid pack credits; an unusually long turn can count as more than one answer. When both are spent the turn is refused up front with `402 ai_allowance_exhausted` — nothing is ever billed as overage. Scope: `chat:write`, on every tier.
POST/v1/chat/packschat:writeBuy a prepaid AI answer pack.
One-off Stripe Checkout for a prepaid pack of AI answers: 90 for $15 or 360 for $60 (the old sizes 100 / 500 select the same packs). Paid plans only (Free gets `403 upgrade_required`). Pack credits carry over month to month and are drawn down after the monthly allowance. Scope: `chat:write`.
POST/v1/chat/subscribeany valid keyRetired — chat plans are now included in every plan.
Separate chat plans (basic/pro/enterprise) are retired: AI answers are included in every API plan. Always returns 410 with a pointer to /pricing; use POST /v1/chat/packs to top up on a paid plan.
Returns the GraphQL schema as SDL (`application/graphql`). Requires any valid bearer token (any tier); the schema is not public. No scope beyond authentication.
POST/v1/graphqlgraphql:queryExecute a GraphQL query.
Hand-rolled GraphQL executor over the drug catalogue. Supported root query fields: `drugs`, `drug`, `drugByCode`, `atc`, `changes`, `rxnorm`. Fragments, multiple operations, directives, full introspection, mutations, and subscriptions are NOT supported. Scope: `graphql:query` (pro+).
POST/v1/mcpany valid keyHosted MCP server (Streamable HTTP, JSON-RPC 2.0).
The same tool catalogue as the `@drug-database/mcp-server` npm package, served at a URL so remote agents can attach. Stateless: one JSON-RPC request, or a batch of up to 20, per POST, answered as plain JSON (no stream, no session). Methods: `initialize`, `ping`, `tools/list`, `tools/call`. `initialize`, `ping` and `tools/list` are not metered; `tools/list` returns only the tools the key's scopes can run. Each `tools/call` runs the matching /v1 endpoint with the caller's key, so it is scoped, quota-checked and counted as one request. Tool results over 60,000 characters are truncated.
Business KPIs for the owner's portfolio dashboard: signups, active users, MRR, revenue, funnel and expenses (model cost at provider list price from phi-cloud when configured). `view=summary|daily`, `days=1..90`. The key's tenant must be a platform admin; anyone else gets 403. Aggregates only, never metered.
Quotas are counted per account — every key and the console share one counter — and the tighter of the monthly quota and the daily cap wins. Over it, calls answer 429 quota_exceeded with a retry-after header. Watch x-ratelimit-remaining on successful calls to see it coming.
Request quota per plan
Plan
Price
Quota
Note
Free
$0
10 requests in total
Counted per account, API and console together
Pro
$29/month
1,500 requests a month
Up to 500 a day
Starter
$99/month
20,000 requests a month
No daily cap — the monthly quota governs
Growth
$490/month
150,000 requests a month
No daily cap
Enterprise
not published
No quota
Exempt from the counter entirely
Scopes, daily caps and the AI answer allowance per plan are in Authentication.
Errors
Errors are JSON with a machine-readable error string. Branch on it and the status, never on message. The full list is in Errors.
The most common error statuses
Status
error
What it means
401
unauthorized
No key, an unparseable key, a revoked key, or a legacy ms_ key.
403
forbidden
The key is valid but lacks the scope this endpoint requires. missing_scope names it.
404
not_found
The identifier resolved to nothing.
422
validation
Your request was understood and refused. message says why.
429
quota_exceeded
The account used its monthly quota or daily cap. resets, retry-after and upgrade_url say when and how.
502
upstream_error
A backend or an external public API failed. Transient — retry with backoff.
Conventions
A few things hold across the whole surface and are not repeated per endpoint:
Envelope. Responses derived from ingested registers carry _meta.sources — one entry per contributing source with last_synced_at and schema_state of ok, stale or never_run.
Caching. Cacheable GETs return an etag. Send it back as if-none-match to get a 304 and save your quota.
Enrichment freshness. Passthrough resolvers add x-drug-database-cache — db, live or stale — so you can tell a fresh upstream fetch from a cached copy served because the upstream was down.
Aliases./v1/drugs/lookup and /v1/packs/{system}/{code} are the same resolver in two URL shapes, as are /v1/atc/{code} and /v1/therapies/{code}. Both stay live; pick whichever reads better in your code.