# ClinicalTrials.gov Scraper: Search Clinical Trials by Drug (`nexus-scrapers/clinical-trials-search`) Actor

Search ClinicalTrials.gov, the official registry of clinical studies, by condition, drug or intervention, sponsor, location, phase and recruitment status. One flat record per trial with dates, enrollment, sponsors, sites, eligibility and outcomes. Official API v2, no key. JSON, CSV or Excel.

- **URL**: https://apify.com/nexus-scrapers/clinical-trials-search.md
- **Developed by:** [Nexus Scrapers](https://apify.com/nexus-scrapers) (community)
- **Categories:** Lead generation, Business, AI
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 clinical study records

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 - Search Clinical Trials by Drug, Condition or Sponsor

Search and export **clinical studies from ClinicalTrials.gov** as clean, flat JSON, CSV or Excel. Filter by **condition, drug (intervention), sponsor, country or city, geographic radius, recruitment status, phase, study type** and by **start, completion or last-update dates**, or fetch a list of **NCT IDs**. Each result has one record per study with titles, status, phases, conditions, interventions, sponsor and collaborators, enrollment, key dates, a capped list of sites with the total site count, an eligibility summary and a link. No API key, no proxy, no browser and no login needed.

The Actor reads the **official ClinicalTrials.gov API v2** run by the U.S. National Library of Medicine. The default run returns the 20 most recently updated studies that are recruiting or about to recruit.

### Who is it for

- **Pharma and biotech teams, CROs and investors** tracking competitor pipelines: which sponsor runs which phase 2/3 trials, for which condition, where and since when.
- **Patient advocacy groups, clinicians and coordinators** looking for recruiting trials near a place (country, city or radius) for a condition.
- **Researchers and analysts** building datasets of trials by condition, sponsor class, phase or date, including which ones have results posted.
- **AI agents and MCP users**: the input and dataset schemas describe every field, so an agent can answer "which phase 3 trials for X started this year?" in plain language.

### What you get

One dataset item per study:

- `nctId`, `url`, `briefTitle`, `officialTitle`, `acronym`, `briefSummary`
- `overallStatus` (and `whyStopped`), `phases`, `studyType`
- `conditions` and `interventions` (type + name)
- `leadSponsor` with `leadSponsorClass` (industry, NIH, other...), `collaborators`
- `enrollment` (with ACTUAL/ESTIMATED), `startDate`, `primaryCompletionDate`, `completionDate`, `firstPostedDate`, `lastUpdatePostedDate`
- `locationsCount`, `locationCountries` and a capped `locations` list (facility, city, state, country, site status)
- eligibility summary: `minimumAge`, `maximumAge`, `ageGroups`, `sex`, `healthyVolunteers`
- `hasResults`: whether results are posted on ClinicalTrials.gov

Optional: the full **eligibility criteria text** (`includeEligibilityCriteria`), **primary and secondary outcomes** (`includeOutcomes`), and **central contacts and study officials** (`includeContacts`, off by default, see the FAQ). Full field reference in [SCHEMA.md](./SCHEMA.md).

### Input

All filters are optional and are combined with AND.

| Field | Description |
|---|---|
| `condition`, `intervention`, `sponsor` | Condition/disease, drug or other intervention, lead sponsor or collaborator |
| `searchTerm`, `titleSearch` | Free text over all fields, or only titles/acronyms (AND, OR, NOT and quotes supported) |
| `country`, `city` | Location of at least one site (combined when both set) |
| `latitude`, `longitude`, `radiusKm` | Geographic search: studies with a site within the radius (default 50 km) |
| `overallStatus` | Default Recruiting + Not yet recruiting. Pick others, or send an empty list for all statuses |
| `phases`, `studyTypes` | Early phase 1 to phase 4, N/A; interventional, observational, expanded access |
| `onlyWithResults` | Only studies with posted results |
| `startFrom/To`, `primaryCompletionFrom/To`, `completionFrom/To`, `firstPostedFrom/To`, `lastUpdateFrom/To` | Date ranges, `YYYY-MM-DD`, either end optional |
| `nctIds` | List of NCT IDs (up to 1,000); the default status filter does not apply and `maxItems` is raised to the number of IDs |
| `sortBy` | `lastUpdate` (default, newest first), `firstPosted`, `startDate`, `relevance` |
| `maxItems` | Maximum results (default 20, maximum 10,000) |
| `maxLocations` | Sites listed per study (default 10); the total is always in `locationsCount` |
| `includeEligibilityCriteria`, `includeOutcomes`, `includeContacts` | Optional blocks, all off by default |

#### Example: phase 3 oncology trials from industry sponsors in Italy, updated this year

```json
{
  "condition": "cancer",
  "country": "Italy",
  "phases": ["PHASE3"],
  "studyTypes": ["INTERVENTIONAL"],
  "lastUpdateFrom": "2026-01-01",
  "maxItems": 100
}
```

#### Example: what is a sponsor running with a given drug

```json
{ "sponsor": "Pfizer", "intervention": "vaccine", "overallStatus": [], "sortBy": "startDate", "maxItems": 50 }
```

#### Example: recruiting studies within 30 km of Milan

```json
{ "condition": "diabetes", "latitude": 45.4642, "longitude": 9.19, "radiusKm": 30, "maxItems": 50 }
```

#### Example: look up specific studies with outcomes and eligibility text

```json
{ "nctIds": ["NCT04000165", "NCT01205282"], "includeOutcomes": true, "includeEligibilityCriteria": true }
```

### Output example

Shortened record (real data, 2026-11-04):

```json
{
  "schemaVersion": "1.0",
  "nctId": "NCT07807280",
  "url": "https://clinicaltrials.gov/study/NCT07807280",
  "briefTitle": "C-Carbs: A CGM-guided Approach to Teaching Carb Awareness",
  "overallStatus": "RECRUITING",
  "phases": ["NA"],
  "studyType": "INTERVENTIONAL",
  "conditions": ["Type 1 Diabetes"],
  "interventions": [{ "type": "BEHAVIORAL", "name": "C-Carbs Program" }],
  "leadSponsor": "University of California, Los Angeles",
  "leadSponsorClass": "OTHER",
  "collaborators": [],
  "enrollment": 40,
  "enrollmentType": "ESTIMATED",
  "startDate": "2026-11-16",
  "primaryCompletionDate": "2028-05-31",
  "completionDate": "2028-11-30",
  "firstPostedDate": "2026-09-08",
  "lastUpdatePostedDate": "2026-11-04",
  "locationsCount": 1,
  "locationCountries": ["United States"],
  "locations": [{ "facility": "University of California Los Angeles", "city": "Los Angeles", "country": "United States" }],
  "minimumAge": "18 Years",
  "sex": "ALL",
  "healthyVolunteers": false,
  "hasResults": false
}
```

### Use cases

- **Competitive pipeline monitoring**: schedule the Actor with `lastUpdateFrom` set to yesterday and a sponsor or drug filter, and push new and changed studies to Slack, e-mail or a sheet.
- **Site and patient-recruitment search**: recruiting trials by condition, country, city or radius.
- **Market and landscape research**: counts and timelines by phase, sponsor class, condition or country; completion dates show when readouts are due.
- **Feeding AI agents** with structured trial data.

### Pricing

Pay only for the results you get. Set **Maximum results** (and the run's maximum cost) to control spending: the Actor stops as soon as either limit is reached. Runs that find no studies return no results and charge nothing. See the Pricing tab of this Actor for the current price.

### API, MCP and AI agents

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("nexus-scrapers/clinical-trials-search").call(run_input={
    "condition": "asthma", "phases": ["PHASE3"], "maxItems": 50,
})
for study in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(study["lastUpdatePostedDate"], study["nctId"], study["leadSponsor"], study["briefTitle"])
```

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('nexus-scrapers/clinical-trials-search').call({ intervention: 'semaglutide', maxItems: 50 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

**MCP and AI agents.** Add `https://mcp.apify.com` (with `?actors=nexus-scrapers/clinical-trials-search` to load this Actor directly) to Claude, Cursor, VS Code or any MCP client, authorize with your Apify account and ask, for example, "Which phase 2 trials for Alzheimer's disease started in 2026?". Also works with LangChain, LlamaIndex, CrewAI and n8n through the Apify integrations.

### FAQ

**Do I need an API key?** No. The ClinicalTrials.gov API is open and needs no registration.

**Is the data official?** Yes, it comes straight from the ClinicalTrials.gov API v2 (U.S. National Library of Medicine). Every record links to the study page.

**Why do I get only recruiting studies by default?** The most common question is what is open now. Choose other statuses in `overallStatus`, or send an empty list for all of them. When you pass `nctIds`, no status filter applies.

**Does it include contact details?** Not by default. Central contacts and study officials are names, e-mail addresses and phone numbers of individual staff, which are personal data under GDPR. Turn on `includeContacts` only if you have a lawful basis to process them. Even then only the contacts published in the study record are returned, never per-site contacts.

**How many sites are listed?** The total is always in `locationsCount` and the countries in `locationCountries`; the `locations` list is capped by `maxLocations` (default 10) because large trials have 100 or more sites.

**Why is a date like `2026-08`?** Some records only publish year and month; the Actor passes dates through as published.

**How fresh is the data?** The Actor queries the registry live. Sponsors update their records continuously and the API data refreshes daily; each record has `lastUpdatePostedDate`.

**How many results can I get?** Up to 10,000 per run. For bigger exports, split by date range.

**Can I get results data (outcome numbers, adverse events)?** No. The Actor returns the protocol-level record and the `hasResults` flag; results are on the study page (`url`).

**What do the phases mean?** `EARLY_PHASE1`, `PHASE1`, `PHASE2`, `PHASE3`, `PHASE4`; `NA` means not applicable (for example devices or behavioural studies). A phase 2/3 study lists both.

### Data source, attribution and terms

Data come from [ClinicalTrials.gov](https://clinicaltrials.gov), a service of the U.S. National Library of Medicine at the National Institutes of Health, through its public API v2. ClinicalTrials.gov data are available to everyone at no charge under the site's [Terms and Conditions](https://clinicaltrials.gov/about-site/terms-conditions) (last updated 31 January 2023, read on 4 November 2026). If you publish or redistribute the data, those terms ask you to:

- attribute the source as ClinicalTrials.gov;
- keep the data current and clearly show the date it was processed by ClinicalTrials.gov (every record carries `lastUpdatePostedDate`);
- state any modifications. This Actor only selects and flattens fields from the API's JSON: no values are rewritten, except that long lists of sites are capped (`maxLocations`) and `locationsCount` keeps the full number;
- not claim proprietary rights over the data, and not use email addresses from the database for marketing or other promotional purposes. That is one reason contacts are off by default (`includeContacts`).

The data carry an international copyright outside the United States, and some records may be subject to third-party copyright. The registry gives no warranty on accuracy or completeness. This Actor is an independent tool, is not affiliated with or endorsed by NLM, NIH or the U.S. government, and its output is not medical advice or an invitation to enrol in a trial: always check the official study page and speak to a clinician. The Actor accesses the API politely (descriptive User-Agent, one request per second, back-off on HTTP 429).

### Limitations

- Only studies registered on ClinicalTrials.gov. Other registries (EU CTIS, ISRCTN, WHO ICTRP) are not covered.
- Search matching (synonyms, relevance) is done by the registry; `condition: "heart attack"` also finds myocardial infarction studies.
- `country`/`city` match sites; `latitude`/`longitude` only match sites for which the registry holds coordinates.
- Results data, arm/group details and per-site contacts are not included.
- Up to 10,000 studies per run.

# Actor input Schema

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

Condition, disease or synonym (the registry expands synonyms, e.g. 'heart attack' also finds myocardial infarction).

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

Drug, device, procedure or other intervention name.

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

Lead sponsor or collaborator organisation name.

## `searchTerm` (type: `string`):

Free text searched across all fields of a study. Supports AND, OR, NOT and quotes.

## `titleSearch` (type: `string`):

Words that must appear in the title or acronym.

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

Country of at least one study site, in English (Italy, United States, Germany, ...).

## `city` (type: `string`):

City, state or facility name of a study site. Combined with the country when both are set.

## `latitude` (type: `number`):

Centre of a geographic search, -90 to 90. Use together with longitude.

## `longitude` (type: `number`):

Centre of a geographic search, -180 to 180.

## `radiusKm` (type: `number`):

Radius around the latitude/longitude point; studies with a site within it are returned.

## `overallStatus` (type: `array`):

Only studies in one of these statuses. If you leave this field out the Actor uses Recruiting + Not yet recruiting (except when you give NCT IDs, then no status filter applies). Send an empty list for all statuses.

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

Study phase(s). Empty = any phase.

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

Empty = any type.

## `onlyWithResults` (type: `boolean`):

Return only studies whose results have been posted on ClinicalTrials.gov.

## `startFrom` (type: `string`):

Study start date on or after this day (YYYY-MM-DD).

## `startTo` (type: `string`):

Study start date on or before this day.

## `primaryCompletionFrom` (type: `string`):

Primary completion date on or after this day.

## `primaryCompletionTo` (type: `string`):

Primary completion date on or before this day.

## `completionFrom` (type: `string`):

Study completion date on or after this day.

## `completionTo` (type: `string`):

Study completion date on or before this day.

## `firstPostedFrom` (type: `string`):

First posted on ClinicalTrials.gov on or after this day.

## `firstPostedTo` (type: `string`):

First posted on or before this day.

## `lastUpdateFrom` (type: `string`):

Last updated on ClinicalTrials.gov on or after this day. Handy for daily monitoring.

## `lastUpdateTo` (type: `string`):

Last updated on or before this day.

## `nctIds` (type: `array`):

Fetch these studies directly (NCT followed by 8 digits, up to 1,000). Other filters still apply if set; the default status filter does not. Maximum results is raised to the number of IDs.

## `sortBy` (type: `string`):

Order of results; the first N are kept when maximum results is reached.

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

Maximum number of studies to return. You are charged per result, so keep this low while testing.

## `maxLocations` (type: `integer`):

Cap on the locations list of each study. The total number of sites is always given in locationsCount. 0 = no list.

## `includeEligibilityCriteria` (type: `boolean`):

Add the full inclusion/exclusion criteria text to every study (long text).

## `includeOutcomes` (type: `boolean`):

Add the primary and secondary outcome measures (with time frames) to every study.

## `includeContacts` (type: `boolean`):

Add the central contacts (name, role, e-mail, phone) and overall officials published by the study. Off by default: these are names and e-mail addresses of study staff, which are personal data under GDPR. Enable only if you have a lawful basis to process them.

## Actor input object example

```json
{
  "condition": "breast cancer",
  "intervention": "pembrolizumab",
  "sponsor": "Novartis",
  "searchTerm": "\"long covid\" AND rehabilitation",
  "titleSearch": "semaglutide",
  "country": "Italy",
  "city": "Milan",
  "latitude": 45.4642,
  "longitude": 9.19,
  "radiusKm": 50,
  "overallStatus": [
    "RECRUITING",
    "NOT_YET_RECRUITING"
  ],
  "onlyWithResults": false,
  "startFrom": "2025-01-01",
  "startTo": "2026-12-31",
  "primaryCompletionFrom": "2026-01-01",
  "primaryCompletionTo": "2027-12-31",
  "completionFrom": "2026-01-01",
  "completionTo": "2028-12-31",
  "firstPostedFrom": "2026-01-01",
  "firstPostedTo": "2026-06-30",
  "lastUpdateFrom": "2026-10-01",
  "lastUpdateTo": "2026-10-31",
  "nctIds": [
    "NCT04000165",
    "NCT01205282"
  ],
  "sortBy": "lastUpdate",
  "maxItems": 20,
  "maxLocations": 10,
  "includeEligibilityCriteria": false,
  "includeOutcomes": false,
  "includeContacts": false
}
```

# Actor output Schema

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

All studies, opened on the Overview table (status, phase, sponsor, enrollment, sites, link).

## `dates` (type: `string`):

The same dataset opened on the Timeline view (start, completion, first posted, last update, results).

# 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 = {
    "overallStatus": [
        "RECRUITING",
        "NOT_YET_RECRUITING"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexus-scrapers/clinical-trials-search").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 = {
    "overallStatus": [
        "RECRUITING",
        "NOT_YET_RECRUITING",
    ],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("nexus-scrapers/clinical-trials-search").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 '{
  "overallStatus": [
    "RECRUITING",
    "NOT_YET_RECRUITING"
  ],
  "maxItems": 20
}' |
apify call nexus-scrapers/clinical-trials-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nexus-scrapers/clinical-trials-search"
        }
    }
}
```

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/uAiJy6OYuxeQM2EMa/builds/dqMl6JQPbnk7pEW0Y/openapi.json
