NDC API
Look up National Drug Code (NDC) information for prescription and over-the-counter medications.
Overview
The NDC (National Drug Code) is a unique 10 or 11-digit identifier for drug products in the United States. FHIRfly provides fast lookups against the FDA NDC Directory.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /v1/ndc/:code |
Single NDC lookup |
| POST | /v1/ndc/_batch |
Batch NDC lookup (up to 500) |
| GET | /v1/ndc/shapes |
List available response shapes |
Single Lookup
Look up Sotalol Hydrochloride by NDC
Request
Node.js
import { Fhirfly } from "@fhirfly-io/terminology";
const client = new Fhirfly({ apiKey: "YOUR_API_KEY" });
const result = await client.ndc.lookup("60505008100");
console.log(result.data);Response
JSON
{
"data": {
"brand_name": "Sotalol Hydrochloride",
"dosage_form": "TABLET",
"generic_name": "Sotalol Hydrochloride",
"is_active": true,
"labeler_name": "Apotex Corp.",
"ndc": "60505-0081-00",
"ndc11_hyph": "60505-0081-00",
"product_ndc": "60505-0081",
"route": [
"ORAL"
],
"rxcui": [
"904589",
"1922720",
"1922763",
"1922765",
"1923422",
"1923424",
"1923426"
],
"strength": "SOTALOL HYDROCHLORIDE 160 mg/1",
"type": "package"
},
"meta": {
"legal": {
"attribution_required": false,
"citation": "FDA NDC Directory. Accessed 2026-01-14 via FHIRfly.",
"license": "public_domain",
"source_name": "FDA NDC Directory"
}
}
}NDC Formats
FHIRfly accepts multiple NDC formats and normalizes them:
| Format | Example | Description |
|---|---|---|
| 11-digit | 60505008100 |
Normalized format (recommended) |
| 10-digit with dashes | 6050-0081-00 |
Standard hyphenated format |
| 10-digit no dashes | 6050008100 |
Also accepted |
Batch Lookup
Fetch multiple NDCs in a single request (up to 500):
Look up multiple drug products
Request
Node.js
import { Fhirfly } from "@fhirfly-io/terminology";
const client = new Fhirfly({ apiKey: "YOUR_API_KEY" });
const result = await client.ndc.lookupMany(["60505008100","50090030300","43547042850"]);
console.log(result.data.results);Response
JSON
{
"count": 3,
"results": [
{
"input": "60505008100",
"ndc": "60505-0081-00",
"status": "ok",
"data": {
"brand_name": "Sotalol Hydrochloride",
"generic_name": "Sotalol Hydrochloride",
"labeler_name": "Apotex Corp."
}
},
{
"input": "50090030300",
"ndc": "50090-0303-00",
"status": "ok",
"data": {
"brand_name": "Amoxicillin",
"generic_name": "Amoxicillin",
"labeler_name": "A-S Medication Solutions"
}
},
{
"input": "43547042850",
"ndc": "43547-0428-50",
"status": "ok",
"data": {
"brand_name": "Pioglitazone",
"generic_name": "Pioglitazone Hydrochloride",
"labeler_name": "Solco Healthcare US, LLC"
}
}
],
"meta": {
"legal": {
"license": "public_domain"
}
}
}Batch with shape=full
When using shape=full on batch requests, the response includes meta.source with provenance information:
POST /v1/ndc/_batch?shape=full
{
"count": 3,
"results": [
{
"input": "60505008100",
"ndc": "60505-0081-00",
"status": "ok",
"data": {
"brand_name": "Sotalol Hydrochloride",
"generic_name": "Sotalol Hydrochloride",
"labeler_name": "Apotex Corp.",
"marketing_category": "ANDA",
"dea_schedule": null
}
}
],
"meta": {
"source": {
"name": "FDA NDC Directory",
"url": "https://www.fda.gov/drugs/drug-approvals-and-databases/national-drug-code-directory",
"version": "monthly",
"fhirfly_updated_at": "2026-03-01T03:00:00Z"
},
"legal": {
"license": "public_domain",
"attribution_required": false
}
}
}
Response Shapes
Control the level of detail in responses with the shape query parameter:
| Shape | Description |
|---|---|
compact |
Minimal data for lists and autocomplete |
standard |
Core structured data (default) |
full |
Complete data with provenance for AI agents |
# Minimal data
GET /v1/ndc/60505008100?shape=compact
# Standard data (default)
GET /v1/ndc/60505008100?shape=standard
# Full data with provenance
GET /v1/ndc/60505008100?shape=full
See Response Shapes for field details.
SNOMED CT Enrichment
NDC products with SNOMED mappings (derived via RxNorm) include a snomed array in standard and full shapes.
{
"data": {
"ndc": "60505-0081-00",
"brand_name": "Sotalol Hydrochloride",
"snomed": [
{
"concept_id": "372911006",
"display": "Sotalol",
"map_type": "equivalent",
"map_source": "derived-rxnorm"
}
]
}
}
See SNOMED CT API for more details.
Required Scopes
ndc.read- Single and batch lookups