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
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);{
"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
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);{
"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.
Drug Class Enrichment
NDC products can be enriched with drug classification data using the include=drug_classes or include=contraindications query parameters. This data is derived by joining the NDC's rxcui references to the enriched RxNorm drug records.
GET /v1/ndc/60505008100?include=drug_classes,contraindications
{
"data": {
"ndc": "60505-0081-00",
"brand_name": "Sotalol Hydrochloride",
"rxcui": ["904589"],
"drug_classes": [
{
"class_id": "N0000175557",
"class_name": "Beta-Adrenergic Blocker",
"class_type": "EPC",
"source": "FDASPL"
}
],
"contraindications": [
{
"concept_name": "Bronchial Asthma",
"concept_id": "N0000010380",
"source": "MED-RT",
"relationship": "CI_with"
}
]
}
}
Because NDC products reference one or more RxCUIs, the drug classes and contraindications are aggregated from all linked RxNorm concepts. See RxNorm API for details on drug class and contraindication fields.
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