# openFDA Drug Label & NDC lookup (`apex-nexus/openfda-drug-label-lookup`) Actor

openFDA Drug Label & NDC lookup - a stateless Apify Agent tool (Kind B) that looks up approved FDA drug labels via the public openFDA drug/label API and returns normalized citation-ready rows with SPL ID, set_id and DailyMed citation links. FREE listing.

- **URL**: https://apify.com/apex-nexus/openfda-drug-label-lookup.md
- **Developed by:** [Valunex](https://apify.com/apex-nexus) (community)
- **Categories:** Business
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

## openFDA Drug Label & NDC lookup — FDA drug labels as citation-ready rows

Look up approved FDA drug labels via the public openFDA drug/label API.
Bring a drug brand name, generic name, active ingredient or NDC; the
Actor returns one normalized, citation-ready row per matching label
record — **brand name, generic name, dosage form, route, active
ingredient, warnings, indications, SPL ID, set_id** — plus DailyMed and
openFDA API citation links, ready for AI-assistant consumption.

**Actor:** `apex-nexus~openfda-drug-label-lookup`
**Store listing:** FREE — openFDA Drug Label & NDC lookup

### What it is for

A stateless agent tool for pharmacists, medical-affairs teams, health
writers/patient-education platforms and clinical-informatics teams who
need approved drug-label content inside assistant or workflow tools.

Run the Actor with a list of drugs and it:

1. Queries the public openFDA drug/label API
   (`https://api.fda.gov/drug/label.json`) for each term — one request
   per term covering brand name, generic name, active ingredient and
   NDC fields.
2. Returns one row per matching label record with the label fields above
   and citation links (SPL ID, set_id, DailyMed link, openFDA API URL).
3. Finishes fast: openFDA answers in ~2 s, so the default run returns
   rows in seconds, always well under 5 minutes.

Typical workflows:

- **Pharmacist — check a label.** Look up `TYLENOL` and get the brand
  name, generic name (ACETAMINOPHEN), route (ORAL), warnings and
  indications, with the DailyMed citation link for verification.
- **Medical-affairs — ingredient index.** Look up an active ingredient
  such as `ACETAMINOPHEN` and see every brand/SPL that carries it.
- **Health writer — patient-education source.** Pull indications and
  warnings for `ADVIL` with citation links to the approved label.
- **Informatics — NDC-to-label.** Look up an NDC such as
  `50580-590-02` and get the label record it belongs to.

### What this is NOT

This is explicitly **not a tracker**: there are no checkpoints, no delta
alerts, no watchlist state, and nothing is remembered between runs. Each
run is stateless and independent. It does not monitor labels, watch
NDCs, or alert on changes (apex-nexus trackers are frozen by policy).
The Actor is free when there is nothing to return (an empty dataset
costs nothing).

### Buyer

Pharmacists, medical-affairs teams, health writers/patient-education
platforms, and clinical-informatics teams who need approved drug-label
content inside assistant/workflow tools. FREE-first listing; any
pay-per-event monetization flip only after usage evidence.

### Data sources

Public US government data only, via the official openFDA API:

- `https://api.fda.gov/drug/label.json` — openFDA drug label API, public,
  no API key required (240 requests/minute and 1,000 requests/day per IP
  without a key), JSON, public domain
  (https://open.fda.gov/apis/drug/label/)
- Citation links resolve to DailyMed
  (`https://dailymed.nlm.nih.gov/dailymed/drugInfo.cfm?set_id={set_id}`)

No credentials, no proxies, no scraping of anti-bot pages, and no
commercial inference (no LLMs) inside the product. One request per
input drug, so openFDA rate guidance is respected trivially.

openFDA disclaimer applies: https://open.fda.gov/terms/ — do not rely on
openFDA to make decisions regarding medical care.

### Search terms (Store discovery)

Users find this Actor on the Apify Store with terms such as:

- openFDA drug label lookup
- FDA drug label agent tool
- drug label API for AI assistant
- NDC label lookup
- SPL label extractor
- openFDA brand name search
- TYLENOL acetaminophen label
- DailyMed SPL lookup

The Store title and description carry the core terms ("openFDA Drug
Label & NDC lookup", "FDA drug label", "NDC lookup", "SPL ID", "set_id");
this section lists them for reference when updating the listing metadata.

### Input

See `.actor/input_schema.json`. Every field is optional; the default run
looks up `["TYLENOL", "ADVIL", "LIPITOR"]`.

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `drugs` | array of strings | `["TYLENOL", "ADVIL", "LIPITOR"]` | Drug brand names, generic names, active ingredients or NDCs to look up. Deduplicated, order preserved, max 50 per run. |
| `limit` | integer | `3` | Max label records returned per drug, 1-10. |

Example input (default run):

```json
{
  "drugs": ["TYLENOL", "ADVIL", "LIPITOR"]
}
```

Example input (NDC lookup, one record per term):

```json
{
  "drugs": ["50580-590-02", "ACETAMINOPHEN"],
  "limit": 1
}
```

### Output

One dataset item per matching openFDA label record. Download the whole
dataset as CSV or JSON from the Apify run. See
`.actor/output_schema.json` and `.actor/dataset_schema.json`.

| Field | Type | Description |
|-------|------|-------------|
| `query` | string | Drug term searched |
| `brand_name` | string|null | Brand name (e.g. TYLENOL Extra Strength) |
| `generic_name` | string|null | Generic name (e.g. ACETAMINOPHEN) |
| `dosage_form` | string|null | Dosage form (e.g. TABLET) |
| `route` | string|null | Route of administration (e.g. ORAL) |
| `active_ingredient` | string|null | Active ingredient (e.g. ACETAMINOPHEN) |
| `spl_id` | string|null | SPL ID — citation anchor for the label |
| `set_id` | string|null | SPL set ID — used for the DailyMed link |
| `product_ndc` | string|null | Product NDC |
| `warnings` | string|null | Warnings section text |
| `indications` | string|null | Indications & usage section text |
| `found` | boolean | True when openFDA returned a match for the query |
| `label_url` | string|null | DailyMed citation link (from set_id) |
| `openfda_api_url` | string | openFDA API URL used to source the row |
| `retrieved_at` | string | UTC timestamp (ISO 8601) |

Example output item (TYLENOL, first record):

```json
{
  "query": "TYLENOL",
  "brand_name": "TYLENOL Extra Strength",
  "generic_name": "ACETAMINOPHEN",
  "dosage_form": null,
  "route": "ORAL",
  "active_ingredient": "ACETAMINOPHEN",
  "spl_id": "22d94fd9-9488-a812-e063-6394a90a7ffc",
  "set_id": "015a6179-bacb-452d-b594-4de628ddc11d",
  "product_ndc": "50580-590",
  "warnings": "Warnings Liver warning This product contains acetaminophen. ...",
  "indications": "Uses temporarily relieves minor aches and pains due to: ...",
  "found": true,
  "label_url": "https://dailymed.nlm.nih.gov/dailymed/drugInfo.cfm?set_id=015a6179-bacb-452d-b594-4de628ddc11d",
  "openfda_api_url": "https://api.fda.gov/drug/label.json?search=openfda.brand_name:%22TYLENOL%22+OR+...&limit=3",
  "retrieved_at": "2026-11-04T14:00:00+00:00"
}
```

A term with no matches yields one row with `"found": false` and empty
label fields, so the caller can distinguish "checked, nothing approved"
from "not looked up".

### Example runs

**Default run — TYLENOL, ADVIL, LIPITOR (3 records each, ~2 s per term):**

```json
{
  "drugs": ["TYLENOL", "ADVIL", "LIPITOR"]
}
```

**NDC lookup:**

```json
{
  "drugs": ["50580-590-02"],
  "limit": 1
}
```

**Active ingredient lookup:**

```json
{
  "drugs": ["ACETAMINOPHEN", "ATORVASTATIN"],
  "limit": 5
}
```

### Limits

- One openFDA request per input drug; `limit` caps records per drug at
  1-10; `drugs` capped at 50 terms per run — far below openFDA's keyless
  rate guidance (240 req/min, 1,000 req/day per IP).
- Terms are searched across brand name, generic name, active ingredient
  and NDC fields in a single OR query.
- openFDA result order is used as-is; rows are deduplicated only within
  the input list, not across terms.
- Invalid input finishes with an empty dataset rather than crashing.
- openFDA may limit or restrict access per its Terms of Service.

### Quality gate (live, verified)

The default input (`["TYLENOL", "ADVIL", "LIPITOR"]`) returns more than
0 citation-ready label rows in under 5 minutes on the live Apify
platform (see the run ID and gate result recorded with the build).
Competing store drug/label actors are per-result paid scrapers; this
Actor returns structured label rows with citations for free.

### Claims statement

All claims in this README are limited to what the product verifiably
does: it reads public openFDA drug label data through the official
openFDA API and returns normalized CSV/JSON rows with citation links.
This README contains no revenue, user, or adoption claims, because none
are verified.

# Actor input Schema

## `drugs` (type: `array`):

Drug brand names (e.g. TYLENOL), generic names, active ingredients or NDCs (e.g. 50580-590-02) to look up on the public openFDA drug/label API. Default: \["TYLENOL", "ADVIL", "LIPITOR"]. Each term is searched across brand name, generic name, active ingredient and NDC fields in one request.

## `limit` (type: `integer`):

Cap on the number of openFDA label records returned per drug (1-10). openFDA answers in ~2 s, so the default run finishes in seconds.

## Actor input object example

```json
{
  "drugs": [
    "TYLENOL",
    "ADVIL",
    "LIPITOR"
  ],
  "limit": 3
}
```

# Actor output Schema

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

Normalized openFDA drug label rows — one item per matching label record.

# 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("apex-nexus/openfda-drug-label-lookup").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("apex-nexus/openfda-drug-label-lookup").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 apex-nexus/openfda-drug-label-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,apex-nexus/openfda-drug-label-lookup"
        }
    }
}
```

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/yVR47IB0A1xjmeztZ/builds/ckdavc63MfUzOittB/openapi.json
