Dashboard

NDC Search API

Search the FDA NDC Directory for drug products by name, ingredient, strength, and more.

Endpoint

GET /v1/ndc/search

Quick Start

Node.js
import { Fhirfly } from "@fhirfly-io/terminology";

const client = new Fhirfly({ apiKey: "YOUR_API_KEY" });

// Search for metformin tablets
const results = await client.ndc.search({
  q: "metformin",
  dosage_form: "TABLET"
});

console.log(`Found ${results.total} products`);
for (const item of results.items) {
  console.log(`${item.ndc}: ${item.name}`);
}

Parameters

At least one text search parameter or standalone filter is required.

Parameter Description Example
q General text search across all fields q=advil
name Search product name name=lipitor
brand Search brand name brand=tylenol
generic Search generic name generic=acetaminophen
ingredient Search active ingredient (standalone) ingredient=ibuprofen

Filters

Parameter Type Description Example
strength string Drug strength (parsed flexibly) 200mg, 10mg/5ml
dosage_form string Dosage form TABLET, CAPSULE
route string Administration route ORAL, TOPICAL
labeler string Manufacturer name Pfizer
product_type enum otc, rx, or all rx
dea_schedule enum DEA schedule CII, CIII, none
marketing_category string FDA approval type nda, anda
pharm_class string Pharmacological class Anti-Inflammatory
is_active boolean Currently marketed true
has_rxcui boolean Has RxNorm mapping true
rxcui string Specific RxCUI (standalone) 197806

Pagination & Response

Parameter Default Max Description
limit 20 100 Results per page
page 1 100 Page number
shape compact compact, standard, full
sort relevance relevance, name, labeler

Example Response

{
  "facets": {
    "dosage_form": {
      "TABLET": 186
    },
    "product_type": {
      "HUMAN PRESCRIPTION DRUG": 170,
      "DRUG FOR FURTHER PROCESSING": 16
    },
    "route": {
      "ORAL": 170
    }
  },
  "has_more": true,
  "items": [
    {
      "active": true,
      "generic": "Metformin ER 500 mg",
      "labeler": "Aphena Pharma Solutions - Tennessee, LLC",
      "name": "Metformin",
      "ndc": "71610-613",
      "type": "product"
    },
    {
      "active": true,
      "generic": "Metformin ER 500 mg",
      "labeler": "A-S Medication Solutions",
      "name": "Metformin",
      "ndc": "50090-6515",
      "type": "product"
    }
  ],
  "limit": 2,
  "meta": {
    "legal": {
      "attribution_required": false,
      "citation": "FDA NDC Directory. Accessed 2026-01-28 via FHIRfly.",
      "license": "public_domain",
      "source_name": "FDA NDC Directory"
    }
  },
  "page": 1,
  "total": 186,
  "total_capped": false
}

Use Cases

Find OTC Pain Relievers

Node.js
const results = await client.ndc.search({
  ingredient: "ibuprofen",
  product_type: "otc",
  is_active: true
});

Find Controlled Substances

Node.js
const results = await client.ndc.search({
  q: "oxycodone",
  dea_schedule: "CII"
});

Find by Strength

Node.js
// Strength parsing handles various formats
const results = await client.ndc.search({
  q: "metformin",
  strength: "500mg"  // Also accepts: "500 mg", "0.5g"
});

Find Products with RxNorm Mapping

Node.js
// Find products mapped to a specific RxCUI
const results = await client.ndc.search({
  rxcui: "197806"
});

Facets

NDC search returns these facets:

Facet Description
dosage_form Distribution by dosage form
product_type Distribution by OTC vs prescription
route Distribution by administration route

Valid Values

DEA Schedules

CI, CII, CIII, CIV, CV, none

Marketing Categories

nda, anda, bla, otc monograph drug, otc monograph final, otc monograph not final

Product Types

otc, rx, all

Required Scope

ndc.search

See Also