# Clinical Trials Data Scraper (unofficial) (`504spam/clinical-trials-search`) Actor

Search ClinicalTrials.gov studies by condition, drug, sponsor, location, phase and status. Get sponsors, enrollment, dates, sites and countries as clean rows.

- **URL**: https://apify.com/504spam/clinical-trials-search.md
- **Developed by:** [Damion Morgan](https://apify.com/504spam) (community)
- **Categories:** News, 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 clinical 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

## Clinical Trials Data Scraper (unofficial)

I use ClinicalTrials.gov a lot, and the site's download options are limited when you want a clean list of studies with sponsors and sites. This Actor uses the official ClinicalTrials.gov API (v2) and flattens each study into one row.

### What it does

- Searches by free text, condition, drug or intervention, sponsor and location.
- Filters by recruitment status, phase and how recently the study was updated.
- Returns the NCT ID, titles, status, study type, phases, conditions, interventions, lead sponsor and class, collaborators, enrollment, start and completion dates, first posted and last updated dates, number of sites, countries, a list of sites (facility, city, country), the brief summary and a link.

### Who it's for

Pharma and biotech competitive intelligence, CROs and site networks looking for new studies, patient groups, investors and researchers.

### Input example

```json
{ "condition": "type 2 diabetes", "statuses": ["RECRUITING"], "phases": ["PHASE3"], "updatedWithinDays": 30, "maxResults": 200 }
```

### Output example

```json
{ "nctId": "NCT07817251", "title": "Research Study on How People With Type 2 Diabetes Tolerate Switching From Semaglutide to Cagrisema", "status": "RECRUITING", "phases": ["PHASE3"], "leadSponsor": "Novo Nordisk A/S", "enrollment": 210, "startDate": "2026-09-16", "locationCount": 40, "countries": ["United States"], "url": "https://clinicaltrials.gov/study/NCT07817251" }
```

### Good to know

- I don't include the names, phone numbers or emails of study contacts or investigators. You get facility names only.
- Data is as registered by sponsors. ClinicalTrials.gov doesn't verify it, and this isn't medical advice.
- Data is as of the retrieval time (see the `retrievedAt` field on each row) and may not be current. Check the official study page for the latest record.

### Data source and terms

Courtesy of the U.S. National Library of Medicine. Data comes from ClinicalTrials.gov, run by the U.S. National Library of Medicine. NLM's terms ask users not to imply NLM endorsement and to note when the data was retrieved. I don't use NLM or ClinicalTrials.gov logos.

Unofficial tool, not affiliated with or endorsed by ClinicalTrials.gov, the National Library of Medicine, NIH or the U.S. government.

# Actor input Schema

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

Any words, e.g. 'GLP-1'.

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

e.g. 'type 2 diabetes'.

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

e.g. 'semaglutide'.

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

e.g. 'Novo Nordisk'.

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

City, state or country, e.g. 'Texas'.

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

Leave empty for all.

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

Leave empty for all.

## `updatedWithinDays` (type: `integer`):

Only studies updated in the last N days. 0 = any.

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

Stop after this many results.

## Actor input object example

```json
{
  "searchTerm": "",
  "condition": "type 2 diabetes",
  "statuses": [],
  "phases": [],
  "updatedWithinDays": 0,
  "maxResults": 100
}
```

# 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 = {
    "searchTerm": "",
    "condition": "type 2 diabetes"
};

// Run the Actor and wait for it to finish
const run = await client.actor("504spam/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 = {
    "searchTerm": "",
    "condition": "type 2 diabetes",
}

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

```

## MCP server setup

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