# ClinicalTrials.gov Scraper: Clinical Trial Search & Alerts (`frank0309/clinicaltrials-gov`) Actor

Search ClinicalTrials.gov by condition, drug, sponsor, status, phase, study type, country and date. Each study has the NCT ID, summary, phases, enrollment, sponsor, collaborators, key dates and trial sites. Alert mode returns only new studies. No API key needed.

- **URL**: https://apify.com/frank0309/clinicaltrials-gov.md
- **Developed by:** [Jiakai Zhang](https://apify.com/frank0309) (community)
- **Categories:** Lead generation, Business, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 studies

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

## ClinicalTrials.gov Scraper: Clinical Trial Search & Alerts

Search [ClinicalTrials.gov](https://clinicaltrials.gov), the U.S. National Library of Medicine's registry of more than 500,000 clinical studies worldwide, and get clean, structured data. Filter by condition, drug or intervention, sponsor, recruitment status, phase, study type, country and date. Each study comes as one flat record with the NCT ID, summary, interventions, phases, enrollment, sponsor and collaborators, key dates and trial sites.

Switch on **alert mode** and schedule the Actor, and each run returns only studies you haven't seen yet. That gives you a feed of newly registered trials in your therapeutic area without a paid pipeline-intelligence subscription.

- **No API key, no login.** Uses the official ClinicalTrials.gov API v2.
- **Every filter that matters for BD.** Condition, intervention, sponsor, status, phase, study type, industry-sponsored only, country, city and date windows.
- **Trial sites included.** Facility, city, state and country of every site, plus a de-duplicated country list.
- **Alert mode.** Only new studies on every scheduled run, tracked separately for each filter set.
- **No personal data.** Investigator and site contact names, phones and emails are left out.

### Who uses it

- **Pharma and biotech business development** tracking competitor pipelines, new entrants in an indication and licensing targets.
- **CROs and site networks** spotting newly registered and not-yet-recruiting studies to pitch for, by country and phase.
- **Patient-recruitment firms** building lists of recruiting trials by condition and location.
- **Investors and analysts** following sponsors' trial starts, completions and terminations.
- **AI agents and RAG pipelines** that need current, structured trial data.

### Input

| Field | What it does |
|---|---|
| `condition` | Condition or disease, e.g. "non-small cell lung cancer". Synonyms are matched too. |
| `intervention` | Drug, device or procedure, e.g. "semaglutide". |
| `sponsor` | Lead sponsor or collaborator, e.g. "Pfizer". |
| `keywords` | Free text across the whole record. Supports AND, OR and quoted phrases. |
| `statuses` | Recruiting, Not yet recruiting, Active not recruiting, Completed, Terminated, and more. |
| `phases` | Early Phase 1, Phase 1 to 4, Not applicable. |
| `studyTypes` | Interventional, Observational, Expanded access. |
| `industrySponsoredOnly` | Only studies led by a company. |
| `countries` | Studies with a site in any of these countries, e.g. "United States", "Germany". |
| `location` | Free-text city, state or site name, e.g. "Boston". |
| `dateField` | Which date the window filters on: last update (default), study start, first posted or primary completion. |
| `dateFrom` / `dateTo` | Fixed date window (YYYY-MM-DD). |
| `withinLastDays` | Moving window for scheduled runs, e.g. 7 for the last week. |
| `onlyNewSinceLastRun` | Alert mode: return only studies earlier runs with the same filters have not returned. |
| `maxItems` | Stop after this many studies (default 100). Results are sorted by most recently updated. |

Example: industry-sponsored Phase 2 and 3 obesity trials that are recruiting or about to recruit in the U.S. or Germany:

```json
{
  "condition": "obesity",
  "statuses": ["RECRUITING", "NOT_YET_RECRUITING"],
  "phases": ["PHASE2", "PHASE3"],
  "studyTypes": ["INTERVENTIONAL"],
  "industrySponsoredOnly": true,
  "countries": ["United States", "Germany"],
  "onlyNewSinceLastRun": true,
  "maxItems": 500
}
```

### Output

```json
{
  "nctId": "NCT06672939",
  "title": "A Study of Orforglipron (LY3502970) in Adolescent Participants With Obesity, or Overweight With Related Comorbidities",
  "officialTitle": "Efficacy, Safety, and Pharmacokinetics of Orforglipron Once Daily Oral Versus Placebo in Adolescent Participants ...",
  "briefSummary": "The main purpose of this study ... is to evaluate the efficacy, safety, and pharmacokinetics of orforglipron ...",
  "conditions": ["Obesity", "Overweight"],
  "interventions": [{ "type": "DRUG", "name": "Orforglipron", "otherNames": ["LY3502970"] }, { "type": "DRUG", "name": "Placebo", "otherNames": [] }],
  "interventionNames": ["Orforglipron", "Placebo"],
  "studyType": "INTERVENTIONAL",
  "phases": ["PHASE3"],
  "overallStatus": "RECRUITING",
  "enrollment": 150,
  "enrollmentType": "ESTIMATED",
  "leadSponsor": "Eli Lilly and Company",
  "leadSponsorClass": "INDUSTRY",
  "collaborators": [],
  "startDate": "2024-11-18",
  "primaryCompletionDate": "2027-12",
  "completionDate": "2031-01",
  "firstPostedDate": "2024-11-04",
  "lastUpdatePostedDate": "2026-11-04",
  "hasResults": false,
  "locationCount": 34,
  "countries": ["Israel", "Italy", "Japan", "Poland", "United Kingdom", "United States"],
  "locations": [{ "facility": "Stamford Therapeutics Consortium", "city": "Stamford", "state": "Connecticut", "country": "United States" }],
  "url": "https://clinicaltrials.gov/study/NCT06672939"
}
```

Dates are ISO strings. Some are month-only (e.g. `2027-12`) because the sponsor registered them that way.

Download the results as JSON, CSV or Excel, or send them to Google Sheets, Slack, email, a CRM, Zapier or Make with Apify integrations.

### Set up a new-trial alert

1. Set your filters and turn on **Only new studies (alert mode)**.
2. Run it once. The first run returns everything that currently matches and remembers it.
3. Add a daily or weekly **Schedule** in Apify Console. Every later run returns only studies that are new for those filters.
4. Optionally connect an integration (email, Slack, Google Sheets) to receive each run's new studies.

### FAQ

**Where does the data come from?** From the official ClinicalTrials.gov API v2, run by the U.S. National Library of Medicine. Study records are public.

**Do I need an API key?** No.

**Are investigator contacts included?** No. Site and central contact names, phones and emails are deliberately left out. Each record links to its ClinicalTrials.gov page, where sponsors publish contact routes for prospective participants.

**Why did a study match my sponsor when someone else leads it?** The sponsor search also matches collaborators. Check `leadSponsor` and `collaborators`.

**How fresh is the data?** Each run queries ClinicalTrials.gov live; the registry updates daily on weekdays.

**Is this medical advice?** No. It is registry data for research and business use. Patients should talk to their doctor about trial participation.

### More tools from this developer

**Research, health and safety data:**

- [arXiv Papers: Search & New-Paper Alerts](https://apify.com/frank0309/arxiv-papers)
- [OpenAlex Scholarly Works: Paper Search & New-Paper Alerts](https://apify.com/frank0309/openalex-works)
- [U.S. Product Recalls: FDA, NHTSA & CPSC in One Feed](https://apify.com/frank0309/us-product-recalls)

Also available: government contracts, grants and regulation, job postings from company career pages, developer and ai ecosystem data. See [all tools](https://apify.com/frank0309).

# Actor input Schema

## `condition` (type: `string`):

E.g. "non-small cell lung cancer", "obesity" or "Alzheimer Disease". ClinicalTrials.gov also matches synonyms.

## `intervention` (type: `string`):

Drug, device, procedure or other intervention, e.g. "semaglutide", "pembrolizumab" or "CAR-T".

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

Company or organisation running or funding the study, e.g. "Pfizer" or "National Cancer Institute". Matches lead sponsors and collaborators.

## `keywords` (type: `string`):

Free-text search across the whole study record, e.g. an NCT ID, an acronym or "decentralized". Supports ClinicalTrials.gov search syntax such as AND, OR and quoted phrases.

## `statuses` (type: `array`):

Leave empty for all statuses.

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

Studies in any of these phases. Leave empty for all.

## `studyTypes` (type: `array`):

Leave empty for all types.

## `industrySponsoredOnly` (type: `boolean`):

Only studies whose lead sponsor is a company (pharma, biotech, device maker), not a university, hospital or government body.

## `countries` (type: `array`):

Studies with at least one site in any of these countries, written as on ClinicalTrials.gov, e.g. "United States", "Germany", "Japan", "Korea, Republic of".

## `location` (type: `string`):

Free-text location search, e.g. "Boston", "Texas" or "Mayo Clinic".

## `dateField` (type: `string`):

Which study date the date range or "last N days" below filters on.

## `dateFrom` (type: `string`):

Earliest date (YYYY-MM-DD) for the date chosen above. Leave empty for no lower bound.

## `dateTo` (type: `string`):

Latest date (YYYY-MM-DD) for the date chosen above. Future dates work for start and completion dates. Leave empty for no upper bound.

## `withinLastDays` (type: `integer`):

Moving window for scheduled runs: only studies whose chosen date falls in the last N days. Replaces "From date" when set.

## `onlyNewSinceLastRun` (type: `boolean`):

Return only studies that earlier runs with the same filters have not returned. Schedule the Actor daily or weekly to get a feed of newly registered trials. The first run returns everything that matches.

## `maxItems` (type: `integer`):

Stop after this many studies. Results are sorted by most recently updated first.

## Actor input object example

```json
{
  "condition": "obesity",
  "industrySponsoredOnly": false,
  "dateField": "lastUpdate",
  "onlyNewSinceLastRun": false,
  "maxItems": 100
}
```

# Actor output Schema

## `studies` (type: `string`):

All studies saved by this run, with conditions, interventions, phases, status, enrollment, sponsors, dates and trial sites.

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

The key fields of each study (NCT ID, title, conditions, phases, status, sponsor, enrollment, start date, link).

# 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 = {
    "condition": "obesity"
};

// Run the Actor and wait for it to finish
const run = await client.actor("frank0309/clinicaltrials-gov").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 = { "condition": "obesity" }

# Run the Actor and wait for it to finish
run = client.actor("frank0309/clinicaltrials-gov").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 '{
  "condition": "obesity"
}' |
apify call frank0309/clinicaltrials-gov --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,frank0309/clinicaltrials-gov"
        }
    }
}
```

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/J8hVVLmnTrCcBDWgF/builds/RHXx80Qm4Q5PQXZVg/openapi.json
