# ClinicalTrials.gov v2 & openFDA Pharma / Biotech Data API (`francogb/clinical-trials-openfda-pharma-api`) Actor

Fast, browserless HTTP API combining ClinicalTrials.gov v2 studies (with central & site contacts), openFDA drug approvals, and openFDA drug recall enforcement feeds into a single unified schema.

- **URL**: https://apify.com/francogb/clinical-trials-openfda-pharma-api.md
- **Developed by:** [Franco García Bailez](https://apify.com/francogb) (community)
- **Categories:** Business, Lead generation, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 pharma records

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

## ClinicalTrials.gov v2 & openFDA Pharma / Biotech Data API

High-speed, zero-browser, Pay-Per-Event API that unifies official US biomedical and pharmaceutical intelligence into one clean 23-field JSON schema—built for biotech investors, pharma BD/sales teams, competitive intelligence analysts, and AI agents (MCP / n8n / LangGraph).

### Why use this Actor?

- **100% Official APIs, Zero Scraping Fragility**: Direct HTTP/JSON integration with **ClinicalTrials.gov API v2** and **openFDA (`Drugs@FDA` & `Drug Enforcement`)**. No Playwright, no residential proxies, ~1-3 second runs.
- **Unified 23-Field Schema**: Query clinical trials, FDA drug approvals, and FDA drug recalls in parallel and get consistent records merged round-robin so no feed starves the others.
- **Trial Site & Central Contacts Extracted**: Automatically extracts and deduplicates Principal Investigator / central study contacts (`contactNames`, `contactEmails`, `contactPhones`) alongside enrollment counts, phases, and completion dates.
- **Biotech & Hedge-Fund Ready Filters**: Filter directly for `PHASE3` + `industrySponsorsOnly: true` to isolate commercial biotech catalysts vs. academic studies.
- **Strict `maxTotalChargeUsd` Enforcement**: Honors Apify's Pay-Per-Event budget cap before and after fetching so automated AI agents never overspend.

***

### Supported Datasets

| Dataset Key | Official Source | Best Used For |
| :--- | :--- | :--- |
| `CLINICAL_TRIALS` | ClinicalTrials.gov v2 (`/api/v2/studies`) | Recruiting studies, Phase 2/3 catalysts, trial site & sponsor contacts, enrollment & completion timelines |
| `FDA_APPROVALS` | openFDA Drugs@FDA (`/drug/drugsfda.json`) | NDA/BLA/ANDA approvals, active ingredients, dosage forms, routes, sponsor names |
| `FDA_RECALLS` | openFDA Drug Enforcement (`/drug/enforcement.json`) | Class I/II/III recalls, recalling firms, recall reasons, dates, and distribution geography |

***

### Example Input

#### 1. Commercial Phase 3 Oncology Catalysts (Biotech / BD)

```json
{
  "datasets": ["CLINICAL_TRIALS"],
  "conditionOrDisease": "oncology",
  "trialStatuses": ["RECRUITING"],
  "phases": ["PHASE3"],
  "industrySponsorsOnly": true,
  "maxResultsPerDataset": 25
}
```

#### 2. Full 3-Feed Drug & Therapeutic Area Intelligence

```json
{
  "datasets": ["CLINICAL_TRIALS", "FDA_APPROVALS", "FDA_RECALLS"],
  "conditionOrDisease": "oncology",
  "trialStatuses": ["RECRUITING"],
  "maxResultsPerDataset": 25
}
```

***

### Example Output Record

```json
{
  "dataset": "CLINICAL_TRIALS",
  "recordId": "NCT06123456",
  "title": "Phase 3 Study of Example Drug in Advanced Solid Tumors",
  "sponsor": "Example Pharma Inc.",
  "sponsorClass": "INDUSTRY",
  "status": "RECRUITING",
  "studyType": "INTERVENTIONAL",
  "phases": ["PHASE3"],
  "conditions": ["Solid Tumor", "Non-Small Cell Lung Cancer"],
  "interventions": ["Example Drug", "Placebo"],
  "enrollmentCount": 420,
  "startDate": "2025-01-15",
  "primaryCompletionDate": "2027-06-30",
  "completionDate": "2028-03-01",
  "countries": ["United States", "Germany", "Spain"],
  "locationsCount": 34,
  "contactNames": ["Jane Doe, MD"],
  "contactEmails": ["trials@examplepharma.com"],
  "contactPhones": ["+1-800-555-0199"],
  "classification": null,
  "reasonOrSummary": "Multicenter randomized double-blind Phase 3 study evaluating efficacy and safety...",
  "url": "https://clinicaltrials.gov/study/NCT06123456",
  "scrapedAt": "2026-11-30T09:40:00+00:00"
}
```

***

### How Much Does It Cost?

This Actor uses transparent **Pay-Per-Event (PPE)** pricing with zero proxy fees and ultra-fast 128–512 MB execution:

| Event | Free | Bronze | Silver | Gold / Platinum / Diamond |
| :--- | :---: | :---: | :---: | :---: |
| **Actor Start** (`apify-actor-start`) | `$0.005` | `$0.005` | `$0.005` | `$0.005` |
| **Pharma record** (`apify-default-dataset-item`) | `$0.004` | `$0.0035` | `$0.003` | `$0.0025` |

- **Example cost for 100 pharma records**: **`$0.405`** on the Free tier (`$0.005 + 100 × $0.004`) down to **`$0.255`** on Gold+ (`$0.005 + 100 × $0.0025`).
- **Strict Budget Protection**: Checks `maxTotalChargeUsd` both before and after fetching so AI agents never exceed budget limits.

***

### Use with AI Agents (Apify MCP Server — Claude Desktop & Cursor)

Connect this Actor directly to **Claude Desktop**, **Cursor**, or **Windsurf** via the hosted Apify MCP Server:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com/?actors=francogb/clinical-trials-openfda-pharma-api"
    }
  }
}
```

> **Tip:** Load all 5 official-API Actors together in one MCP server by passing a comma-separated list:
> `https://mcp.apify.com/?actors=francogb/eu-public-tenders-aggregator,francogb/eu-company-vat-lei-verifier,francogb/us-stock-insider-darkpool-altdata,francogb/b2b-domain-techstack-dns-email-intel,francogb/clinical-trials-openfda-pharma-api`

