Dashboard

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

MethodPathDescription
GET/v1/ndc/:codeSingle NDC lookup
POST/v1/ndc/_batchBatch NDC lookup (up to 500)
GET/v1/ndc/shapesList 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:

FormatExampleDescription
11-digit60505008100Normalized format (recommended)
10-digit with dashes6050-0081-00Standard hyphenated format
10-digit no dashes6050008100Also 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:

ShapeDescription
compactMinimal data for lists and autocomplete
standardCore structured data (default)
fullComplete 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