# ClinicalTrials.gov Search — Trials, Sponsors and Sites (`dalbian/clinical-trials-search`) Actor

Search the US registry of clinical studies by condition, drug, sponsor, phase, status and country, and get back flat rows: title, sponsor, phase, enrollment, eligibility, primary outcome and the recruiting sites. Public NIH data, no key.

- **URL**: https://apify.com/dalbian/clinical-trials-search.md
- **Developed by:** [Benjamin Jerez](https://apify.com/dalbian) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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 Search — Trials, Sponsors, Sites and Eligibility

Search the US registry of clinical studies — 603 494 records — by condition, drug, sponsor, phase, status and country, and get back flat rows instead of nested JSON.

The registry's own API returns each study as a tree of protocol modules nested five levels deep. This Actor searches it and flattens the result: one row per trial, with the sponsor, the phase, the enrollment, the eligibility, the primary outcome and the sites in named columns you can sort in a spreadsheet.

No API key. Public NIH data.

### What a search returns

Input: condition `glioblastoma`, status `RECRUITING`, phases `PHASE2` and `PHASE3`, type `INTERVENTIONAL`, country `United States`.

The `summary` row reports 73 matching, 60 returned (the cap set in the input), and the filters that were applied. Then one `trial` row each. One of them, `NCT06556563`:

| Field | Value |
| --- | --- |
| `briefTitle` | EF-41/KEYNOTE D58: Phase 3 Study of Optune Concomitant With Temozolomide Plus Pembrolizumab in Newly Diagnosed Glioblastoma |
| `leadSponsor`, `sponsorClass` | NovoCure GmbH · INDUSTRY |
| `collaborators` | Merck Sharp & Dohme LLC |
| `phase`, `studyType` | Phase 3 · INTERVENTIONAL |
| `allocation`, `masking` | RANDOMIZED · QUADRUPLE |
| `enrollmentCount`, `enrollmentType` | 741 · ESTIMATED |
| `startDate`, `primaryCompletionDate` | 2025-02-03 (ACTUAL) · 2029-04 (ESTIMATED) |
| `primaryOutcome`, `primaryOutcomeTimeFrame` | Overall survival · 24 months |
| `interventionNames` | Optune® device; Temozolomide; Pembrolizumab; Placebo |
| `locationCount`, `countryCount` | 102 · 12 |
| `recruitingSiteCount` | 19 |
| `contactEmail`, `contactPhone` | clinicaltrials@novocure.com · 1-877-678-8611 |
| `minimumAge`, `sex`, `healthyVolunteers` | 18 Years · ALL · false |
| `url` | https://clinicaltrials.gov/study/NCT06556563 |

Plus `eligibilityCriteria` — the sponsor's full inclusion and exclusion list — `briefSummary`, `meshTerms`, the MeSH vocabulary the registry assigned, and a `locations` array with facility, city, state, country, per-site recruitment status and latitude/longitude.

### Two numbers worth reading twice

`locationCount` is the number of sites the trial lists. `recruitingSiteCount` is how many of them are actually open. On the trial above they are 102 and 19: the trial's overall status is RECRUITING, but most of its individual sites have already closed enrollment. Filtering on the trial status alone will send a patient to a hospital that stopped taking people last year.

`primaryCompletionDate` is when the primary endpoint is read out. `completionDate` is when the last follow-up ends, often years later. For read-out timing the first is the one you want.

### Sponsor search matches whole words

`Moderna` returns 1 trial. `ModernaTX` returns 142. The registry spells the company ModernaTX, Inc., and the search matches whole words, not prefixes — so the single hit for `Moderna` is a Vertex trial whose collaborator is literally named "Moderna, Inc".

Extra words narrow rather than widen: `Pfizer` returns 6 085 trials, `Pfizer Inc` returns 705.

The search also covers collaborators, not only the lead sponsor. Of the 142 ModernaTX trials, 114 are led by ModernaTX and 28 are academic or partner trials it co-funds — a Merck trial, three NIAID trials, three from the International AIDS Vaccine Initiative. Both `leadSponsor` and `collaborators` are on every row, so the distinction is visible rather than buried. Run a small search first and look at the `leadSponsor` column before scaling up.

### Status is where the interesting records are

The 142 ModernaTX trials break down as 85 COMPLETED, 21 ACTIVE\_NOT\_RECRUITING, 18 RECRUITING, 9 TERMINATED, 5 WITHDRAWN, 2 NOT\_YET\_RECRUITING and 2 UNKNOWN.

TERMINATED and WITHDRAWN are the programmes that stopped, with the dates attached. UNKNOWN means the sponsor has not updated the record past its own expected completion date, which is its own signal. The **Currently recruiting only** switch is shorthand for RECRUITING plus NOT\_YET\_RECRUITING, and it overrides the status list.

### Phases

A trial can declare two phases at once. Searching glioblastoma for PHASE2 and PHASE3 returned 30 trials marked Phase 2, 22 marked Phase 1/Phase 2, 7 Phase 3 and 1 Phase 2/Phase 3 — asking for a phase returns the combined designations that include it, which is what you want. `NA` is not a missing value; it is the phase of trials that have none, which covers most device, behavioural and observational work.

### Who uses this

Clinical operations and feasibility teams sizing a site list before a study starts, and checking who else is recruiting the same patients in the same country. Competitive intelligence and business development at pharma and biotech, watching a sponsor's pipeline by first-posted date. Patient advocacy groups and trial-matching services building searchable lists of open studies with contact details. Investors and analysts tracking read-out timing from `primaryCompletionDate`. Academic groups doing systematic reviews and registry-based research, where the terminated and withdrawn records matter as much as the completed ones.

### Scope and limits

**Registration, not results.** This Actor returns the protocol record: what the trial says it will do, who runs it and where. It does not return posted results, adverse-event tables or publications.

**Sponsors write their own records.** Condition names, keywords and intervention names are the sponsor's wording, not a controlled vocabulary. That is why the registry's synonym expansion matters, and why a search for `type 2 diabetes` also returns trials that wrote `T2DM`. The `meshTerms` column carries the standardised vocabulary the registry assigns on top.

**Records go stale.** `lastUpdateDate` is on every row. A trial marked RECRUITING whose last update is three years old is not reliable evidence that it is still recruiting.

**Not every trial is here.** ClinicalTrials.gov is comprehensive for US-regulated studies and voluntary elsewhere. A trial run only in the EU may appear in the EU register instead, and a trial run only in China or Japan may appear only in its national registry.

### Source and licence

**ClinicalTrials.gov**, the registry maintained by the US National Library of Medicine at the National Institutes of Health, through its public v2 API at `clinicaltrials.gov/api/v2/studies`. A US federal government work, public domain, no key and no registration. Queried live on every run, so the results are the registry as it stands at the moment of the run, not a cached copy.

### Frequently asked

**Why did my sponsor search return almost nothing?**
Because it matches whole words. Try the company's registered name as the registry spells it — ModernaTX rather than Moderna. Search the sponsor on its own with no other filters first, then read the `leadSponsor` column to see which spelling the registry actually uses before you add filters.

**Does a country filter mean the trial only runs there?**
No. It means at least one site is in that country. The row carries `countries` and `countryCount` so you can see the rest — the glioblastoma trial above matched on the United States and also runs in eleven other countries.

**Why is `phase` empty on some rows?**
Observational studies have no phase at all and the field is absent. Interventional studies without one carry the explicit value `NA`.

**How many trials can one run return?**
Up to ten thousand. Results are paged 200 at a time against the registry's cursor-based pagination, which was checked over four consecutive pages: 700 trials, 700 distinct NCT IDs, no overlap.

**Is the eligibility text complete?**
Yes, up to 20 000 characters, which covers essentially every record. Longer ones are marked with a trailing ellipsis, and the full text is always at the `url` on the row.

**Why does a search with only filters and no search term refuse to run?**
Because a filter alone would return an arbitrary slice of 603 494 studies sorted by relevance to nothing. Give at least one condition, intervention, sponsor or free-text term.

# Actor input Schema

## `conditions` (type: `array`):

Diseases or conditions to search, one per line — for example glioblastoma, type 2 diabetes. Several lines widen the search: a trial matching any one of them is returned. The registry expands synonyms, so 'heart attack' also finds trials indexed under myocardial infarction.

## `interventions` (type: `array`):

Drug names, devices, procedures or behavioural interventions, one per line — for example pembrolizumab, semaglutide. Brand and generic names both work; the registry indexes the other names a sponsor declared.

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

Organisation running or funding the trial — Pfizer, Mayo Clinic, National Cancer Institute. This matches collaborators as well as the lead sponsor, so a Pfizer search also returns academic trials Pfizer co-funded. The returned row carries both, so you can tell which is which. Matching is on whole words, not on prefixes: 'Moderna' finds 1 trial, 'ModernaTX' finds 142, because the registry spells the company ModernaTX, Inc. Extra words narrow rather than widen — 'Pfizer' returns 6 085 trials and 'Pfizer Inc' returns 705. Check the leadSponsor column of a small run before scaling up.

## `query` (type: `string`):

Searches the whole record — title, summary, eligibility, outcomes, keywords. Use it for anything the fields above do not cover, such as a biomarker (EGFR exon 20) or a trial design term (crossover).

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

Keep only trials in these states. Leave empty for all. TERMINATED and WITHDRAWN are the interesting ones for competitive work — they are the programmes that stopped, and the record says when. UNKNOWN means the sponsor has not updated the record past its expected completion date.

## `recruitingOnly` (type: `boolean`):

Shorthand for the two statuses a patient or a site-feasibility team cares about: RECRUITING and NOT\_YET\_RECRUITING. Overrides the status list above.

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

Keep only these phases. Leave empty for all. A trial can declare two phases at once (PHASE1 and PHASE2), and asking for PHASE2 returns it. NA is the value used by trials with no phase — device, behavioural and most observational work.

## `studyType` (type: `string`):

Interventional trials test something on assigned arms. Observational studies watch a cohort. Expanded access is compassionate-use supply, not a trial.

## `locationCountry` (type: `string`):

Keep only trials with at least one site in this country. Use the registry's own spelling — United States, United Kingdom, Czechia, Turkey (Türkiye), South Korea.

## `locationTerm` (type: `string`):

A finer location search than the country filter — Boston, Bavaria, Île-de-France. This is a text match on the site addresses, not a radius, so it will not find a hospital in a neighbouring town.

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

Relevance is best for a narrow question. 'First posted' is how you watch a field for new entrants. 'Enrollment' surfaces the large registrational trials.

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

Cap on trials returned. The registry holds well over half a million studies, so a broad search without a cap is a very long run.

## `locationsPerTrial` (type: `integer`):

A phase 3 trial can list several hundred sites. The row always carries the full locationCount and the list of countries; this controls how many individual sites are spelled out. Set to 0 for counts only.

## `includeEligibility` (type: `boolean`):

The sponsor's full inclusion and exclusion text. It is long — often several thousand characters — but it is the field that decides whether a patient fits.

## Actor input object example

```json
{
  "conditions": [
    "type 2 diabetes"
  ],
  "statuses": [],
  "recruitingOnly": false,
  "phases": [],
  "studyType": "any",
  "sortBy": "relevance",
  "maxResults": 100,
  "locationsPerTrial": 5,
  "includeEligibility": true
}
```

# Actor output Schema

# 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 = {
    "conditions": [
        "type 2 diabetes"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dalbian/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 = { "conditions": ["type 2 diabetes"] }

# Run the Actor and wait for it to finish
run = client.actor("dalbian/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 '{
  "conditions": [
    "type 2 diabetes"
  ]
}' |
apify call dalbian/clinical-trials-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dalbian/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/TAQEh4W1vdL5EBCGH/builds/5QB3wczaLhcUy2Jlp/openapi.json
