# Clinical Trial Data Search (`fetchfinch/clinical-trials-search`) Actor

Find and export structured clinical-trial records from ClinicalTrials.gov by condition, intervention, status, phase, location, or NCT ID.

- **URL**: https://apify.com/fetchfinch/clinical-trials-search.md
- **Developed by:** [Fetch Finch](https://apify.com/fetchfinch) (community)
- **Categories:** Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.80 / 1,000 clinical trial results

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

## Clinical Trial Data Search

Find, filter, and export structured clinical-trial records. Search by condition, intervention, recruitment status, study phase, location, or NCT ID and receive detailed study, eligibility, sponsor, intervention, outcome, and location data.

The Actor is designed for researchers, healthcare and life-sciences teams, data analysts, and developers who need reliable clinical-trial data in JSON, CSV, or other Apify dataset formats.

### Start quickly

Choose one of the ready-to-run public tasks:

- [Find recruiting Alzheimer clinical trials](https://apify.com/fetchfinch/clinical-trials-search/examples/recruiting-alzheimer-trials)
- [Look up a clinical trial by NCT ID](https://apify.com/fetchfinch/clinical-trials-search/examples/exact-trial-lookup)
- [Find open cancer clinical trials](https://apify.com/fetchfinch/clinical-trials-search/examples/open-cancer-trials)

You can also configure the Actor directly with the input examples below.

### Search clinical trials

Use `search` mode for a bounded query against the live clinical-trial registry.

```json
{
  "mode": "search",
  "condition": "Alzheimer disease",
  "status": ["RECRUITING", "NOT_YET_RECRUITING"],
  "country": "United States",
  "maxResults": 100
}
```

Supported search filters:

- `term` — free-text search expression
- `condition` — condition or disease
- `intervention` — drug, device, procedure, or other intervention
- `location` — location expression such as Boston or United States
- `status` — one or more overall recruitment statuses
- `phase` — one or more phases such as `PHASE2` or `PHASE3`
- `studyType` — for example `INTERVENTIONAL` or `OBSERVATIONAL`
- `country` — filters returned locations by country

At least one search term or filter is required. Results are always bounded by `maxResults`.

### Look up exact studies

Use `get` mode when you already have NCT identifiers.

```json
{
  "mode": "get",
  "nctIds": ["NCT01273766", "NCT04912466"],
  "includeRaw": false
}
```

Up to 100 NCT IDs can be requested in one run. Missing studies are returned as records with a `NOT_FOUND` error instead of failing the entire request.

### Output data

Each dataset item contains a stable normalized record with fields including:

- study identifiers, titles, acronym, type, status, phases, and dates
- enrollment, age range, sex, healthy-volunteer status, and eligibility criteria
- conditions, keywords, interventions, arm groups, and outcomes
- sponsors, collaborators, officials, references, and ontology terms
- study locations with facility, address, recruitment status, and coordinates
- `_provenance` metadata showing source, fetch time, cache state, and source timestamp

Set `includeRaw` to `true` to include the original source record in `raw_record`. The normalized fields are always available; the raw record is optional.

### Freshness and reliability

The Actor queries the live clinical-trial registry, retries transient upstream failures, caches successful pages for 15 minutes by default, and can use a stale cached page if the upstream service is temporarily unavailable.

Configure this behavior with:

- `cacheTtlSeconds` — cache lifetime from 0 to 604,800 seconds; use `0` to disable caching
- `allowStaleCache` — whether an older cached response may be used during an upstream failure

Every record includes provenance fields so downstream systems can distinguish fresh, cached, and stale results. Registry records can change after a run and should be verified before making clinical or operational decisions.

### Limits

- Maximum records per run: 10,000
- Maximum NCT IDs in one exact lookup: 100
- Maximum upstream page size: 1,000
- `country` filtering is applied to returned locations after the upstream query

The Actor provides registry data, not medical advice. It does not determine trial suitability, eligibility, safety, or treatment effectiveness.

Clinical-trial records may be incomplete, delayed, self-reported, or updated by study sponsors. Always consult the current registry record and qualified professionals for decisions involving patients or research participation.

# Actor input Schema

## `mode` (type: `string`):

search queries ClinicalTrials.gov, get retrieves exact NCT IDs, and snapshot reads a bounded external data slice.

## `term` (type: `string`):

ClinicalTrials.gov free-text search expression.

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

Condition-specific search expression.

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

Intervention-specific search expression.

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

Location-specific search expression, such as United States or Boston.

## `status` (type: `array`):

ClinicalTrials.gov overall-status filters.

## `phase` (type: `array`):

ClinicalTrials.gov phase filters, such as PHASE2 or PHASE3.

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

Study type filter, such as INTERVENTIONAL or OBSERVATIONAL.

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

Convenience filter applied to returned locations.

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

Exact NCT IDs for get mode, for example \["NCT01273766"].

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

Maximum records to emit. The actor never follows pagination without a bound.

## `pageSize` (type: `integer`):

ClinicalTrials.gov page size. Larger pages reduce requests but increase memory per page.

## `includeRaw` (type: `boolean`):

Include the original source row under raw\_record.

## `snapshotOffset` (type: `integer`):

Starting row for snapshot mode.

## `cacheTtlSeconds` (type: `integer`):

TTL for successful upstream pages stored in the Actor key-value store. Set to 0 to disable cache reads and writes.

## `allowStaleCache` (type: `boolean`):

If true, a previously cached page may be returned when the upstream is unavailable.

## Actor input object example

```json
{
  "mode": "search",
  "maxResults": 100,
  "pageSize": 100,
  "includeRaw": false,
  "snapshotOffset": 0,
  "cacheTtlSeconds": 900,
  "allowStaleCache": true
}
```

# Actor output Schema

## `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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("fetchfinch/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 = {}

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

```

## MCP server setup

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