# FDA Drug NDC & Labeler Directory Scraper (`crawlerbros/fda-drug-labeler-scraper`) Actor

Search the FDA's public National Drug Code (NDC) Directory (openFDA) by labeler/company name, brand name, generic name, or product NDC. Returns real drug listings with labeler (manufacturer) company name, address info via openFDA, dosage form, route, marketing category, and active ingredients.

- **URL**: https://apify.com/crawlerbros/fda-drug-labeler-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Lead generation, Developer tools, Integrations
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Drug NDC & Labeler Directory Scraper

Search the FDA's public **National Drug Code (NDC) Directory** (openFDA) by labeler/manufacturer company name, brand name, generic (active ingredient) name, or an exact product NDC code. Returns real, current drug listing data — labeler company, dosage form, route of administration, marketing category, active ingredients, packaging, and more. HTTP-only via the public `api.fda.gov` REST API. No auth, no login, no proxy required.

### What this actor does

- **Six search modes:** search by labeler/company, by brand name, by generic name, look up one exact product NDC, look up every NDC listing filed under one FDA application number (NDA/ANDA/BLA), or look up one exact package NDC
- **Filters:** product type, marketing category (ANDA/NDA/BLA/OTC monograph/etc.), route of administration (all 70 FDA routes), dosage form (140+ FDA forms), pharmacologic class, DEA controlled-substance schedule (CI–CV), finished-products-only
- **Sorting:** by marketing start date or listing expiration date, ascending or descending
- **Rich company data:** labeler/manufacturer name, application number, active ingredients with strengths, packaging descriptions and package NDCs, pharmacologic classes
- **Empty fields are omitted** — every record only contains fields openFDA actually populated

### Output per listing

- `productNdc` — the FDA National Drug Code
- `brandName`, `brandNameBase`, `genericName`
- `labelerName`, `manufacturerName`
- `dosageForm`, `route`, `productType`, `marketingCategory`
- `marketingStartDate`, `marketingEndDate`, `listingExpirationDate`
- `applicationNumber`, `finished`, `deaSchedule` (only present for DEA-controlled substances)
- `activeIngredients[]`, `pharmClasses[]`, `packageDescriptions[]`, `packageNdcs[]`
- `rxcui`, `unii`, `upc` — cross-reference identifiers where available
- `productId`, `splId`, `splSetId` — FDA Structured Product Labeling identifiers where available
- `sourceUrl` — direct openFDA API query URL for the record
- `recordType: "ndcListing"`, `scrapedAt`

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | select | `searchByLabeler` | `searchByLabeler` / `searchByBrand` / `searchByGeneric` / `byProductNdc` / `byApplicationNumber` / `byPackageNdc` |
| `labelerName` | string | – | Company name (required for mode=searchByLabeler; suggested value `pfizer`) |
| `brandName` | string | – | Brand name (mode=searchByBrand) |
| `genericName` | string | – | Generic/active-ingredient name (mode=searchByGeneric) |
| `productNdc` | string | – | Exact NDC code (mode=byProductNdc) |
| `applicationNumber` | string | – | Exact FDA application number, e.g. `NDA213871` (mode=byApplicationNumber) |
| `packageNdc` | string | – | Exact package-level NDC code, e.g. `0069-0235-30` (mode=byPackageNdc) |
| `productType` | select | – | Filter by FDA product type |
| `marketingCategory` | select | – | Filter by approval/marketing category |
| `route` | select | – | Filter by route of administration (all 70 FDA routes) |
| `dosageForm` | string | – | Filter by FDA dosage form, e.g. `TABLET`, `CREAM` (case-insensitive, matches whole words within the form -- e.g. `TABLET` also matches `TABLET, FILM COATED`) |
| `pharmClass` | string | – | Filter by pharmacologic class keyword, e.g. `vaccine`, `Opioid` (case-insensitive, matches whole words) |
| `deaSchedule` | select | – | Filter by DEA controlled-substance schedule (CI–CV) |
| `finishedOnly` | boolean | `false` | Only finished drug products |
| `sortBy` | select | – | Sort by `marketingStartDate` or `listingExpirationDate`, ascending or descending. Default is openFDA's unsorted relevance order |
| `maxItems` | integer | `50` | Hard cap on emitted records (1–1000) |

#### Example: prescription drugs manufactured by Pfizer

```json
{
  "mode": "searchByLabeler",
  "labelerName": "pfizer",
  "productType": "HUMAN PRESCRIPTION DRUG",
  "maxItems": 50
}
```

#### Example: lookup by exact NDC

```json
{
  "mode": "byProductNdc",
  "productNdc": "0069-0235"
}
```

#### Example: lookup by FDA application number

```json
{
  "mode": "byApplicationNumber",
  "applicationNumber": "NDA213871"
}
```

#### Example: lookup by exact package NDC

```json
{
  "mode": "byPackageNdc",
  "packageNdc": "0069-0235-30"
}
```

#### Example: newest vaccines by pharmacologic class, sorted by marketing start date

