# FDA Drug Approval Search (Drugs@FDA) (`ryanclinton/fda-drug-approvals`) Actor

Search the FDA's **Drugs@FDA database of 28,000+ drug applications** — including New Drug Applications (NDAs), Abbreviated New Drug Applications (ANDAs/generics), and Biologics License Applications (BLAs).

- **URL**: https://apify.com/ryanclinton/fda-drug-approvals.md
- **Developed by:** [ryan clinton](https://apify.com/ryanclinton) (community)
- **Categories:** Other, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

$30.00 / 1,000 result returneds

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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Approval Search (Drugs@FDA)

Search the FDA's **Drugs@FDA database of 28,000+ drug applications** — including New Drug Applications (NDAs), Abbreviated New Drug Applications (ANDAs/generics), and Biologics License Applications (BLAs). Each result includes the full product lineup (brand names, strengths, dosage forms), complete submission history (original approval through every supplement), active ingredients, NDC codes, and review priority status.

No API key required. Just enter a brand name like `Ozempic` or an active ingredient like `semaglutide` and get structured approval data in seconds.

### Why Use FDA Drug Approval Search?

The Drugs@FDA database contains every FDA-approved drug application since the 1930s, but the data comes as deeply nested JSON with arrays of products (different strengths/formulations) and arrays of submissions (every regulatory action over the drug's lifecycle). This actor handles query construction, pagination, flattening of nested product/submission arrays, date normalization, application type extraction, original approval date identification, and submission sorting — giving you clean, structured records with both summary fields and full detail arrays.

### Features

- **Brand name search** — find drugs by brand/trade name (e.g., "Ozempic", "Keytruda", "Eliquis", "Lipitor")
- **Generic name search** — find by generic name (e.g., "semaglutide", "pembrolizumab", "atorvastatin")
- **Active ingredient search** — search by substance name (e.g., "metformin", "ibuprofen", "acetaminophen")
- **Sponsor lookup** — search by company (e.g., "Pfizer", "Eli Lilly", "Novo Nordisk", "Merck")
- **Application number lookup** — retrieve a specific NDA, ANDA, or BLA (e.g., "NDA020702")
- **Application type filtering** — filter to NDAs only (new drugs), ANDAs only (generics), or BLAs only (biologics)
- **Submission status filter** — filter by Approved (AP) or Tentatively Approved (TA)
- **Dosage form filter** — narrow by form (e.g., "TABLET", "INJECTION", "CAPSULE", "SOLUTION")
- **Route filter** — narrow by administration route (e.g., "ORAL", "INTRAVENOUS", "SUBCUTANEOUS")
- **Full product details** — every strength, formulation, TE code, and reference drug flag
- **Complete submission history** — chronologically sorted with type, status, review priority, and class description
- **Original approval date extraction** — identifies the first ORIG/AP submission to find when a drug was originally approved
- **Summary statistics** — automatic application type breakdown, top sponsors, dosage forms, and review priorities
- **Retry with backoff** — built-in exponential backoff for API rate limits and transient errors

### How to Use

1. **Enter search criteria** — provide at least one filter: brand name, generic name, active ingredient, sponsor, application number, application type, dosage form, or route.

2. **Set the result limit** — choose how many applications to return (1–1,000). Default is 100.

3. **Run and download** — click "Start" and wait for the run to complete (typically 5–30 seconds). Download the structured JSON dataset.

4. **Review summary stats** — check the run log for automatic summary including application type breakdown, top sponsors, and review priorities.

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `brandName` | String | No* | — | Drug brand/trade name (e.g., "Ozempic", "Lipitor") |
| `genericName` | String | No* | — | Generic drug name (e.g., "semaglutide", "atorvastatin") |
| `activeIngredient` | String | No* | — | Active ingredient/substance (e.g., "metformin", "ibuprofen") |
| `sponsorName` | String | No* | — | Sponsor company (e.g., "Pfizer", "Novo Nordisk") |
| `applicationNumber` | String | No* | — | Specific NDA/ANDA/BLA number (e.g., "NDA020702") |
| `applicationType` | Select | No | All | NDA (new drug), ANDA (generic), or BLA (biologic) |
| `submissionStatus` | Select | No | All | Approved (AP) or Tentatively Approved (TA) |
| `dosageForm` | String | No | — | Dosage form (e.g., "TABLET", "INJECTION", "CAPSULE") |
| `route` | String | No | — | Route of administration (e.g., "ORAL", "INTRAVENOUS") |
| `maxResults` | Integer | No | `100` | Maximum applications to return (1–1,000) |

*At least one search parameter is required.

#### Input Examples

**Look up Lipitor by brand name:**

```json
{
    "brandName": "Lipitor"
}
````

**Find all semaglutide products (Ozempic, Wegovy, Rybelsus):**

```json
{
    "activeIngredient": "semaglutide",
    "maxResults": 50
}
```

**Pfizer NDA approvals only:**

```json
{
    "sponsorName": "Pfizer",
    "applicationType": "NDA",
    "maxResults": 200
}
```

**All metformin generic applications:**

```json
{
    "genericName": "metformin",
    "applicationType": "ANDA",
    "maxResults": 100
}
```

**Injectable biologics:**

```json
{
    "applicationType": "BLA",
    "dosageForm": "INJECTION",
    "maxResults": 500
}
```

**Look up a specific application:**

```json
{
    "applicationNumber": "NDA020702"
}
```

**Oral tablets from Eli Lilly:**

```json
{
    "sponsorName": "Eli Lilly",
    "dosageForm": "TABLET",
    "route": "ORAL",
    "maxResults": 100
}
```

#### Input Tips

- Sponsor names are stored in UPPERCASE in the FDA database (e.g., "PFIZER", "NOVO NORDISK"). The actor handles case conversion automatically.
- Use `activeIngredient` to find all formulations containing a substance — this returns combination products too (e.g., searching "metformin" returns Synjardy, Janumet, etc.).
- Set `applicationType` to "ANDA" to find all approved generics for a drug — useful for patent expiry and generic competition analysis.
- Brand name and generic name searches use the openFDA enrichment layer, which provides normalized names.
- For large sponsors with many applications, combine with `applicationType` or `dosageForm` to narrow results.

### Output

Each drug application record includes:

```json
{
    "applicationNumber": "NDA020702",
    "applicationType": "NDA",
    "sponsorName": "UPJOHN",
    "brandNames": ["LIPITOR"],
    "genericName": "ATORVASTATIN CALCIUM",
    "activeIngredients": ["ATORVASTATIN CALCIUM"],
    "substances": ["ATORVASTATIN CALCIUM TRIHYDRATE"],
    "dosageForms": ["TABLET"],
    "routes": ["ORAL"],
    "marketingStatus": "Prescription",
    "productCount": 4,
    "products": [
        {
            "brandName": "LIPITOR",
            "activeIngredients": "ATORVASTATIN CALCIUM",
            "strength": "EQ 80MG BASE",
            "dosageForm": "TABLET",
            "route": "ORAL",
            "marketingStatus": "Prescription",
            "teCode": "AB",
            "isReferenceDrug": true
        }
    ],
    "submissionCount": 56,
    "latestSubmissionType": "SUPPL",
    "latestSubmissionStatus": "AP",
    "latestApprovalDate": "2024-04-02",
    "originalApprovalDate": "1996-12-17",
    "reviewPriority": "PRIORITY",
    "submissions": [
        {
            "type": "ORIG",
            "number": "1",
            "status": "AP",
            "statusDate": "1996-12-17",
            "reviewPriority": "PRIORITY",
            "classCode": "TYPE 1",
            "classDescription": "Type 1 - New Molecular Entity"
        }
    ],
    "productNdcs": ["0071-0157", "0071-0155"],
    "rxcui": ["259255", "262095"]
}
```

#### Output Fields

| Field | Type | Description |
|-------|------|-------------|
| `applicationNumber` | String | FDA application number (e.g., "NDA020702", "ANDA214629", "BLA761024") |
| `applicationType` | String | Application type: NDA, ANDA, or BLA |
| `sponsorName` | String | Sponsor company name |
| `brandNames` | String\[] | All brand/trade names for products under this application |
| `genericName` | String | Generic drug name from openFDA enrichment |
| `activeIngredients` | String\[] | Deduplicated list of active ingredient names |
| `substances` | String\[] | Substance names from openFDA (may include salt forms) |
| `dosageForms` | String\[] | Dosage forms (e.g., "TABLET", "CAPSULE", "INJECTION") |
| `routes` | String\[] | Routes of administration (e.g., "ORAL", "INTRAVENOUS") |
| `marketingStatus` | String | Current marketing status (e.g., "Prescription", "Over-the-counter") |
| `productCount` | Integer | Number of distinct products (strengths/formulations) |
| `products` | Object\[] | Detailed product array with strength, TE code, reference drug flag |
| `submissionCount` | Integer | Total number of regulatory submissions |
| `latestSubmissionType` | String | Most recent submission type (ORIG or SUPPL) |
| `latestSubmissionStatus` | String | Most recent submission status (AP, TA, etc.) |
| `latestApprovalDate` | String | Date of most recent submission action (YYYY-MM-DD) |
| `originalApprovalDate` | String | Date of original approval (first ORIG/AP submission) |
| `reviewPriority` | String | Review priority: STANDARD, PRIORITY, or ORPHAN |
| `submissions` | Object\[] | Full submission history sorted newest to oldest |
| `productNdcs` | String\[] | National Drug Code numbers |
| `rxcui` | String\[] | RxNorm Concept Unique Identifiers for cross-referencing |

#### Application Types

| Type | Full Name | Description |
|------|-----------|-------------|
| NDA | New Drug Application | Brand-name drugs with full clinical data |
| ANDA | Abbreviated New Drug Application | Generic drugs demonstrating bioequivalence |
| BLA | Biologics License Application | Biological products (vaccines, blood products, gene therapy) |

#### Submission Class Codes

| Code | Description |
|------|-------------|
| TYPE 1 | New Molecular Entity |
| TYPE 2 | New Active Ingredient |
| TYPE 3 | New Dosage Form |
| TYPE 4 | New Combination |
| TYPE 5 | New Formulation or Manufacturer |
| TYPE 6 | New Indication |
| TYPE 7 | Already Marketed without NDA |
| EFFICACY | Efficacy Supplement |
| LABELING | Labeling Change |
| MANUF (CMC) | Manufacturing Change |

### Use Cases

- **Pharmaceutical companies** tracking competitor drug approvals, generic entries, and supplemental submissions to inform commercial strategy
- **Generic drug manufacturers** identifying NDA drugs approaching patent expiry to plan ANDA filings — use `originalApprovalDate` to estimate exclusivity timelines
- **Healthcare investors** researching a sponsor's approved drug portfolio for due diligence, including review priority (PRIORITY = faster FDA review) and submission history
- **Patent attorneys** cross-referencing drug approvals with patent filings and Orange Book listings
- **Pharmacy benefit managers** tracking new drug approvals and generic alternatives for formulary decisions
- **Clinical researchers** finding all approved formulations of a drug across sponsors, strengths, and routes
- **Regulatory affairs teams** benchmarking submission types and review priorities for regulatory strategy planning
- **Market research firms** analyzing drug approval trends by sponsor, therapeutic area, and application type

### How to Use the API

#### Python

```python
import requests
import time

run = requests.post(
    "https://api.apify.com/v2/acts/ryanclinton~fda-drug-approvals/runs",
    params={"token": "YOUR_APIFY_TOKEN"},
    json={
        "activeIngredient": "semaglutide",
        "maxResults": 50
    },
    timeout=30,
).json()

run_id = run["data"]["id"]
while True:
    status = requests.get(
        f"https://api.apify.com/v2/actor-runs/{run_id}",
        params={"token": "YOUR_APIFY_TOKEN"},
        timeout=10,
    ).json()
    if status["data"]["status"] in ("SUCCEEDED", "FAILED", "ABORTED"):
        break
    time.sleep(3)

dataset_id = status["data"]["defaultDatasetId"]
items = requests.get(
    f"https://api.apify.com/v2/datasets/{dataset_id}/items",
    params={"token": "YOUR_APIFY_TOKEN"},
    timeout=30,
).json()

for item in items:
    print(f"{item['applicationNumber']} | {item['brandNames']} | {item['sponsorName']} | Approved: {item['originalApprovalDate']}")
```

#### JavaScript

```javascript
const response = await fetch(
    "https://api.apify.com/v2/acts/ryanclinton~fda-drug-approvals/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN",
    {
        method: "POST",
        headers: { "Content-Type": "application/json" },
        body: JSON.stringify({
            activeIngredient: "semaglutide",
            maxResults: 50,
        }),
    }
);

const drugs = await response.json();
drugs.forEach(d =>
    console.log(`${d.applicationNumber} | ${d.brandNames.join(", ")} | ${d.originalApprovalDate}`)
);
```

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/ryanclinton~fda-drug-approvals/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "activeIngredient": "semaglutide",
    "maxResults": 50
  }'
```

### How It Works

```
Input (brandName, genericName, activeIngredient, sponsor, appNumber, filters)
  |
  v
+--------------------------------------------------+
|  Step 1: Build Search Query                      |
|  Construct openFDA query from input parameters.  |
|  Brand/generic/substance use openfda.* fields.   |
|  Sponsor name auto-uppercased for API match.     |
|  Terms joined with +AND+ conjunction.            |
+--------------------------------------------------+
  |
  v
+--------------------------------------------------+
|  Step 2: Paginated Fetch + Client Filter         |
|  Fetch up to 100 results per request using       |
|  skip/limit pagination. If applicationType       |
|  filter set, apply client-side (NDA/ANDA/BLA).   |
|  Retry with exponential backoff on 429/errors.   |
+--------------------------------------------------+
  |
  v
+--------------------------------------------------+
|  Step 3: Flatten Products                        |
|  Extract unique brand names, ingredients,        |
|  dosage forms, routes from product arrays.       |
|  Build per-product summaries with strength,      |
|  TE codes, reference drug flags.                 |
+--------------------------------------------------+
  |
  v
+--------------------------------------------------+
|  Step 4: Sort & Analyze Submissions              |
|  Sort submissions by date (newest first).        |
|  Identify original approval (first ORIG/AP).     |
|  Extract review priority. Build timeline.        |
+--------------------------------------------------+
  |
  v
+--------------------------------------------------+
|  Step 5: Summary Statistics                      |
|  Tally application types, top sponsors,          |
|  dosage forms, review priorities.                |
|  Log to run output.                              |
+--------------------------------------------------+
  |
  v
Structured drug approval records pushed to dataset
```

#### Data Sources

| Source | API Endpoint | Auth Required | Records |
|--------|-------------|---------------|---------|
| FDA Drugs@FDA (openFDA) | `https://api.fda.gov/drug/drugsfda.json` | No | 28K+ |

### How Much Does It Cost?

| Scenario | Results | Est. Time | Est. Cost |
|----------|---------|-----------|-----------|
| Single application lookup | 1 | 3 sec | < $0.001 |
| Active ingredient search (50 results) | 50 | 10 sec | < $0.01 |
| Full sponsor portfolio (500 results) | 500 | 25 sec | ~$0.01 |

The actor uses 256 MB memory and makes lightweight API calls with no browser rendering. The Apify free tier covers thousands of runs per month.

### Tips

- **Use `activeIngredient` for comprehensive results** — searching by substance finds all formulations including combination products (e.g., "metformin" returns Janumet, Synjardy, etc.).
- **Filter to ANDA for generic competition** — set `applicationType` to "ANDA" to see all approved generics for a drug. The number of ANDA approvals indicates generic market saturation.
- **Check `originalApprovalDate` for patent timing** — the original NDA approval date is a key reference point for Hatch-Waxman exclusivity periods and patent term extensions.
- **Review priority matters** — "PRIORITY" review means the FDA determined the drug offers a significant improvement over existing treatments. This is a strong signal for investors and competitors.
- **TE codes indicate interchangeability** — the therapeutic equivalence code (AB, AP, etc.) determines whether a generic can be substituted for the brand. "AB" means fully interchangeable.
- **RxCUI for cross-referencing** — the `rxcui` field links to RxNorm, enabling cross-referencing with clinical systems, drug interaction databases, and pharmacy benefit platforms.
- **Submission history reveals strategy** — the `submissions` array shows every regulatory action. Track labeling changes, efficacy supplements, and manufacturing changes over time.

### Limitations

- **1,000 result cap** — the openFDA API limits results to 1,000 per query. Use filters to narrow large result sets.
- **Application type filter is client-side** — the openFDA API doesn't support wildcards on `application_number`, so NDA/ANDA/BLA filtering happens after fetch. This means some API pages may be consumed by non-matching types.
- **Sponsor names are uppercase** — the FDA stores sponsor names in ALL CAPS. The actor auto-uppercases your input, but partial matches may miss variations (e.g., "PFIZER INC" vs "PFIZER").
- **No therapeutic area field** — the Drugs@FDA endpoint does not include a therapeutic category or indication field. Use the companion drug label actor for indication data.
- **openFDA enrichment gaps** — `genericName`, `substances`, `productNdcs`, and `rxcui` come from the openFDA enrichment layer and may be empty for some older applications.
- **Submission dates only** — the database tracks when submissions were filed and decided, not the duration of the review process.
- **Rate limiting** — the openFDA API enforces rate limits. The actor handles this with exponential backoff, but rapid sequential runs may experience delays.

### Responsible Use

- **All data is public domain** — Drugs@FDA data is published by the US government and is freely available.
- **Respect openFDA rate limits** — the actor includes built-in retry with backoff. Avoid launching dozens of concurrent runs.
- **Use for legitimate purposes** — designed for pharmaceutical intelligence, market research, due diligence, generic competition analysis, and academic research.
- **Verify critical decisions** — for regulatory submissions or investment decisions, always verify against the official [Drugs@FDA database](https://www.accessdata.fda.gov/scripts/cder/daf/).

### FAQ

**Is an API key required?**
No. The openFDA API is free and requires no authentication.

**How current is the data?**
The openFDA database is updated regularly. New approvals typically appear within days to weeks.

**What is the difference between NDA, ANDA, and BLA?**
NDA (New Drug Application) is for new brand-name drugs with full clinical trial data. ANDA (Abbreviated New Drug Application) is for generic drugs that demonstrate bioequivalence to an approved NDA. BLA (Biologics License Application) is for biological products like vaccines, blood products, and monoclonal antibodies.

**How can I find when a drug was first approved?**
The `originalApprovalDate` field contains the date of the first ORIG/AP submission — this is when the drug was originally approved by the FDA.

**What does "PRIORITY" review mean?**
Priority Review means the FDA determined the drug may provide a significant improvement in the safety or effectiveness of treatment compared to existing options. Priority drugs get a 6-month review target vs. 10 months for standard.

**Can I find all generic versions of a brand-name drug?**
Yes. Search by `activeIngredient` and set `applicationType` to "ANDA" to find all approved generics containing that substance.

**What is a TE code?**
The Therapeutic Equivalence code indicates whether the FDA considers a generic interchangeable with the reference drug. "AB" means therapeutically equivalent and substitutable. "BX" means insufficient data for equivalence.

**How far back does the data go?**
The database contains drug applications from the 1930s to present — the entire history of FDA drug regulation.

### Integrations

- **Apify API** — trigger runs programmatically for pharmaceutical intelligence pipelines
- **Zapier** — automatically search for new drug approvals when a competitor files an application
- **Make (Integromat)** — build workflows that monitor new generic approvals and alert your commercial team
- **Google Sheets** — export drug approval data for competitive landscape analysis
- **Webhooks** — receive approval data as soon as the run completes
- **Scheduled Runs** — run weekly to track new drug approvals in your therapeutic area

### Related Actors

| Actor | What it does | Use with Drugs@FDA |
|-------|-------------|-------------------|
| [openFDA Drug Event Monitor](https://apify.com/ryanclinton/openfda-drug-events) | FDA drug adverse events | Cross-reference approved drugs with their safety profiles |
| [FDA 510(k) Device Clearance Search](https://apify.com/ryanclinton/fda-510k-clearances) | Medical device clearances | Companion for combination drug/device products |
| [FDA PMA Device Approval Search](https://apify.com/ryanclinton/fda-pma-approvals) | Class III device approvals | Complete FDA approval coverage across drugs and devices |
| [Clinical Trial Tracker](https://apify.com/ryanclinton/clinical-trial-tracker) | ClinicalTrials.gov search | Find clinical trials for approved drugs |
| [SEC EDGAR Filing Analyzer](https://apify.com/ryanclinton/sec-edgar-filing-analyzer) | SEC filing analysis | Research financial impact of drug approvals on pharma companies |
| [USPTO Patent Search](https://apify.com/ryanclinton/patent-search) | US patent database | Cross-reference drug patents with approval dates for exclusivity analysis |

# Actor input Schema

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

Search by drug brand/trade name (e.g., 'Lipitor', 'Ozempic', 'Keytruda')

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

Search by generic drug name (e.g., 'atorvastatin', 'semaglutide', 'pembrolizumab')

## `activeIngredient` (type: `string`):

Search by active ingredient/substance name (e.g., 'metformin', 'ibuprofen')

## `sponsorName` (type: `string`):

Search by sponsor company name (e.g., 'Pfizer', 'Eli Lilly', 'Novo Nordisk')

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

Look up a specific NDA, ANDA, or BLA number (e.g., 'NDA020702', 'ANDA214629', 'BLA761024')

## `applicationType` (type: `string`):

Filter by drug application type

## `submissionStatus` (type: `string`):

Filter by latest submission status

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

Filter by dosage form (e.g., 'TABLET', 'INJECTION', 'CAPSULE')

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

Filter by route (e.g., 'ORAL', 'INTRAVENOUS', 'SUBCUTANEOUS', 'TOPICAL')

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

Maximum number of drug applications to return (openFDA limit: 1000 per query)

## Actor input object example

```json
{
  "brandName": "Lipitor",
  "applicationType": "",
  "submissionStatus": "",
  "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 = {
    "brandName": "Lipitor"
};

// Run the Actor and wait for it to finish
const run = await client.actor("ryanclinton/fda-drug-approvals").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 = { "brandName": "Lipitor" }

# Run the Actor and wait for it to finish
run = client.actor("ryanclinton/fda-drug-approvals").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "brandName": "Lipitor"
}' |
apify call ryanclinton/fda-drug-approvals --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ryanclinton/fda-drug-approvals",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "FDA Drug Approval Search (Drugs@FDA)",
        "description": "Search the FDA's **Drugs@FDA database of 28,000+ drug applications** — including New Drug Applications (NDAs), Abbreviated New Drug Applications (ANDAs/generics), and Biologics License Applications (BLAs).",
        "version": "1.0",
        "x-build-id": "XCLC9lusfe5urrQqO"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ryanclinton~fda-drug-approvals/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ryanclinton-fda-drug-approvals",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/ryanclinton~fda-drug-approvals/runs": {
            "post": {
                "operationId": "runs-sync-ryanclinton-fda-drug-approvals",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/ryanclinton~fda-drug-approvals/run-sync": {
            "post": {
                "operationId": "run-sync-ryanclinton-fda-drug-approvals",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "brandName": {
                        "title": "Brand Name",
                        "type": "string",
                        "description": "Search by drug brand/trade name (e.g., 'Lipitor', 'Ozempic', 'Keytruda')"
                    },
                    "genericName": {
                        "title": "Generic Name",
                        "type": "string",
                        "description": "Search by generic drug name (e.g., 'atorvastatin', 'semaglutide', 'pembrolizumab')"
                    },
                    "activeIngredient": {
                        "title": "Active Ingredient",
                        "type": "string",
                        "description": "Search by active ingredient/substance name (e.g., 'metformin', 'ibuprofen')"
                    },
                    "sponsorName": {
                        "title": "Sponsor / Company",
                        "type": "string",
                        "description": "Search by sponsor company name (e.g., 'Pfizer', 'Eli Lilly', 'Novo Nordisk')"
                    },
                    "applicationNumber": {
                        "title": "Application Number",
                        "type": "string",
                        "description": "Look up a specific NDA, ANDA, or BLA number (e.g., 'NDA020702', 'ANDA214629', 'BLA761024')"
                    },
                    "applicationType": {
                        "title": "Application Type",
                        "enum": [
                            "",
                            "NDA",
                            "ANDA",
                            "BLA"
                        ],
                        "type": "string",
                        "description": "Filter by drug application type",
                        "default": ""
                    },
                    "submissionStatus": {
                        "title": "Submission Status",
                        "enum": [
                            "",
                            "AP",
                            "TA"
                        ],
                        "type": "string",
                        "description": "Filter by latest submission status",
                        "default": ""
                    },
                    "dosageForm": {
                        "title": "Dosage Form",
                        "type": "string",
                        "description": "Filter by dosage form (e.g., 'TABLET', 'INJECTION', 'CAPSULE')"
                    },
                    "route": {
                        "title": "Route of Administration",
                        "type": "string",
                        "description": "Filter by route (e.g., 'ORAL', 'INTRAVENOUS', 'SUBCUTANEOUS', 'TOPICAL')"
                    },
                    "maxResults": {
                        "title": "Maximum Results",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of drug applications to return (openFDA limit: 1000 per query)",
                        "default": 100
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
