# openFDA NDC Directory Scraper (`neuton/openfda-ndc-directory-scraper`) Actor

Extract FDA National Drug Code directory records for brand, generic, labeler, dosage, package, and marketing-status intelligence.

- **URL**: https://apify.com/neuton/openfda-ndc-directory-scraper.md
- **Developed by:** [Ashwin Prasad](https://apify.com/neuton) (community)
- **Categories:** Business, AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 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.

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

## openFDA NDC Directory Scraper

Extract structured FDA National Drug Code directory records from openFDA. This actor is useful for drug product enrichment, pharmaceutical market research, compliance checks, medication catalog matching, and healthcare data pipelines.

### Why this actor

NDC directory data is a practical enrichment layer for pharmacies, payers, providers, drug catalog vendors, healthcare data teams, pharmaceutical analysts, and AI/RAG systems. It helps normalize brand names, generic names, labelers, dosage forms, routes, package data, marketing categories, and listing dates from an official public source.

SEO keywords covered by this Store page include openFDA NDC directory scraper, National Drug Code API, FDA NDC data export, drug product catalog enrichment, labeler NDC lookup, medication database enrichment, pharmaceutical compliance data, and NDC package dataset.

### Output

- Product NDC, brand name, generic name, labeler name, and product type
- Dosage form, route, marketing category, marketing start date, and listing expiration date
- Active ingredients, packaging details, application number, source URL, raw FDA payload, and scrape timestamp

### Use cases

- Enrich pharmacy, payer, provider, and life-sciences product databases
- Monitor product listings by labeler, brand, generic, or marketing category
- Build compliance dashboards for marketed drug products
- Feed AI agents and internal workflows with official FDA NDC data
- Match internal product catalogs to official NDC, route, dosage, package, and labeler fields

### Example input

```json
{
  "brandNames": ["Advil"],
  "genericNames": ["ibuprofen"],
  "labelerNames": ["Pfizer"],
  "maxResultsPerSearch": 25
}
```

### Agent and automation workflows

Send NDC rows to a warehouse, Airtable, CRM, catalog system, Make, n8n, or vector database. Agents can normalize product records, summarize active ingredients, compare labelers, detect expiring listings, and join NDC data with labels, recalls, adverse events, and Drugs@FDA application records.

### Responsible use

This actor extracts public FDA/openFDA directory data for enrichment, research, and compliance support. Do not use the output as medical advice or a substitute for regulated review. Verify important drug, billing, clinical, or compliance decisions against authoritative FDA materials.

### Pricing

Recommended launch pricing: $2-$3 per 1,000 NDC rows, increasing toward $4-$6 per 1,000 after recurring pharma or compliance usage appears.

# Actor input Schema

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

Brand name keyword, for example aspirin, Ozempic, or Tylenol.

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

Optional generic name keyword.

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

Optional manufacturer or labeler keyword.

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

Optional product type filter, for example HUMAN OTC DRUG.

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

Optional marketing category filter, for example NDA or ANDA.

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

Maximum number of NDC product rows to return.

## Actor input object example

```json
{
  "brandName": "aspirin",
  "genericName": "",
  "labelerName": "",
  "productType": "",
  "marketingCategory": "",
  "maxResults": 100
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("neuton/openfda-ndc-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("neuton/openfda-ndc-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 '{}' |
apify call neuton/openfda-ndc-directory-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,neuton/openfda-ndc-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/AUxeOCHP6KC8MAF0h/builds/8KNrX5FlEhZVjuR4t/openapi.json
