U.S. Public Record API Operated by Folio Insights LLC

← Back to docs

Querying FDA NDC drugs via API

The FDA publishes the National Drug Code (NDC) Directory as a daily ZIP download — a flat-file snapshot of commercially marketed drug product listings in the U.S., including finished drugs, unfinished (API/bulk) products, compounded preparations, and currently excluded entries. Parsing and joining those CSVs yourself means writing an ETL pipeline before you can ask your first question.

Folio ingests the NDC Directory daily and exposes a set of JSON endpoints that take the filters you actually want — drug or brand name, ingredient, labeler, NDC code, RxCUI, UNII, UPC — and return a paginated current-snapshot result set with a data_freshness timestamp indicating the most recent ingest.

The 10-second version

Search for drugs by name:

curl -H "X-API-Key: fo_live_..." \
  "https://folioapi.com/v1/drugs/search?name=aspirin&limit=5"
{
  "results": [
    {
      "product_ndc": "12345-678",
      "product_kind": "finished",
      "proprietary_name": "Aspirin",
      "non_proprietary_name": "ASPIRIN",
      "labeler_name": "Example Pharma Inc.",
      "marketing_category_name": "OTC MONOGRAPH FINAL",
      "application_number": "part343",
      "exclude_status": null
    }
  ],
  "total": 842,
  "limit": 5,
  "offset": 0,
  "data_freshness": "2026-06-19"
}

Endpoints

The drug API has six endpoints. All require the X-API-Key header.

Full-text and filtered search across the directory. Returns paginated results.

curl -H "X-API-Key: fo_live_..." \
  "https://folioapi.com/v1/drugs/search?name=lisinopril&route=ORAL&limit=10"

Key query parameters:

By default, only current non-excluded records are returned. Pass status=excluded to return current excluded records only, or use an exact status code such as D for discontinued/excluded rows. Compounded drug queries (product_kind=compounded) support a reduced filter set — name, labeler, ingredient, route, marketing_category, dea_schedule — and reject product-only filters such as rxcui, unii, upc, spl_set_id, is_original_packager, pharm_class, status, and package dates.

Drug detail by NDC

Full record for a single product NDC, including all active ingredients, pharmacological classes, routes, package configurations, and cross-reference codes.

curl -H "X-API-Key: fo_live_..." \
  "https://folioapi.com/v1/drugs/12345-678"
{
  "product_ndc": "12345-678",
  "product_kind": "finished",
  "proprietary_name": "Aspirin",
  "non_proprietary_name": "ASPIRIN",
  "labeler_name": "Example Pharma Inc.",
  "marketing_category_name": "OTC MONOGRAPH FINAL",
  "application_number": "part343",
  "exclude_status": null,
  "spl_set_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "dosage_form_name": "TABLET",
  "dea_schedule": null,
  "is_original_packager": true,
  "start_marketing_date": "19500101",
  "end_marketing_date": null,
  "active_ingredients": [
    { "substance": "ASPIRIN", "strength_num": "325", "strength_unit": "mg/1" }
  ],
  "pharm_classes": [
    { "pharm_class": "Cyclooxygenase Inhibitor", "class_type": "EPC" }
  ],
  "routes": ["ORAL"],
  "packages": [
    {
      "ndc_package_code": "12345-678-01",
      "package_description": "100 TABLET in 1 BOTTLE",
      "start_marketing_date": "19500101",
      "end_marketing_date": null,
      "sample_package": "N",
      "exclude_status": null
    }
  ],
  "codes": [
    { "code_system": "rxcui", "code": "1191" }
  ],
  "data_freshness": "2026-06-19"
}

Package detail by NDC

Look up a single package configuration by its NDC package code (e.g. 12345-678-01). Returns the package record plus its parent drug summary.

curl -H "X-API-Key: fo_live_..." \
  "https://folioapi.com/v1/drugs/packages/12345-678-01"

All NDCs under an FDA application

List every product NDC associated with an NDA, BLA, or ANDA application number. Returns an empty array if no current records match; no 404.

curl -H "X-API-Key: fo_live_..." \
  "https://folioapi.com/v1/drugs/applications/NDA019831"

All NDCs under a labeler code

List every product NDC registered under a labeler (manufacturer) code. The labeler code is the first segment of the NDC (4 or 5 digits depending on format). Returns an empty array if no current records match; no 404.

curl -H "X-API-Key: fo_live_..." \
  "https://folioapi.com/v1/drugs/labelers/12345"

Find labeler codes by name substring. Useful when you know a manufacturer's name but not its labeler code.

curl -H "X-API-Key: fo_live_..." \
  "https://folioapi.com/v1/drugs/labelers?name=Pfizer&limit=10"

Common query patterns

Monitoring a labeler's portfolio

Get every active product registered under a specific manufacturer by first finding their labeler code, then listing all NDCs:

# Step 1: find the labeler code
curl -H "X-API-Key: fo_live_..." \
  "https://folioapi.com/v1/drugs/labelers?name=Novo+Nordisk"

# Step 2: list all NDCs under that labeler
curl -H "X-API-Key: fo_live_..." \
  "https://folioapi.com/v1/drugs/labelers/00169"

Poll this daily and diff against yesterday's response. A new product NDC appearing under a labeler is a pre-launch registration signal — manufacturers typically register NDCs 2–8 weeks before first commercial shipment.

List every approved product containing a specific active ingredient across all labelers:

curl -H "X-API-Key: fo_live_..." \
  "https://folioapi.com/v1/drugs/search?ingredient=semaglutide&route=SUBCUTANEOUS"

All formulations under an FDA application

A single NDA or BLA can cover multiple strengths and package configurations. Use the application endpoint to enumerate all of them:

curl -H "X-API-Key: fo_live_..." \
  "https://folioapi.com/v1/drugs/applications/NDA209637"

Finding current excluded records

By default, the search endpoint returns only current non-excluded products. To return current excluded records — useful for tracking withdrawn or excluded listings still present in the FDA snapshot — pass status=excluded:

curl -H "X-API-Key: fo_live_..." \
  "https://folioapi.com/v1/drugs/search?labeler=Purdue+Pharma&status=excluded"

Cross-referencing by RxCUI

If you have an RxNorm concept identifier from another data source, look up all matching NDC products directly:

curl -H "X-API-Key: fo_live_..." \
  "https://folioapi.com/v1/drugs/search?rxcui=1191&limit=20"

Coverage

The Folio drug API mirrors the current FDA NDC Directory snapshot:

Folio refreshes from the FDA's daily ZIP release Monday through Friday. The data_freshness field in every response reflects the most recent ingest date.

Next steps