Skip to content

DailyMed: NDC Lookup

Looks up drug product information by National Drug Code (NDC) using the DailyMed API. It can optionally validate the NDC format before querying and returns both raw product data (as JSON text) and a human-readable summary, along with a boolean indicating validity.
Preview

Usage

Use this node when you have an NDC and need detailed product information such as brand/generic names, manufacturer, active ingredients, strength, dosage form, and packaging. It fits well in workflows that validate user-entered NDCs, enrich medication records, or present a readable summary of a specific drug product.

Inputs

FieldRequiredTypeDescriptionExample
ndc_codeTrueSTRINGThe NDC to look up. Hyphens and spaces are allowed; they will be normalized before the search.0378-6015-10
validate_formatFalseBOOLEANIf true, checks the NDC format before searching. Accepts 10 or 11 digits (ignoring hyphens/spaces).true
include_package_infoFalseBOOLEANIf true, includes packaging details (up to the first three package entries) in the formatted summary.true

Outputs

FieldTypeDescriptionExample
product_infoSTRINGRaw product information returned by the API, serialized as a JSON string. On error, contains a JSON error object.{ "title": "Sample Drug", "openfda": { "brand_name": ["Brand"], "manufacturer_name": ["Company"] }, "product_ndc": ["12345-6789-01"] }
formatted_infoSTRINGA readable summary of the product, including key fields like product title, brand/generic names, manufacturer, active ingredients, strength, dosage form, and optional packaging details.NDC Product Information ============================== Product: Sample Drug Brand: Brand Manufacturer: Company Active Ingredients: Ingredient A Strength: 500 mg Dosage Form: tablet Packaging Information: - Bottle of 100 (NDC: 12345-6789-01)
is_validBOOLEANIndicates whether the lookup is considered valid. False if the NDC format is invalid or no product is found; true if product data is returned.true

Important Notes

  • Format validation: When enabled, only checks that the NDC contains 10 or 11 digits after removing hyphens/spaces; it does not guarantee the code exists.
  • Result scope: Only the first matching product is returned for a given NDC; if multiple products exist, the node selects the first one.
  • Packaging details: The formatted summary includes at most the first three package entries when packaging is present and include_package_info is true.
  • Network dependency: Requires internet access to reach the DailyMed API; network or API issues will result in error outputs.
  • Data variability: Not all products contain the same fields; some sections in the formatted summary may be omitted if data is missing.

Troubleshooting

  • Invalid NDC format: If you see an 'Invalid NDC format' error, ensure the NDC has 10 or 11 digits (hyphens/spaces are allowed but ignored).
  • NDC not found: If 'NDC not found' is returned, verify the NDC is correct and active. Try removing hyphens or using the 11-digit version.
  • Timeouts or API errors: Network issues can cause errors. Retry later, check connectivity, or reduce request frequency.
  • Incomplete formatted info: If some fields are missing in the summary, the API may not provide those fields for the product.
  • Unexpected results: If results do not match expectations, confirm the NDC corresponds to a product listed on DailyMed and consider checking variations (package NDC vs. product NDC).