**Example AI prompt:**

> *"Use `francogb/clinical-trials-openfda-pharma-api` to find recruiting Phase 3 oncology trials sponsored by industry (`industrySponsorsOnly: true`) and list the sponsor, enrollment count, primary completion date, and study contact emails."*

***

### Python SDK (`apify-client`) & cURL

#### Python (`apify-client`)

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])

run = client.actor("francogb/clinical-trials-openfda-pharma-api").call(
    run_input={
        "datasets": ["CLINICAL_TRIALS", "FDA_APPROVALS", "FDA_RECALLS"],
        "conditionOrDisease": "oncology",
        "trialStatuses": ["RECRUITING"],
        "phases": ["PHASE3"],
        "industrySponsorsOnly": True,
        "maxResultsPerDataset": 25,
    }
)

items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
print(f"Fetched {len(items)} pharma/biotech records")
```

#### cURL (Synchronous Run for n8n, Make & Zapier)

```bash
curl -X POST "https://api.apify.com/v2/acts/francogb~clinical-trials-openfda-pharma-api/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "datasets": ["CLINICAL_TRIALS"],
    "conditionOrDisease": "oncology",
    "trialStatuses": ["RECRUITING"],
    "phases": ["PHASE3"],
    "industrySponsorsOnly": true,
    "maxResultsPerDataset": 25
  }'
