# FDA Drug Database Extractor (`cynix_dev/fda-drug-database`) Actor

FDA Drug Database Extractor: Orange Book (patents/exclusivity), NDC Directory, openFDA (adverse events, recalls, labeling), Drugs@FDA (approvals) — unified into one actor with typed records.

- **URL**: https://apify.com/cynix\_dev/fda-drug-database.md
- **Developed by:** [Cynix Dev](https://apify.com/cynix_dev) (community)
- **Categories:** Automation, Developer tools, Integrations
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.25 / 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/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

## FDA Drug Database Extractor

Six **FDA drug data sources** in one Actor — Orange Book (patents and exclusivity), the NDC Directory, openFDA adverse events, recalls and labeling, and Drugs@FDA approvals — returned as typed records. Official openFDA endpoints, no API key.

### What it does

The FDA publishes drug data across several separate systems, each with its own quirks. This Actor unifies them behind one `mode` switch:

| Mode | Source | What you get |
| --- | --- | --- |
| `orangeBook` | Orange Book | Approved products with patent and exclusivity data |
| `ndcDirectory` | NDC Directory | National Drug Code listings, packaging, labeler |
| `openFDA-events` | FAERS | Adverse-event reports |
| `openFDA-recalls` | Enforcement | Drug recalls and enforcement actions |
| `openFDA-labeling` | SPL labeling | Structured product labels |
| `drugsAtFDA` | Drugs@FDA | Approval history and application records |

Filter any mode by active ingredient, proprietary (brand) name or applicant company.

### Features

- **Six FDA data sources** behind a single input form.
- **Filter by active ingredient** — generic names like `atorvastatin`, `metformin`.
- **Filter by brand name** — proprietary names as marketed.
- **Filter by applicant** — pull everything for a manufacturer.
- **Patent and exclusivity data** via Orange Book, central to generic-entry analysis.
- **Adverse events and recalls** for safety and pharmacovigilance work.
- **Official openFDA API** — authoritative, and no API key required.
- **Result cap** — `maxResults` keeps runs bounded.

### What people use it for

- Generic-entry analysis — see when patents and exclusivity on a reference drug expire.
- Pharmacovigilance — monitor adverse-event reports for a molecule or brand.
- Recall monitoring — schedule runs and get alerted to enforcement actions.
- Competitive intelligence — track a competitor's approvals and portfolio.
- Formulary and procurement research — resolve NDC codes, packaging and labelers.

### Which mode answers which question

- **"When can a generic launch?"** → `orangeBook`. It carries the patent and exclusivity information that determines generic entry, plus reference-listed-drug flags.
- **"What are the safety signals?"** → `openFDA-events` for FAERS adverse-event reports.
- **"Has anything been recalled?"** → `openFDA-recalls`.
- **"What does the label say?"** → `openFDA-labeling` for structured product labels including indications and warnings.
- **"What's the approval history?"** → `drugsAtFDA`.
- **"What NDC codes and packaging exist?"** → `ndcDirectory`.

#### Date formats and marketing status

Some FDA sources return dates as compact `YYYYMMDD` strings (`19910328`) rather than ISO dates — that's the source format, passed through unchanged. Watch `marketing_status` too: `DISCONTINUED` products remain in the database long after they leave the market, so filter on it when you only want currently marketed drugs.

### Input

`mode` is required and selects the data source. The three filter fields apply across modes; leave them empty for an unfiltered sample.

| Field | Type | Default | What it does |
| --- | --- | --- | --- |
| `mode` **(required)** | string | `orangeBook` | orangeBook, ndcDirectory, openFDA-events, openFDA-recalls, openFDA-labeling, drugsAtFDA Options: `orangeBook`, `ndcDirectory`, `openFDA-events`, `openFDA-recalls`, `openFDA-labeling`, `drugsAtFDA`. |
| `activeIngredient` | array | `[]` | Generic name(s) of the active ingredient |
| `proprietaryName` | array | `[]` | Proprietary/brand name |
| `applicant` | array | `[]` | Company name filter |
| `maxResults` | integer | `100` | Maximum records to return per run. Range 1–50000. |

#### Input example

```json
{
  "mode": "orangeBook",
  "maxResults": 10
}
```

### Output

Record shape follows the FDA source for the chosen mode, so fields differ between modes. Orange Book records nest a `products` array containing active ingredients, strengths, brand names and marketing status.

Every dataset record contains: `approval_date`, `product_number`, `products`, `mode`, `source`, `activeIngredient`, `proprietaryName`, `applicant`, `applicationNumber`, `applicationType`, `dosageForm`, `route`, `strength`, `marketingStatus`, `approvalDate`, `fetchedAt`.

#### Output example

A real record from a run of this Actor:

```json
{
  "approval_date": "19910328",
  "product_number": "002",
  "products": [
    {
      "active_ingredients": [
        {
          "name": "CEFAZOLIN SODIUM",
          "strength": "EQ 20MG BASE/ML"
        }
      ],
      "brand_name": "ANCEF IN PLASTIC CONTAINER",
      "application_name": "BAXTER HLTHCARE",
      "application_type": "A",
      "application_number": "063002",
      "reference_listed_drug": false,
      "reference_standard": false,
      "marketing_status": "DISCONTINUED"
    }
  ],
  "mode": "orangeBook",
  "source": "orangeBook",
  "activeIngredient": "CEFAZOLIN SODIUM",
  "proprietaryName": "ANCEF IN PLASTIC CONTAINER",
  "applicant": "BAXTER HEALTHCARE CORP",
  "applicationNumber": "063002",
  "applicationType": "A",
  "dosageForm": "INJECTABLE",
  "route": "INJECTION",
  "strength": "EQ 20MG BASE/ML",
  "marketingStatus": "DISCONTINUED",
  "approvalDate": "19910328",
  "fetchedAt": "2026-08-20T02:51:26.081Z"
}
```

Export the dataset as JSON, CSV, Excel, XML or JSONL from the Console, or pull it programmatically through the Apify API and any of the official clients.

### How to use it

1. Click **Try for free** (or **Start** if you already have an Apify account).
2. Fill in the input fields described above — the defaults already produce a working run.
3. Press **Start** and watch the log; results stream into the dataset as they are found.
4. When the run finishes, open the **Output/Storage** tab and export as JSON, CSV or Excel.

Runs can be scheduled (hourly, daily, weekly) and wired into Slack, Google Sheets, Zapier, Make, webhooks or your own backend through Apify integrations. Everything the Console does is also available over the [Apify API](https://docs.apify.com/api/v2).

### Pricing

This Actor is billed on Apify's **pay-per-event** model: a small charge when a run starts, plus a charge for each result written to the dataset. You only pay for records you actually receive — a run that finds nothing costs only the start event. Current rates are always shown on the **Pricing** tab of this page, and the run log prints your usage as it goes.

Free-plan credits from Apify cover a large amount of light usage, so you can evaluate the Actor before committing to anything.

### FAQ

#### Do I need an openFDA API key?

No. openFDA is free and public. Keys exist only to raise rate limits for very heavy use; this Actor works without one.

#### What is the Orange Book?

The FDA's list of approved drug products with therapeutic-equivalence evaluations, including patent and exclusivity data. It's the primary reference for when generic competition can begin.

#### Can I use adverse-event data to conclude a drug caused harm?

No. FAERS reports are voluntary, unverified and lack a denominator — a report is not proof of causation, and volume tracks prescribing and publicity as much as risk. It's a signal-detection tool, and the FDA says so explicitly.

#### Why do fields differ between modes?

Each mode maps to a different FDA system with its own schema. The Actor preserves the source structure rather than flattening everything into a lowest-common-denominator shape that would lose information.

#### Are discontinued drugs included?

Yes — historical records remain. Check `marketing_status` to restrict to currently marketed products.

#### Is this suitable for clinical decisions?

No. It's a research and business-intelligence tool. Clinical decisions must rely on current prescribing information and professional judgement.

### Other Actors by cynix\_dev

| Actor | What it does |
| --- | --- |
| [Open Food Facts Extractor](https://apify.com/cynix_dev/open-food-facts) | Search and extract food-product data from Open Food Facts as clean typed JSON: name, brand, ingredients, allergens, nutrition … |
| [arXiv Papers Extractor](https://apify.com/cynix_dev/arxiv-papers) | Search arXiv and extract papers as clean typed records: title, abstract, authors, categories, DOI, and direct PDF links. |
| [SEC EDGAR Filings Extractor](https://apify.com/cynix_dev/sec-edgar-filings) | Search and extract SEC EDGAR filings: full-text search across all filings or company filing histories by CIK. |

### Legal and responsible use

This Actor collects only publicly available information. You are responsible for how you use the data, including compliance with the target site's Terms of Service, robots directives, copyright, and data protection law such as GDPR and CCPA. Do not use it to gather personal data without a lawful basis.

### Support and feedback

Found a bug, hit a site change, or need an extra field? Open a ticket on the **Issues** tab of this Actor — issues are read and fixed. Feature requests and custom-scraper enquiries are welcome through the same channel.

# Actor input Schema

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

orangeBook, ndcDirectory, openFDA-events, openFDA-recalls, openFDA-labeling, drugsAtFDA

## `activeIngredient` (type: `array`):

Generic name(s) of the active ingredient

## `proprietaryName` (type: `array`):

Proprietary/brand name

## `applicant` (type: `array`):

Company name filter

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

Maximum records to return per run.

## Actor input object example

```json
{
  "mode": "orangeBook",
  "activeIngredient": [],
  "proprietaryName": [],
  "applicant": [],
  "maxResults": 100
}
```

# Actor output Schema

## `dataset` (type: `string`):

One record per product/entry: Orange Book patents/exclusivity, NDC, openFDA events/recalls/labeling, Drugs@FDA approvals.

# 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("cynix_dev/fda-drug-database").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("cynix_dev/fda-drug-database").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 cynix_dev/fda-drug-database --silent --output-dataset

```

## MCP server setup

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

```

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/wHpUljpfCJIBTIzbr/builds/muxKKkpnHjszF9VyA/openapi.json
