# FDA NDC Product Directory (`zinin/fda-ndc-product-directory`) Actor

Search the official openFDA NDC catalogue by brand, generic name, labeler or NDC and retrieve products, packages, dosage forms, routes and marketing categories.

- **URL**: https://apify.com/zinin/fda-ndc-product-directory.md
- **Developed by:** [Tim Zinin](https://apify.com/zinin) (community)
- **Categories:** Business
- **Features:** Limited permissions
- **Stats:** 5 total users, 4 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## FDA NDC Product Directory

Search the official **openFDA National Drug Code (NDC) Directory** by brand name, generic name, labeler, or NDC. Receive normalized product rows with package NDCs, package descriptions, ingredients, dosage form, route, marketing category, dates, and source provenance.

This Actor uses only `https://api.fda.gov/drug/ndc.json`. It does not scrape HTML, use proxies, or require an API key for the default input.

> **Important:** inclusion in the NDC Directory indicates that a product was listed with FDA. **NDC listing is not FDA approval**, and these unvalidated data must not be used as medical advice or as the sole basis for care, regulatory, purchasing, or dispensing decisions.

### Use cases

- Normalize pharmacy and distributor catalogues against product and package NDCs.
- Reconcile supplier brand, generic-name, and labeler fields.
- Enrich a product master with dosage form, route, ingredients, packaging, and marketing category.
- Audit catalogue records and retain a traceable source URL and retrieval timestamp.

### Input

| Field | Description | Limits |
|---|---|---|
| `searches` | Terms interpreted using `searchBy`. | 1–20 terms |
| `searchBy` | `brand`, `generic`, `labeler`, or `ndc`. | One value |
| `maxItemsPerSearch` | Maximum product records per term. | 1–100 |

Example:

```json
{
  "searches": ["Advil", "Motrin"],
  "searchBy": "brand",
  "maxItemsPerSearch": 10
}
```

All arrays and the total result workload are hard-capped. Terms are normalized and case-insensitive duplicates are removed before requests begin.

### Output

Each matched NDC product is one `found: true` row:

```json
{
  "found": true,
  "searchTerm": "Advil",
  "searchBy": "brand",
  "productNdc": "0573-0160",
  "brandName": "ADVIL",
  "genericName": "ibuprofen",
  "labelerName": "Haleon US Holdings LLC",
  "activeIngredients": [{ "name": "IBUPROFEN", "strength": "200 mg/1" }],
  "packages": [{ "package_ndc": "0573-0160-17", "description": "1 BOTTLE in 1 CARTON ..." }],
  "dosageForm": "TABLET, COATED",
  "route": ["ORAL"],
  "marketingCategory": "NDA",
  "source": "U.S. Food and Drug Administration openFDA NDC Directory",
  "sourceUrl": "https://api.fda.gov/drug/ndc.json?search=...&limit=10",
  "retrievedAt": "2026-11-10T19:51:18.000Z",
  "disclaimer": "NDC listing is not evidence of FDA approval."
}
```

A genuine no-match or source error produces one `found: false` row with `error`, `source`, `sourceUrl`, and `retrievedAt`. Those explanatory rows are not charged as `result-found`.

### Pricing

**$0.002 per NDC product row (`result-found`) on the Free plan, with automatic discounts on paid Apify plans: Bronze −5%, Silver −10%, Gold −15%, Platinum −18%, Diamond −20%. A small Actor start event ($0.002) applies per run**

Successful `found: true` product rows use pay-per-event billing. Delivery and the `result-found` event are atomic. No-match and error rows are free of the result event.

### Limitations

- openFDA data can be delayed, incomplete, changed, or erroneous. The Actor returns the source's current response rather than an independently verified registry.
- Search uses openFDA fields and syntax; it is not a fuzzy medicine-name resolver.
- Each query returns at most 100 products. The Actor does not bulk-download the entire directory.
- Package entries are nested in their product row; one product can contain many packages.
- The official API can rate-limit or temporarily fail. Requests are sequential with timeouts and bounded retries for HTTP 429, 5xx, and transient network failures.
- Do not infer approval status from `marketingCategory`, `applicationNumber`, or NDC presence.

### Source, terms, and attribution

Data source: [U.S. FDA openFDA NDC endpoint](https://api.fda.gov/drug/ndc.json). Review the [openFDA terms of service](https://open.fda.gov/terms/), [licence and attribution guidance](https://open.fda.gov/license/), and [NDC Directory explanation](https://open.fda.gov/apis/drug/ndc/). Every output row identifies openFDA as its source and includes the exact API request URL and `retrievedAt` timestamp.

This Actor is an independent tool and is not endorsed by FDA.

### Related Actors

- [fda-adverse-event-aggregate](https://apify.com/zinin/fda-adverse-event-aggregate)
- [fda-food-recall-monitor](https://apify.com/zinin/fda-food-recall-monitor)
- [fda-approval-feed](https://apify.com/zinin/fda-approval-feed)

# Actor input Schema

## `searches` (type: `array`):

Brand names, generic names, labelers, or NDCs to find. Choose the matching field below. One term per line.

## `searchBy` (type: `string`):

The official NDC field searched for every term.

## `maxItemsPerSearch` (type: `integer`):

Maximum NDC product rows returned for each term.

## Actor input object example

```json
{
  "searches": [
    "Advil"
  ],
  "searchBy": "brand",
  "maxItemsPerSearch": 5
}
```

# Actor output Schema

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

API URL for the default dataset items produced by this run.

# 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 = {
    "searches": [
        "Advil"
    ],
    "searchBy": "brand",
    "maxItemsPerSearch": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("zinin/fda-ndc-product-directory").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 = {
    "searches": ["Advil"],
    "searchBy": "brand",
    "maxItemsPerSearch": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("zinin/fda-ndc-product-directory").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 '{
  "searches": [
    "Advil"
  ],
  "searchBy": "brand",
  "maxItemsPerSearch": 5
}' |
apify call zinin/fda-ndc-product-directory --silent --output-dataset

```

## MCP server setup

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

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/rIXpSWJbp9kniQsZk/builds/oIfSZnkeV6lIbrKtK/openapi.json
