# FDA Drug Label API - NDC, Interactions, Recalls, MCP (`martin10291/fda-drug-lookup-api`) Actor

No API key. US drug facts from openFDA as clean JSON in one call: FDA label sections (indications, boxed warning, contraindications, drug interactions, dosage), NDC products and packages, FDA approvals, top reported adverse events (FAERS counts) and recalls. Interaction mode finds where one drug's F

- **URL**: https://apify.com/martin10291/fda-drug-lookup-api.md
- **Developed by:** [Martin Petrov](https://apify.com/martin10291) (community)
- **Categories:** Developer tools, AI, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 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/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 Drug Label API - NDC, Interactions, Recalls, MCP

**Problem:** your health app, pharmacy tool, compliance check or AI agent needs to know what the FDA label says about a drug, which NDC packages exist, when it was approved, what side effects are reported most, whether it was recalled, and whether its label warns about another drug. That data sits in 5 different openFDA endpoints with long raw label text, salt-form names ("METFORMIN HYDROCHLORIDE") and a 404 for "not found".

**This API:** one JSON call, no API key. Give a drug name (brand or generic) or an NDC code and get clean rows from the official openFDA data of the U.S. Food and Drug Administration.

- **report** (default): ONE row with the newest label summary (indications, boxed warning, contraindications, interactions, dosage), NDC product count + sample, FDA approvals (first approval date, sponsor), adverse event totals (all + serious) with the top 10 reactions, and recall count + latest 3 recalls.
- **label:** full label sections, each cleaned and cut at a sentence end: indications, boxedWarning, contraindications, warnings, drugInteractions, adverseReactions, dosage, pregnancy, plus setId, RxCUI, product NDCs and a DailyMed link.
- **ndc:** products with packages (package NDC + description), labeler, dosage form, marketing category, application number, active ingredients with strength.
- **approvals:** Drugs@FDA applications (NDA/BLA/ANDA), sponsor, products, first approval date, latest submission.
- **adverse_events:** most reported reactions (FAERS) with report counts, plus total and serious report counts.
- **recalls:** drug enforcement reports, newest first: recall number, class, reason, firm, date.
- **interactions:** give 2-10 drugs; for every pair it finds the sentences where one drug's FDA label (contraindications, boxed warning, drug interactions, warnings) names the other drug or its drug class. Measured: simvastatin + clarithromycin is found in both labels.
- **Bulk:** put up to 10 names in `drugs` to get the same mode for every drug in one call (e.g. a report row for each drug on a pharmacy watch list).
- **Monitor mode:** `onlyNew` + `monitorId` returns only new recalls, new label versions or new NDC packages since the last run: schedule it daily for a watch list.

Not medical advice: rows repeat FDA data as published; openFDA is not endorsed by FDA for clinical use, and interaction rows are label text matches, not a clinical interaction check.

### Example (API)

```bash
curl -X POST "https://api.apify.com/v2/acts/martin10291~fda-drug-lookup-api/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"drug": "lisinopril"}'
```

Report row (measured 2026-11-16, shortened):

```json
{"type": "report", "drug": "LISINOPRIL",
 "label": {"brandName": "LISINOPRIL", "genericName": "LISINOPRIL", "route": ["ORAL"], "rxcui": ["311354"],
           "boxedWarning": "WARNING: FETAL TOXICITY When pregnancy is detected, discontinue lisinopril as soon as possible ...",
           "dailyMedUrl": "https://dailymed.nlm.nih.gov/dailymed/lookup.cfm?setid=bf59ff89-a9fa-4fe3-b167-a5d0cba9e438"},
 "ndcProducts": 397, "approvalsCount": 38,
 "adverseEvents": {"totalReports": 297660, "seriousReports": 179915,
                   "top": [{"reaction": "Fatigue", "reports": 19506}, {"reaction": "Nausea", "reports": 18035}]},
 "recalls": {"count": 41, "latest": [{"recallNumber": "D-0532-2025", "classification": "Class II"}]},
 "source": "openFDA (U.S. Food and Drug Administration), CC0"}
```

Interactions (`{"mode": "interactions", "drugs": ["simvastatin", "clarithromycin"]}`):

```json
{"type": "interaction", "drugA": "simvastatin", "drugB": "clarithromycin", "mentioned": true,
 "mentions": [{"inLabelOf": "simvastatin", "section": "drugInteractions", "matched": "clarithromycin",
               "sentence": "Examples: Select azole anti-fungals (...), select macrolide antibiotics (e.g., erythromycin and clarithromycin), ..."}],
 "note": "Text found in the FDA labels, not a clinical interaction check. Ask a pharmacist."}
```

More inputs:

- `{"mode": "ndc", "ndc": "0002-1433-80"}` (package NDC -> product Trulicity)
- `{"mode": "label", "drug": "Ozempic"}`
- `{"mode": "adverse_events", "drug": "atorvastatin", "limit": 20}`
- `{"mode": "recalls", "drug": "valsartan", "limit": 10, "onlyNew": true, "monitorId": "pharmacy-watch"}`
- `{"mode": "approvals", "drug": "Lipitor"}`
- `{"drugs": ["metformin", "lisinopril", "atorvastatin", "Ozempic", "amoxicillin"]}` (one report row per drug)

### Use from AI agents (MCP)

Add the Apify MCP server with this Actor as a tool, then ask your agent "what is the boxed warning for lisinopril?" or "does clarithromycin appear in the simvastatin label?":

```
https://mcp.apify.com?tools=martin10291/fda-drug-lookup-api
```

### FAQ

**How fresh is the data?** openFDA updates labels, NDC and recalls weekly and FAERS quarterly; this API caches label/NDC/approval answers up to 7 days and adverse events/recalls up to 1 day, and each row has `retrievedAt` (and `stale: true` if openFDA was down and a cached copy was served).

**Limits?** 1-100 rows per call (`limit`), 2-10 drugs in interactions mode.

**Errors?** Bad input returns `invalid input: ...` and the run stops cleanly; an unknown drug returns 0 rows.

### Notes

- Names: brand or generic both work ("Lipitor" or "atorvastatin"); salt forms are matched for you. Unknown names return no rows, not an error.
- Speed: a fresh report takes 2-5 s (6 openFDA calls); repeated drugs answer from cache in milliseconds.
- Source: openFDA (https://open.fda.gov), CC0 1.0 public domain. Data provided by the U.S. Food and Drug Administration. FAERS reports are voluntary and do not prove that a drug caused a reaction.
- Errors: bad input returns a clear `invalid input: ...` message; `RUN_SUMMARY` in the key-value store has `lastError`.

# Actor input Schema

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

report = one row with label summary, NDC count, approvals, top 10 adverse events and latest recalls; label = full label sections; ndc = products with packages; approvals = Drugs@FDA applications; adverse_events = most reported reactions with totals; recalls = enforcement reports, newest first; interactions = where each drug's FDA label names the other drugs (give 2-10 names in Drugs).

## `drug` (type: `string`):

Brand or generic name, e.g. metformin, Lipitor, Ozempic, atorvastatin. For several drugs use Drugs instead. Not needed when you give an NDC.

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

Optional. Dashed product NDC like 0002-1433 or package NDC like 0002-1433-80. Wins over Drug name in report, label and ndc modes.

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

1-10 brand or generic names. In report, label, ndc, approvals, adverse_events and recalls mode every drug gets its own rows (a watch list in one run). In interactions mode give 2-10 names: every pair is checked in both labels.

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

How many rows for label, ndc, recalls and adverse_events modes (1-100). Report mode always returns one row.

## `onlyNew` (type: `boolean`):

Return only rows not returned before for the same Monitor ID and input: new recalls, new label versions, new NDC packages. Schedule it daily for a drug watch list.

## `monitorId` (type: `string`):

Name of this watch (any text). Runs with the same Monitor ID and input share their memory of what was already returned.

## Actor input object example

```json
{
  "mode": "report",
  "drugs": [
    "metformin",
    "lisinopril",
    "atorvastatin",
    "Ozempic",
    "amoxicillin"
  ],
  "limit": 10,
  "onlyNew": false
}
```

# Actor output Schema

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

Drug rows: report (one combined row), label sections, NDC products, approvals, adverse event counts, recalls or interaction pairs. Every row names the source (openFDA, CC0) and the retrieval time.

# 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": "report",
    "drugs": [
        "metformin",
        "lisinopril",
        "atorvastatin",
        "Ozempic",
        "amoxicillin"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("martin10291/fda-drug-lookup-api").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": "report",
    "drugs": [
        "metformin",
        "lisinopril",
        "atorvastatin",
        "Ozempic",
        "amoxicillin",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("martin10291/fda-drug-lookup-api").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": "report",
  "drugs": [
    "metformin",
    "lisinopril",
    "atorvastatin",
    "Ozempic",
    "amoxicillin"
  ]
}' |
apify call martin10291/fda-drug-lookup-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,martin10291/fda-drug-lookup-api"
        }
    }
}
```

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/rLgxtydbGS3qeJ9ST/builds/MaMVgKnsLDELtzNS1/openapi.json
