# Clinical Trials — ClinicalTrials.gov Registry (`sourcerow/clinical-trials`) Actor

Search clinical trials by condition, sponsor or NCT number — phase, status, enrolment, interventions, eligibility and sites, flattened from eight nested modules into one row per study.

- **URL**: https://apify.com/sourcerow/clinical-trials.md
- **Developed by:** [SourceRow](https://apify.com/sourcerow) (community)
- **Categories:**
- **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?

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

Search the world's clinical trials and get one flat row per study. Phase,
status, sponsor, enrolment, interventions, eligibility and sites, extracted from
eight nested modules of the ClinicalTrials.gov record.

### What it does

ClinicalTrials.gov is the US National Library of Medicine's registry of clinical
studies. Its API returns each study as eight nested modules with arrays inside
arrays, which is accurate and hard to use in a spreadsheet.

This Actor searches the registry and flattens each study into one row with 47
fields. Search by condition, sponsor, free text, or specific NCT numbers.

### What you get

47 fields per row, including `nct_id`, `title`, `status`, `phases`,
`study_type`, `lead_sponsor`, `sponsor_class`, `enrollment`, `enrollment_type`,
`conditions`, `interventions`, `start_date`, `completion_date`,
`countries_count`, eligibility criteria, and the registry dates.

The table view shows 14 of them; all 47 are in the JSON, CSV and Excel
downloads.

### Input

| Field | Meaning |
|---|---|
| `condition` | Medical condition, for example `type 2 diabetes`. |
| `searchTerm` | Free-text search across the record. |
| `sponsor` | Sponsor name. |
| `statuses` | Restrict to statuses such as `RECRUITING` or `COMPLETED`. |
| `nctIds` | Specific NCT numbers, fetched directly. |
| `maxStudies` | Stop after this many. `0` removes the cap. |

```json
{
  "condition": "type 2 diabetes",
  "statuses": ["RECRUITING"],
  "maxStudies": 200
}
```

### Sample output

One record, trimmed to the fields shown in the table view:

```json
{
  "nct_id": "NCT01904032",
  "title": "Sunshine 2 Study for Women With Diabetes",
  "status": "COMPLETED",
  "phases": "PHASE2",
  "study_type": "INTERVENTIONAL",
  "lead_sponsor": "Loyola University",
  "enrollment": 265,
  "enrollment_type": "ACTUAL",
  "conditions": "Diabetes | Depression | Quality of Life",
  "interventions": "Vitamin D3 | Vitamin D3 comparator",
  "start_date": "2013-11-21",
  "completion_date": "2018-08-31",
  "countries_count": 1,
  "issues": ""
}
```

Multi-valued fields are joined with `|` so that a row stays a row in CSV and
Excel.

### Pricing

| Event | Per 1,000 | Notes |
|---|---|---|
| Study | $2.00 | One charge per study returned |

Every trial registered for diabetes is about $48. There is no start fee and no
per-row dataset fee.

### What it does not do

**This is not medical advice and not a source for clinical decisions.** It is
the registry, flattened. Records are supplied by sponsors and the registry does
not verify them.

**No results data.** The registry holds posted results for some studies. This
Actor returns the study record, not the outcome measures.

**`enrollment` is a promise until it is not.** `enrollment_type` says which:
`ESTIMATED` is what the sponsor planned, `ACTUAL` is what happened. Summing the
two together produces a number that means nothing.

**Registry entries go stale.** Sponsors are required to update them and many do
not. `issues` marks `status_not_verified_recently` on records the sponsor
appears to have abandoned.

**Observational studies have no phase.** `phases` is null for those, and `NA`
where the study is interventional but not phased. The two are different.

### Notes

Filter on `enrollment_type` before summing patients. It is the difference
between what happened and what someone hoped would happen.

`sponsor_class` separates industry from academia and government, which is
usually the first cut in any analysis.

Search by sponsor to map a competitor's pipeline; search by intervention to find
everyone testing the same thing.

For pipeline analysis `status_not_verified_recently` is noise. For finding
stalled programmes it is the signal.

### Support

Open the **Issues** tab with the NCT number and the field that looks wrong.

### Licence and attribution

Trial records from ClinicalTrials.gov, a service of the US National Library of
Medicine at the National Institutes of Health. As a work of the US federal
government it carries no copyright under 17 U.S.C. 105. NLM does not endorse
this Actor.

# Actor input Schema

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

The condition studied, e.g. "type 2 diabetes". Left untouched, the Actor searches this condition so a first run shows you what the output looks like.

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

Any other term: an intervention, a drug, a technique.

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

The organisation running the trial, e.g. "Pfizer".

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

Keep only trials in these states. Empty means every state.

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

Specific trials by their NCT number, e.g. NCT00605592.

## `maxStudies` (type: `integer`):

Stop after this many. **0 removes the cap.** A broad condition can match tens of thousands.

## Actor input object example

```json
{
  "condition": "type 2 diabetes",
  "statuses": [],
  "nctIds": [],
  "maxStudies": 200
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "condition": "type 2 diabetes"
};

// Run the Actor and wait for it to finish
const run = await client.actor("sourcerow/clinical-trials").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": "type 2 diabetes" }

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

```

## MCP server setup

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

```

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/SemXhrvXk9Se8ENLp/builds/ZcUGdElQMSfUO8XfD/openapi.json