```

***

### FAQ

- **Does this Actor use browsers or residential proxies?**
  No. It queries official **ClinicalTrials.gov API v2** and **openFDA** REST endpoints directly over HTTP/JSON—zero Playwright and zero proxy costs.
- **How fast is a run and how fresh are the records?**
  Typical multi-dataset runs finish in ~2–3 seconds and return live regulatory data directly from ClinicalTrials.gov and FDA APIs.
- **Does it extract Principal Investigator and site contact emails?**
  Yes. For `CLINICAL_TRIALS`, central contacts and site-level contacts are extracted and deduplicated into `contactNames`, `contactEmails`, and `contactPhones`.
- **Is it ready for Apify MCP Server and n8n workflows?**
  Yes. Complete `input_schema.json`, `output_schema.json`, and `dataset_schema.json` definitions are included for seamless integration with Claude Desktop, Cursor, n8n, Make, and LangGraph.

***

### More Fast, Official-API Actors by `francogb`

- **[EU Public Tenders & Procurement API (TED, TenderNed, BOAMP, UK)](https://apify.com/francogb/eu-public-tenders-aggregator)** — Aggregate live European public procurement tenders across TED Europa, TenderNed, BOAMP, and UK Contracts Finder.
- **[EU Company, VAT (VIES) & LEI Verifier & Enricher API](https://apify.com/francogb/eu-company-vat-lei-verifier)** — Validate EU VAT numbers via VIES, resolve legal entity IDs (LEI / KvK / BORME) via GLEIF, and enrich websites.
- **[US Stock Insider (Form 4), FINRA Dark Pools & Odd-Lots API](https://apify.com/francogb/us-stock-insider-darkpool-altdata)** — Official SEC EDGAR Form 4 insider buys/sells, FINRA daily dark pool short volume ratios, and SEC Odd-Lot corporate actions.
- **[B2B Domain Tech Stack, DNS/DMARC, RDAP & Email Verifier API](https://apify.com/francogb/b2b-domain-techstack-dns-email-intel)** — Bulk tech-stack detection, DNS/MX/SPF/DMARC deliverability verification, RDAP domain age, and public contacts.

# Actor input Schema

## `datasets` (type: `array`):

Select which official US pharma/biotech APIs to query. Allowed values: CLINICAL_TRIALS, FDA_APPROVALS, FDA_RECALLS.

## `conditionOrDisease` (type: `string`):

Medical condition or therapeutic area (e.g. 'oncology', 'diabetes', 'obesity', 'alzheimer'). Applied to ClinicalTrials.gov and recall/product search.

## `drugOrIntervention` (type: `string`):

Brand name, active ingredient, molecule, or intervention keyword (e.g. 'semaglutide', 'pembrolizumab', 'ozempic').

## `sponsor` (type: `string`):

Lead sponsor, manufacturer, or recalling firm name (e.g. 'Pfizer', 'Novartis', 'Eli Lilly').

## `trialStatuses` (type: `array`):

Filter ClinicalTrials.gov statuses. Allowed values: RECRUITING, NOT_YET_RECRUITING, ACTIVE_NOT_RECRUITING, COMPLETED, ENROLLING_BY_INVITATION, SUSPENDED, TERMINATED, WITHDRAWN.

## `phases` (type: `array`):

Filter ClinicalTrials.gov study phases. Allowed values: EARLY_PHASE1, PHASE1, PHASE2, PHASE3, PHASE4, NA. Leave empty for all phases.

## `industrySponsorsOnly` (type: `boolean`):

When enabled, keeps only ClinicalTrials.gov studies where leadSponsor.class is INDUSTRY (filters out academic/NIH trials).

## `country` (type: `string`):

Optional country filter applied to ClinicalTrials.gov locations and openFDA recall country (e.g. 'United States', 'Germany').

## `maxResultsPerDataset` (type: `integer`):

Maximum number of records to fetch per selected dataset (1-500). Results are merged round-robin across datasets and capped by maxTotalChargeUsd.

## Actor input object example

```json
{
  "datasets": [
    "CLINICAL_TRIALS",
    "FDA_APPROVALS",
    "FDA_RECALLS"
  ],
  "conditionOrDisease": "oncology",
  "drugOrIntervention": "",
  "sponsor": "",
  "trialStatuses": [
    "RECRUITING"
  ],
  "phases": [],
  "industrySponsorsOnly": false,
  "country": "",
  "maxResultsPerDataset": 25
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `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 = {
    "datasets": [
        "CLINICAL_TRIALS",
        "FDA_APPROVALS",
        "FDA_RECALLS"
    ],
    "conditionOrDisease": "oncology",
    "trialStatuses": [
        "RECRUITING"
    ],
    "maxResultsPerDataset": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("francogb/clinical-trials-openfda-pharma-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 = {
    "datasets": [
        "CLINICAL_TRIALS",
        "FDA_APPROVALS",
        "FDA_RECALLS",
    ],
    "conditionOrDisease": "oncology",
    "trialStatuses": ["RECRUITING"],
    "maxResultsPerDataset": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("francogb/clinical-trials-openfda-pharma-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 '{
  "datasets": [
    "CLINICAL_TRIALS",
    "FDA_APPROVALS",
    "FDA_RECALLS"
  ],
  "conditionOrDisease": "oncology",
  "trialStatuses": [
    "RECRUITING"
  ],
  "maxResultsPerDataset": 25
}' |
apify call francogb/clinical-trials-openfda-pharma-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,francogb/clinical-trials-openfda-pharma-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/2vZLLwKZUdPd90oXg/builds/2SriAbosfZaZnbGkj/openapi.json
