For developers
NDC lookup API
One call turns an NDC into the drug behind it: name, form, strength, the package and its labeler. Send it the way you have it, 10 or 11 digits, with or without hyphens, and the answer comes back with the date it was true.
Start on the sandbox: 500 lookups a month, no card needed.
The call
GET https://api.pillwise.dev/v1/drugs/ndc/{ndc}
Authorization: Bearer pw_test_… {ndc} takes an 11-digit code (50580048810), a hyphenated 10-digit code in any of its three layouts (50580-488-10), the same with spaces, or a product NDC (50580-488) for the drug and all of its packages. Each call is one lookup on your plan. Add as_of (a day or an instant) to ask what the code meant on one of the last few days, or graph_version to pin an exact snapshot. Older dates return 410 gone_graph.
curl
curl https://api.pillwise.dev/v1/drugs/ndc/50580-488-10 \
-H "Authorization: Bearer pw_test_YOUR_KEY" JavaScript
const ndc = "50580-488-10";
const res = await fetch(
`https://api.pillwise.dev/v1/drugs/ndc/${encodeURIComponent(ndc)}`,
{ headers: { Authorization: `Bearer ${process.env.PILLWISE_KEY}` } },
);
if (!res.ok) throw new Error((await res.json()).error); // not_found, ndc_ambiguous, …
const { drug, as_of } = await res.json();
const pkg = drug.packages.find((p) => p.ndc11 === "50580048810");
console.log(drug.member.display_name, pkg.description, as_of); Python
import os, requests
r = requests.get(
"https://api.pillwise.dev/v1/drugs/ndc/50580048810",
headers={"Authorization": f"Bearer {os.environ['PILLWISE_KEY']}"},
timeout=10,
)
r.raise_for_status()
body = r.json()
drug = body["drug"]
pkg = next(p for p in drug["packages"] if p["ndc11"] == "50580048810")
print(drug["member"]["display_name"], pkg["labeler"], body["as_of"]) Not writing code today? The free NDC converter and lookup does the same lookup in a form.
What comes back
A real answer for 50580-488-10, trimmed. The full one also lists the drug’s label ids, and its packages holds every package of the drug, so pick yours by ndc11.
{
"drug": {
"id": "pw_d_5f50835041408f19",
"rxcui": "209459",
"tty": "SBD",
"names": {
"generic": "acetaminophen",
"proprietary": "TYLENOL EXTRA STRENGTH",
"rxcui_name": "acetaminophen 500 MG Oral Tablet [Tylenol]"
},
"form": "Tab",
"route": "ORAL",
"strength": "500 MG",
"member": {
"display_name": "Tylenol tablet, 500 mg",
"form": "tablet",
"form_label": "Tablet",
"strength": "500 MG",
"strength_label": "500 mg",
"route": "oral",
"route_label": "By mouth",
"dose_form": "Oral Tablet"
},
"ingredients": [
{ "name": "acetaminophen", "rxcui": "161", "unii": "362O9ITL9D" }
],
"packages": [
{
"ndc_raw": "50580-488-10",
"ndc11": "50580048810",
"display": "50580-488-10",
"product_ndc": "50580-488",
"description": "1 BOTTLE, PLASTIC in 1 CARTON (50580-488-10) / 100 TABLET, COATED in 1 BOTTLE, PLASTIC",
"labeler": "Kenvue Brands LLC"
}
],
"recalls": [{ "recall_number": "D-0121-2026", "status": "Ongoing" }],
"conflicts": [],
"cabinet_eligible": true
},
"graph_version": "20261028T093229Z",
"as_of": "2026-10-28T09:32:29.442526665Z",
"jurisdiction": "us",
"freshness": "current"
} - The drug. drug.id is the Pillwise id to save, with its RxCUI, generic and brand names, and ingredients.
- Form and strength. drug.member says it the way a person reads it: display_name, form_label, strength_label, route_label. The raw form, strength and route are there too.
- The package. Each entry has the code as listed (ndc_raw), its 11-digit form, the product NDC, the package description and the labeler.
- Recalls. Recalls on file for the drug, each with its number, classification, status and product description. To narrow to one package, call GET /v1/recalls?ndc=.
- The date. as_of and graph_version say which catalog answered. freshness is pinned whenever you pass as_of or graph_version.
Errors are JSON with a stable code:
HTTP/1.1 404
{ "error": "not_found", "message": "1234567890 is not in the requested snapshot" }
HTTP/1.1 409
{ "error": "ndc_ambiguous", "message": "NDC … maps to 2 drugs" } | Status | error | When |
|---|---|---|
| 400 | bad_lookup | The code can’t be read as an NDC. |
| 400 | bad_as_of | as_of isn’t a date (YYYY-MM-DD) or an RFC 3339 instant. |
| 404 | not_found | No listing has that code in the snapshot asked for. |
| 409 | ndc_ambiguous | The code maps to more than one drug. |
| 410 | gone_graph | The date or graph_version is older than the catalog keeps. |
| 503 | historical_busy, reloading | A pinned request came while another catalog version was loading. Wait for Retry-After and try again. |
Key and plan errors (401, 402, 403, 429) are the same on every path: see the API reference.
Common NDC pitfalls, and what the API does
Hyphen formats
A printed NDC is 10 digits in 4-4-2, 5-3-2 or 5-4-1. The API reads the layout from the hyphens (or spaces), so 0002-1433-80 and 00002-1433-80 find the same package. Keep the hyphens when you have them.
10-to-11 digit padding
Billing (HIPAA) uses 11 digits, 5-4-2, made by adding a leading zero to the short part. Strip the hyphens from a 10-digit code and nobody can tell which part was short. The API never guesses: a bare 10-digit code is matched only as it’s listed, and if it isn’t, you get 404 not_found rather than a wrong drug. Send the hyphens or the 11-digit form instead. The NDC formats guide has the long version.
Barcodes
The barcode on a US package is usually a UPC-A: a 3, the 10-digit NDC, and a check digit. Take the middle ten digits (upc.slice(1, 11)). The hyphens aren’t in the barcode, so the bare-code rule above applies: those digits answer only if the code is listed that way, and otherwise return 404. Then try the three hyphen layouts (4-4-2, 5-3-2, 5-4-1) in your code, or paste the barcode into the converter to see every reading.
Repackagers
A repackager relabels a drug under its own labeler code, so the same tablet has several NDCs. Each package carries its own labeler. When the repackager’s code and the maker’s code map to the same RxCUI, they answer with the same drug.id. A code with no RxCUI gets a drug.id of its own, and a brand and its generic are different drugs, so compare drug.id rather than assume.
Retired and reused NDCs
Codes leave the listings when a product is discontinued, and a labeler can later give a code to something else. A lookup answers from the current catalog, so a code that’s gone returns 404. For a code that left within the last year, as_of set to a day it was listed returns the answer as it was then. Older dates return 410 gone_graph, never today’s answer in its place. When one code maps to more than one drug, the API returns 409 ndc_ambiguous instead of picking one.
Questions
Can I convert an NDC to a drug name with one request?
Yes. GET /v1/drugs/ndc/{ndc} returns the drug with member.display_name (“Tylenol tablet, 500 mg”) and the generic and brand names, in one lookup.
Does it accept 10-digit NDCs?
Yes, in all three layouts. With hyphens or spaces it knows where to pad. Without them it matches the code only as listed and never guesses a padding.
How current is the data?
The catalog rebuilds every day, and each answer carries as_of. How freshness works.
Is there an RxCUI lookup too?
Yes: GET /v1/drugs/rxcui/{rxcui} returns the same drug shape. Search by name is GET /v1/drugs/search?q=, covered on the medication autocomplete API page. See the API reference.
What does it cost?
The sandbox is free, 500 lookups a month, no card. Each NDC lookup is one lookup. Plans for production.
NDC in, medication out. Pad and match codes by hand.
Sandbox is 500 lookups a month with no card. When you go live, Launch is $99 a month for one production app.