```json
{
  "mode": "searchByGeneric",
  "genericName": "influenza",
  "pharmClass": "vaccine",
  "sortBy": "marketingStartDate:desc",
  "maxItems": 25
}
```

### Use cases

- **Pharmacovigilance & compliance** — pull every NDC listing filed by a manufacturer to audit label/marketing category status
- **Pharmacy & PBM systems** — resolve NDC codes to brand/generic names, dosage form, and route for formulary management
- **Drug database enrichment** — bulk-import active-ingredient and packaging data by generic name or pharmacologic class
- **Controlled-substance tracking** — filter by DEA schedule to monitor scheduled-drug listings
- **Market research** — track new drug approvals and marketing start dates for a therapeutic class over time

### Data source

Data comes from the [openFDA National Drug Code (NDC) Directory](https://open.fda.gov/apis/drug/ndc/), a genuinely public, free, no-authentication REST API published by the U.S. Food & Drug Administration. This actor replaces an originally-planned state Secretary-of-State business search target that was found to be fully blocked by enterprise bot management (Akamai / Cloudflare Turnstile challenges) even under real headless-browser testing — openFDA offers an equivalent, reliably scrapable company/business directory search.

### FAQs

**Do I need an API key?** No. openFDA's public endpoints work without any key for this actor's usage levels.

**Can I search by company name partially?** Yes — labeler/brand/generic name searches are full-text matches, so partial names work (e.g. `pfizer` matches `Pfizer Inc.`, `Pfizer Consumer Healthcare`, etc.).

**Why are some fields missing from a record?** Only fields openFDA has actually populated for that listing are included — no null placeholders or "N/A" values are ever emitted.

# Actor input Schema

## `mode` (type: `string`):

What to search.

## `labelerName` (type: `string`):

Company name that owns the drug listing (mode=searchByLabeler). Partial match, e.g. `pfizer`.

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

Marketed brand name (mode=searchByBrand), e.g. `Advil`.

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

Generic drug name (mode=searchByGeneric), e.g. `ibuprofen`.

## `productNdc` (type: `string`):

Exact product NDC code (mode=byProductNdc), e.g. `0069-0235`.

## `applicationNumber` (type: `string`):

Exact FDA application number (mode=byApplicationNumber), e.g. `NDA213871`. Returns every NDC listing filed under that approval.

## `packageNdc` (type: `string`):

Exact package-level NDC code, e.g. `0069-0235-30` (mode=byPackageNdc). Different from the product NDC -- identifies one specific package configuration.

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

Filter to a specific FDA product type.

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

Filter to a specific FDA marketing/approval category.

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

Filter to a specific route of administration.

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

Filter to a specific DEA controlled-substance schedule (only present on controlled substances; most listings have none).

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

Filter to an FDA dosage form, e.g. `TABLET`, `CAPSULE`, `INJECTION`, `CREAM`. Free text (openFDA has 140+ distinct dosage forms) -- matching is case-insensitive and matches on whole words within the form, so `TABLET` also matches `TABLET, FILM COATED` and `TABLET, SUGAR COATED`.

## `pharmClass` (type: `string`):

Filter to a pharmacologic class keyword, e.g. `vaccine`, `Nonsteroidal Anti-inflammatory Drug`, `Opioid`. Free text (openFDA has thousands of distinct pharmacologic class values) -- case-insensitive, matches whole words within the class name.

## `finishedOnly` (type: `boolean`):

Only include finished drug products (exclude bulk/unfinished ingredients).

## `sortBy` (type: `string`):

Sort order for results. Default is openFDA's relevance order (unsorted).

## `maxItems` (type: `integer`):

Hard cap on emitted records.

## Actor input object example

```json
{
  "mode": "searchByLabeler",
  "labelerName": "pfizer",
  "productType": "",
  "marketingCategory": "",
  "route": "",
  "deaSchedule": "",
  "finishedOnly": false,
  "sortBy": "",
  "maxItems": 50
}
```

# Actor output Schema

## `listings` (type: `string`):

Dataset containing all scraped NDC drug listings.

# 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 = {
    "mode": "searchByLabeler",
    "labelerName": "pfizer",
    "productType": "",
    "marketingCategory": "",
    "route": "",
    "deaSchedule": "",
    "finishedOnly": false,
    "sortBy": "",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/fda-drug-labeler-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 = {
    "mode": "searchByLabeler",
    "labelerName": "pfizer",
    "productType": "",
    "marketingCategory": "",
    "route": "",
    "deaSchedule": "",
    "finishedOnly": False,
    "sortBy": "",
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/fda-drug-labeler-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 '{
  "mode": "searchByLabeler",
  "labelerName": "pfizer",
  "productType": "",
  "marketingCategory": "",
  "route": "",
  "deaSchedule": "",
  "finishedOnly": false,
  "sortBy": "",
  "maxItems": 50
}' |
apify call crawlerbros/fda-drug-labeler-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlerbros/fda-drug-labeler-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/PnzatlpNGgJEtpr9n/builds/YfBQCS3ntMoGtHrvv/openapi.json
