# FDA NDC Directory: Drug Products & National Drug Code (`scrapers_lat/fda-ndc-drug-directory-scraper`) Actor

Search the FDA National Drug Code (NDC) directory for marketed US drug products: product NDC, labeler/manufacturer, active ingredients, dosage form, route, marketing category and status, DEA schedule, pharm class and packaging-level NDCs. Export to JSON, CSV or Excel.

- **URL**: https://apify.com/scrapers\_lat/fda-ndc-drug-directory-scraper.md
- **Developed by:** [Scrapers Lat](https://apify.com/scrapers_lat) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.32 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

[![FDA NDC Directory: Drug Products & National Drug Code](https://scrapers.lat/banners/fda-ndc-drug-directory-scraper.png)](https://apify.com/scrapers_lat/fda-ndc-drug-directory-scraper)

## FDA NDC Directory: Drug Products & National Drug Code Scraper

Here is one real result, with every field the actor returns:

```json
{
  "productNdc": "82706-032",
  "productId": "82706-032_16f27e7e-6bd6-4543-9b1e-b817b4874f8a",
  "brandName": "Ibuprofen Minis",
  "genericName": "Ibuprofen",
  "labelerName": "Vivunt Pharma LLC",
  "activeIngredients": [{ "name": "IBUPROFEN", "strength": "200 mg/1" }],
  "dosageForm": "CAPSULE, LIQUID FILLED",
  "route": ["ORAL"],
  "productType": "HUMAN OTC DRUG",
  "marketingCategory": "ANDA",
  "marketingStatus": "Active",
  "marketingStartDate": "2026-08-01",
  "marketingEndDate": null,
  "listingExpirationDate": "2027-12-31",
  "applicationNumber": "ANDA206568",
  "deaSchedule": null,
  "packageCount": 2,
  "packages": [
    {
      "packageNdc": "82706-032-01",
      "description": "1 BOTTLE, PLASTIC in 1 BOX (82706-032-01)  / 80 CAPSULE, LIQUID FILLED in 1 BOTTLE, PLASTIC",
      "marketingStartDate": "2026-08-01",
      "sample": false
    },
    {
      "packageNdc": "82706-032-02",
      "description": "1 BOTTLE, PLASTIC in 1 BOX (82706-032-02)  / 160 CAPSULE, LIQUID FILLED in 1 BOTTLE, PLASTIC",
      "marketingStartDate": "2026-08-01",
      "sample": false
    }
  ],
  "pharmClass": ["Nonsteroidal Anti-inflammatory Drug [EPC]"],
  "rxcui": ["310964"],
  "unii": ["WK2XYI10QM"],
  "upc": null,
  "splId": "16f27e7e-6bd6-4543-9b1e-b817b4874f8a",
  "isFinished": true,
  "alternatives": null,
  "aiSummary": null,
  "observedAt": "2026-08-17T04:25:00.000Z",
  "error": null
}
```

The most complete FDA National Drug Code (NDC) directory scraper available. It returns one clean row per marketed US drug product with its product NDC, labeler (manufacturer), active ingredients and strengths, dosage form, route, product type, marketing category and derived marketing status, DEA schedule, pharmacologic class, RxCUI, UNII, UPC, SPL ID, and every packaging-level NDC. Ten structured filters let you target exactly the products you need, and two optional add-ons return therapeutic/generic alternatives and a plain-English AI summary.

**📥 [Input](https://apify.com/scrapers_lat/fda-ndc-drug-directory-scraper/input-schema) · 📤 [Output](https://apify.com/scrapers_lat/fda-ndc-drug-directory-scraper/output-schema) · 💰 [Pricing](https://apify.com/scrapers_lat/fda-ndc-drug-directory-scraper/pricing) · ▶️ [Examples](https://apify.com/scrapers_lat/fda-ndc-drug-directory-scraper/examples)**

![Apify](https://img.shields.io/badge/Platform-Apify-1CE1CE?logo=apify\&logoColor=white)
![Coverage](https://img.shields.io/badge/Coverage-FDA%20NDC%20Directory-blue)
![Output](https://img.shields.io/badge/Output-JSON%20%7C%20CSV%20%7C%20Excel-orange)
![Billing](https://img.shields.io/badge/Billing-Pay%20per%20result-brightgreen)

### Table of contents

- [What it does](#what-it-does)
- [Use cases](#use-cases)
- [Quickstart](#quickstart)
- [Input reference](#input-reference)
- [Output reference](#output-reference)
- [Run via API and CLI](#run-via-api-and-cli)
- [Fetch results](#fetch-results)
- [Billing and limits](#billing-and-limits)
- [FAQ and troubleshooting](#faq-and-troubleshooting)

### What it does

The actor searches the FDA National Drug Code (NDC) directory by generic name, brand name, labeler, exact NDC, product type, route, dosage form, marketing category, DEA schedule, or a raw query expression, paginates through the matching products, and writes one normalized record per drug product to the run's dataset. Each record carries the canonical product NDC, the labeler/manufacturer, active ingredients with strengths, dosage form and route, marketing category, a derived marketing status (Active or Discontinued), marketing start and listing expiration dates, DEA schedule, pharmacologic class, RxCUI, UNII, UPC, SPL ID, and the full list of packaging-level NDCs. Missing source values are returned as `null`.

Two optional add-ons (paid plans only) go beyond the base record:

- **Therapeutic alternatives** looks up other marketed products that share the same generic name from a different labeler, returning `{productNdc, brandName, labelerName, marketingCategory}` for each, ideal for formulary and competitive analysis.
- **AI summary** produces a short plain-English description of the product (what it is, drug class, common uses, prescription or OTC) from its ingredients and pharmacologic class. Informational only, not medical advice.

### Use cases

- **NDC lookup and validation.** Resolve any product NDC or package NDC to its labeler, ingredients, dosage form, and marketing status, the canonical US drug product identifier for claims and orders.
- **Formulary and drug database management.** Build and refresh a formulary or drug master file with ingredients, strengths, routes, pharm class, and RxCUI cross-references.
- **Pharmacy and dispensing systems.** Populate pharmacy software with packaging-level NDCs, dosage forms, and DEA schedules for controlled substances.
- **Drug supply chain and inventory.** Track every package configuration and its NDC across labelers for procurement, wholesaler, and 340B workflows.
- **Reimbursement and 340B/pricing.** Map NDCs to marketing category and status for payer, rebate, and reimbursement pipelines.
- **Competitive and market intelligence.** Find every generic or therapeutic alternative to a product by generic name and labeler.
- **Healthcare data pipelines.** Feed a clean, deduplicated drug product feed into analytics, master data management, or EHR integrations.

### Quickstart

Open the actor, paste this into the input, and press Run. It returns the 50 most recently marketed ibuprofen products.

```json
{
  "genericName": "ibuprofen",
  "maxResults": 50
}
```

Combine filters to narrow further, for example prescription-only oral products from a single labeler:

```json
{
  "labeler": "Pfizer",
  "productType": "prescription",
  "route": "ORAL",
  "maxResults": 200
}
```

### Input reference

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `genericName` | string | no | `ibuprofen` | Filter by generic (non-proprietary) name, for example `atorvastatin`. |
| `brandName` | string | no | (none) | Filter by brand (proprietary) name, for example `Advil`. |
| `labeler` | string | no | (none) | Filter by labeler / manufacturer, for example `Pfizer` or `Teva`. |
| `ndc` | string | no | (none) | Exact product NDC lookup, for example `0069-2587`. |
| `productType` | enum | no | (any) | Restrict to `prescription` or `otc`. |
| `route` | string | no | (none) | Route of administration, for example `ORAL`, `TOPICAL`, `OPHTHALMIC`. |
| `dosageForm` | string | no | (none) | Dosage form, for example `TABLET`, `CAPSULE`, `INJECTION`. |
| `marketingCategory` | string | no | (none) | Marketing/approval category, for example `NDA`, `ANDA`, `BLA`, `OTC MONOGRAPH FINAL`. |
| `deaSchedule` | string | no | (none) | Controlled-substance DEA schedule, for example `CII`, `CIII`, `CIV`, `CV`. |
| `searchQuery` | string | no | (none) | Raw openFDA search expression added on top of the filters, for example `marketing_start_date:[20240101 TO 20241231]`. |
| `maxResults` | integer | no | `50` | Maximum products to collect. Free Apify plans are capped at 10 per run. |
| `includeAlternatives` | boolean | no | `false` | Paid add-on. Therapeutic/generic alternatives per product. Billed only when alternatives are found. |
| `withAiSummary` | boolean | no | `false` | Paid add-on. AI plain-English summary per product. Billed only when produced. |

### Output reference

One dataset item per drug product. Types: `string`, `boolean`, `integer`, `string[]`, `object[]`, or `null` when the source value is absent.

| Field | Type | Description |
|---|---|---|
| `productNdc` | string | Product NDC, the canonical US drug product identifier, for example `82706-032`. |
| `productId` | string | Full FDA product identifier (NDC plus SPL set id). |
| `brandName` | string | Brand (proprietary) name, or `null`. |
| `genericName` | string | Generic (non-proprietary) name. |
| `labelerName` | string | Labeler / manufacturer name. |
| `activeIngredients` | object\[] | Active ingredients as `{name, strength}`. |
| `dosageForm` | string | Dosage form, for example `TABLET` or `CAPSULE, LIQUID FILLED`. |
| `route` | string\[] | Route(s) of administration. |
| `productType` | string | `HUMAN PRESCRIPTION DRUG`, `HUMAN OTC DRUG`, or other FDA product type. |
| `marketingCategory` | string | Marketing/approval category, for example `NDA`, `ANDA`, `OTC MONOGRAPH FINAL`, `BLA`. |
| `marketingStatus` | string | Derived status: `Active`, or `Discontinued` when a marketing end date is set or the listing has expired. |
| `marketingStartDate` | string | Marketing start date, `YYYY-MM-DD`. |
| `marketingEndDate` | string | Marketing end date when present, else `null`. |
| `listingExpirationDate` | string | NDC listing expiration date, `YYYY-MM-DD`. |
| `applicationNumber` | string | FDA application number when present, for example `ANDA206568`. |
| `deaSchedule` | string | Controlled-substance schedule (`CII`..`CV`), or `null`. |
| `packageCount` | integer | Number of packaging configurations. |
| `packages` | object\[] | Packaging-level NDCs as `{packageNdc, description, marketingStartDate, sample}`. |
| `pharmClass` | string\[] | Established pharmacologic class (EPC), or `null`. |
| `rxcui` | string\[] | RxNorm concept unique identifiers, or `null`. |
| `unii` | string\[] | Unique ingredient identifiers, or `null`. |
| `upc` | string\[] | Universal Product Codes when present, or `null`. |
| `splId` | string | Structured Product Labeling document id. |
| `isFinished` | boolean | Whether this is a finished (marketable) product. |
| `alternatives` | object\[] | Add-on: therapeutic/generic alternatives, or `null`. |
| `aiSummary` | object | Add-on: `{whatItIs, drugClass, commonUses, prescriptionOrOtc}`, or `null`. |
| `observedAt` | string | ISO 8601 timestamp of when the record was collected. |
| `error` | string | `null` on success. On a failed run, a single item with a populated `error` field is written instead. |

### Run via API and CLI

Start a run and read the dataset. Replace `<TOKEN>` with your Apify API token.

Run synchronously and get dataset items in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~fda-ndc-drug-directory-scraper/run-sync-get-dataset-items?token=<TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"genericName":"atorvastatin","maxResults":100}'
```

Start a run asynchronously (labeler plus filters):

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~fda-ndc-drug-directory-scraper/runs?token=<TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"labeler":"Pfizer","productType":"prescription","maxResults":500}'
```

Apify CLI:

```bash
apify call scrapers_lat/fda-ndc-drug-directory-scraper \
  --input '{"deaSchedule":"CII","maxResults":50}'
```

### Fetch results

Every run writes to a dataset. Fetch items as JSON, CSV, or Excel by changing `format`:

```bash
## JSON
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=json"

## CSV
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=csv"

## Paginate large datasets
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&offset=1000&limit=1000"
```

`<DATASET_ID>` is returned as `defaultDatasetId` in the run object. Use `offset` and `limit` to page through large result sets. `clean=true` drops empty and internal fields.

### Billing and limits

- **Pay per result.** You are charged per drug product returned (`result` event). See the [pricing tab](https://apify.com/scrapers_lat/fda-ndc-drug-directory-scraper/pricing) for the current per-result price.
- **Alternatives add-on.** When `includeAlternatives` is on, the `alternatives` event is billed once per product only when therapeutic/generic alternatives are found. Paid plans only.
- **AI summary add-on.** When `withAiSummary` is on, the `ai_summary` event is billed per product only when the model returns usable output. Paid plans only. The summary is informational and not medical advice.
- **No charge on failure.** If a run errors or matches nothing, the actor writes a single item with a populated `error` field (or no items) and does not charge for it.
- **Spend cap respected.** Set `maxTotalChargeUsd` on the run; once reached, the actor stops emitting and charging further billable results.
- **Free Apify plans** are capped at 10 products per run, and the paid add-ons are disabled. Upgrade for higher `maxResults` and add-ons.

### FAQ and troubleshooting

**A search returned 0 products. Why?**
The query matched nothing in the FDA NDC directory. Zero-result runs are not charged. Loosen the filters or check the spelling of the generic or brand name.

**What is the difference between a product NDC and a package NDC?**
The product NDC identifies the drug product (labeler plus product). Each product can have several package NDCs, one per packaging configuration (bottle, carton, blister). Both are returned.

**How is marketing status derived?**
A product is `Active` unless it has a marketing end date or its NDC listing expiration date is in the past, in which case it is `Discontinued`.

**How do I look up one specific NDC?**
Put the product NDC in the `ndc` field, for example `0069-2587`.

**Can I combine filters?**
Yes. All filters are combined with AND, and `searchQuery` lets you add any raw openFDA expression on top.

**Is this the same as drug labeling or adverse events?**
No. This actor covers the NDC product directory (identity, packaging, marketing). Drug labeling text and adverse event reports are separate datasets.

# Actor input Schema

## `genericName` (type: `string`):

Filter by the drug's generic (non-proprietary) name, for example ibuprofen, atorvastatin or amoxicillin. Matches the FDA generic\_name field.

## `brandName` (type: `string`):

Filter by the drug's brand (proprietary) name, for example Advil, Lipitor or Tylenol.

## `labeler` (type: `string`):

Filter by the labeler or manufacturer name, for example Pfizer, Teva or Johnson & Johnson.

## `ndc` (type: `string`):

Look up one product by its exact product NDC, for example 0069-2587 or 83324-014. Use this for a precise single-product lookup.

## `productType` (type: `string`):

Restrict to prescription or over-the-counter (OTC) products. Leave as Any to include both.

## `route` (type: `string`):

Restrict to a route of administration, for example ORAL, TOPICAL, INTRAVENOUS, OPHTHALMIC or NASAL. Leave empty for all routes.

## `dosageForm` (type: `string`):

Restrict to a dosage form, for example TABLET, CAPSULE, SOLUTION, INJECTION or SUSPENSION. Leave empty for all forms.

## `marketingCategory` (type: `string`):

Restrict to a marketing/approval category, for example NDA, ANDA, BLA, OTC MONOGRAPH FINAL or UNAPPROVED DRUG OTHER. Leave empty for all categories.

## `deaSchedule` (type: `string`):

Restrict to a controlled-substance DEA schedule, for example CII, CIII, CIV or CV. Leave empty for all products.

## `searchQuery` (type: `string`):

Optional raw openFDA search expression, added on top of the filters above. Example: openfda.pharm\_class\_epc:"Nonsteroidal Anti-inflammatory Drug \[EPC]" or marketing\_start\_date:\[20240101 TO 20241231]. Leave empty unless you know the openFDA query syntax.

## `maxResults` (type: `integer`):

Maximum number of drug products to collect. Large pulls are paginated (up to 25000 records per query), so narrow with a filter for bigger datasets. Free Apify plans are capped at 10 per run.

## `includeAlternatives` (type: `boolean`):

For each product, look up other marketed products with the same generic name from a different labeler (generic/therapeutic alternatives for formulary and competitive analysis). Charged as a separate 'alternatives' event only when alternatives are found. Requires a paid Apify plan.

## `withAiSummary` (type: `boolean`):

Generate a short AI summary of each product (what it is, drug class, common uses, prescription or OTC) from its ingredients and pharmacologic class. Informational only, not medical advice. Charged as a separate 'ai\_summary' event only on usable output. Requires a paid Apify plan.

## `proxyConfiguration` (type: `object`):

Optional proxy. The FDA NDC directory is a public, keyless API and normally needs no proxy.

## Actor input object example

```json
{
  "genericName": "ibuprofen",
  "productType": "",
  "maxResults": 50,
  "includeAlternatives": false,
  "withAiSummary": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "genericName": "ibuprofen",
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers_lat/fda-ndc-drug-directory-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "genericName": "ibuprofen",
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapers_lat/fda-ndc-drug-directory-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "genericName": "ibuprofen",
  "maxResults": 50
}' |
apify call scrapers_lat/fda-ndc-drug-directory-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapers_lat/fda-ndc-drug-directory-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/X8T7v1LECsmVOveU9/builds/eUoTzkqnznICyoaZ6/openapi.json
