Capability · Code lookup

Pharmacode, GTIN, NDC → one product.

Resolve any market identifier — a scanned barcode, a Swiss Pharmacode, a US NDC — to the canonical drug in one indexed read, with the matched pack alongside.

GET /api/v1/drugs/lookup

What you get

Built for production drug data

Turn an identifier on a medication pack into a full drug product in one call. GET /api/v1/drugs/lookup?system=…&code=… does a single indexed read and returns the canonical drug row — ATC, manufacturer, dispensing category, reimbursement flag — plus the matched alias with its pack size and price.

Resolution is unified: GTIN, NDC, EAN, Pharmacode, PZN, CIP13, dm+d AMPP-ID and Swissmedic-No all hit the same endpoint and return the same shape. Resolve once, then read the full record to cross-walk to any other identifier system.

Barcode

Scan → product

The linear barcode on a pack is a GTIN (or EAN). Pass system=gtin and the digits; the endpoint resolves it to the canonical drug in one indexed read.
Unified

One endpoint, many systems

gtin, ndc11, pharmacode, cip13, pzn, swissmedic_no, ean and dmd_amppid all resolve through the same call — only the system parameter changes.
Pack-level

The exact pack matched

matched_alias returns pack_size, public_price and currency for the precise identifier you sent, not just the parent product.
Clean misses

Explicit not-found

An unknown identifier returns a clean 404 identifier_not_found rather than a fuzzy best-guess match.

Try it

A real call, end to end

One indexed lookup on (system, code) — the hot path of every dispense and scan flow.

GET /api/v1/drugs/lookup?system=gtin
# Barcode scan → GTIN
curl 'https://drug-database.com/api/v1/drugs/lookup\
?system=gtin&code=7680651870019' \
  -H 'Authorization: Bearer dd_live_…'

# US National Drug Code
curl 'https://drug-database.com/api/v1/drugs/lookup\
?system=ndc11&code=00071015523' \
  -H 'Authorization: Bearer dd_live_…'
response
{
  "drug": {
    "id": "3f8a1c2d-1b4e-4c7a-9d2f-0a1b2c3d4e5f",
    "product_name": "Aspirin Cardio 100 mg",
    "atc_code": "B01AC06",
    "dispensing_cat": "B",
    "is_reimbursed": true,
    "country_code": "CH",
    "last_synced_at": "2026-06-27T02:14:00Z"
  },
  "matched_alias": {
    "system": "gtin",
    "code": "7680651870019",
    "pack_size": 30,
    "is_primary": true
  },
  "_meta": { "sources": ["bag_sl", "oddb"] }
}

Coverage & sourcing

  • Identifier systems: gtin, ndc11, pharmacode, cip13, pzn, swissmedic_no, ean, dmd_amppid.
  • Swiss packs carry Pharmacode and Swissmedic-No; US packs carry NDC — all map to one canonical product.
  • Alias data is sourced from oddb, BAG-SL, FDA NDC and the national registers; we are not affiliated with them.
  • Each resolved row carries last_synced_at so you can show pack-level freshness.
Good to know
  • · Lookups need the drugs:read scope.
  • · Read GET /api/v1/drugs/{id} after resolving to list every alias for cross-walking.

FAQ

Common questions

A linear barcode on a medication pack encodes a GTIN (or EAN). Pass system=gtin and the digits in code. The endpoint resolves it to the canonical drug row, with the matched pack returned alongside.
Yes. Pass system=ndc11 with an 11-digit National Drug Code. Same endpoint, same response shape — only the identifier system changes.
gtin, ndc11, pharmacode, cip13, pzn, swissmedic_no, ean and dmd_amppid. Resolve any one to a single canonical product, then read the full record to cross-walk to the others.
The endpoint returns a clean 404 identifier_not_found rather than a fuzzy match, so your flow can branch deterministically.

Ready when you are

Put code lookup in production this afternoon.

Spin up a key in minutes. The free tier covers prototyping and low-volume production.

Free tier · 100 requests/day · No card required