# ClinicalTrials.gov Extractor (`cynix_dev/clinicaltrials-scraper`) Actor

Query the official ClinicalTrials.gov v2 API for studies by condition, intervention, country, or recruitment status. Free US government open data — no API key required. Returns clean, structured records ready for research, competitive intelligence, lead generation, and market analysis.

- **URL**: https://apify.com/cynix\_dev/clinicaltrials-scraper.md
- **Developed by:** [Cynix Dev](https://apify.com/cynix_dev) (community)
- **Categories:** Agents, Lead generation, Jobs
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 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

## ClinicalTrials.gov Extractor

Query the official **ClinicalTrials.gov v2 API** for studies by condition, intervention, country or recruitment status. Free US government open data — no API key required. Clean, structured records for research, competitive intelligence and market analysis.

### What it does

ClinicalTrials.gov is the authoritative global registry of clinical studies, run by the US National Library of Medicine. This Actor queries its official v2 API — not a scrape — and returns flat, typed study records.

Search by `condition` (`melanoma`, `type 2 diabetes`), combine with an `intervention` (a drug or device), narrow by `country`, and filter on recruitment `overallStatus`. The API is free and public, so no proxy is needed.

### Features

- **Official v2 API** — authoritative data, no HTML scraping.
- **Condition + intervention search** — combine for precise cohorts.
- **Country filter** — where trials recruit.
- **Recruitment-status filter** — recruiting, completed, terminated, etc.
- **Paged automatically** — `maxResults` caps a run across pages.
- **No API key and no proxy required.**

### What people use it for

- Competitive intelligence — what trials a competitor is running.
- Market analysis — therapeutic-area pipeline density.
- Patient recruitment research — trials actively recruiting by region.
- Academic literature groundwork — frame a study against existing ones.
- Investor diligence — pipeline and trial-status signals.

### Understanding the fields

| Field | Meaning |
| --- | --- |
| `nctId` | The trial's unique ClinicalTrials.gov identifier |
| `overallStatus` | Recruiting / Completed / Terminated / Withdrawn / Unknown |
| `phase` | For interventional drug trials: Early Phase 1 → Phase 4 |
| `enrollmentCount` | Number of participants the study targets |
| `studyType` | Interventional or Observational |

#### Search strategy

Start broad with a `condition`, then layer `intervention` to isolate a mechanism, and `country` to scope geography. Use `overallStatus: RECRUITING` when you care about active enrolment. For time-bounded analysis, page through with `maxResults` set high and filter on `startDate`/`completionDate` downstream.

### Input

All fields optional. `condition` focuses the search; `overallStatus` filters by recruitment stage.

| Field | Type | Default | What it does |
| --- | --- | --- | --- |
| `condition` | string | — | Medical condition to search, e.g. 'melanoma' or 'type 2 diabetes'. Uses the official query.cond parameter. |
| `intervention` | string | — | Intervention, drug, or device name (query.intr). Combine with a condition for narrower results. |
| `country` | string | — | Filter by country where the trial recruits (query.locn), e.g. 'Germany' or 'United States'. |
| `overallStatus` | string | `ALL` | Trial recruitment status filter (filter.overallStatus). Options: `ALL`, `RECRUITING`, `NOT_YET_RECRUITING`, `ENROLLING_BY_INVITATION`, `ACTIVE_NOT_RECRUITING`, `COMPLETED`, `TERMINATED`, `WITHDRAWN`, `SUSPENDED`, `UNKNOWN`. |
| `maxResults` | integer | `25` | Maximum number of studies to return (1-500). The actor pages the API automatically. Range 1–500. |
| `proxyConfiguration` | object | see below | The ClinicalTrials.gov API is a free, public US government endpoint and does not require a proxy. Leave this disabled unless you are rate-limited. |

#### Input example

```json
{
  "overallStatus": "ALL",
  "maxResults": 25,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

### Output

One record per study: NCT id, titles, status, conditions, interventions, phase, enrollment, dates, lead sponsor and URL.

Every dataset record contains: `nctId`, `briefTitle`, `officialTitle`, `overallStatus`, `conditions`, `interventions`, `phase`, `studyType`, `enrollmentCount`, `startDate`, `completionDate`, `leadSponsor`, `url`, `fetchedAt`.

#### Output example

A real record from a run of this Actor:

```json
{
  "nctId": "NCT03509935",
  "briefTitle": "Use of Bedside Ultrasonography on the Incidence of Acute Renal Failure in High-risk Surgical Patients",
  "officialTitle": "Use of Bedside Ultrasonography on the Incidence of Acute Renal Failure in High-risk Surgical Patients: Randomized Clinical Trial",
  "overallStatus": "COMPLETED",
  "conditions": "Acute Kidney Injury",
  "interventions": "Intervention Ultrasound Group",
  "phase": "NA",
  "studyType": "INTERVENTIONAL",
  "enrollmentCount": "111",
  "startDate": "2018-03-12",
  "completionDate": "2019-03-31",
  "leadSponsor": "Federal University of Minas Gerais",
  "url": "https://clinicaltrials.gov/study/NCT03509935",
  "fetchedAt": "2026-08-21T12:46:26.107Z"
}
```

Export the dataset as JSON, CSV, Excel, XML or JSONL from the Console, or pull it programmatically through the Apify API and any of the official clients.

### How to use it

1. Click **Try for free** (or **Start** if you already have an Apify account).
2. Fill in the input fields described above — the defaults already produce a working run.
3. Press **Start** and watch the log; results stream into the dataset as they are found.
4. When the run finishes, open the **Output/Storage** tab and export as JSON, CSV or Excel.

Runs can be scheduled (hourly, daily, weekly) and wired into Slack, Google Sheets, Zapier, Make, webhooks or your own backend through Apify integrations. Everything the Console does is also available over the [Apify API](https://docs.apify.com/api/v2).

### Proxy configuration

This Actor accepts a standard Apify **proxy configuration** object. Residential proxy is the default because the target site rate-limits datacenter IP ranges; you can select a specific exit country or supply your own proxy URLs.

```json
{
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

### Pricing

This Actor is billed on Apify's **pay-per-event** model: a small charge when a run starts, plus a charge for each result written to the dataset. You only pay for records you actually receive — a run that finds nothing costs only the start event. Current rates are always shown on the **Pricing** tab of this page, and the run log prints your usage as it goes.

Free-plan credits from Apify cover a large amount of light usage, so you can evaluate the Actor before committing to anything.

### FAQ

#### Do I need an API key?

No. ClinicalTrials.gov is a free US government open-data service.

#### Is the data authoritative?

Yes — it's the official registry run by the US National Library of Medicine, sourced from sponsor submissions.

#### Can I get results/outcome data, not just registry metadata?

This version returns the structured registry record (design, status, sponsor, dates). Detailed results posts exist on the registry and can be fetched from the same API in a follow-up step.

#### Why no proxy?

The v2 API is a public government endpoint designed for programmatic access; datacenter requests are fine.

#### How far back does it go?

The registry covers studies from the early 2000s to the present, with completeness improving over time.

### Other Actors by cynix\_dev

| Actor | What it does |
| --- | --- |
| [arXiv Papers Extractor](https://apify.com/cynix_dev/arxiv-papers) | Search arXiv and extract papers as clean typed records: title, abstract, authors, categories, DOI, and direct PDF links. |
| [CoinGecko Markets — Crypto Data API](https://apify.com/cynix_dev/coingecko-markets) | Live cryptocurrency market data from CoinGecko as clean typed JSON: price, market cap, volume, 24h change, ATH/ATL, … |
| [FX Rates & History](https://apify.com/cynix_dev/fx-rates-history) | Latest and historical foreign exchange rates (ECB reference data) as clean, typed dataset records. |
| [USGS Earthquakes — GeoJSON Extractor](https://apify.com/cynix_dev/usgs-earthquakes) | Pull live and historical earthquakes from the USGS FDSN event service as clean typed JSON: magnitude, place, time, lat/lon/depth, … |
| [Launch Library 2 — Rocket Launch Tracker](https://apify.com/cynix_dev/launch-library-launches) | Upcoming, previous, and specific rocket launches from The Space Devs' Launch Library 2 API. |
| [Open Food Facts Extractor](https://apify.com/cynix_dev/open-food-facts) | Search and extract food-product data from Open Food Facts as clean typed JSON: name, brand, ingredients, allergens, nutrition … |
| [SEC EDGAR Filings Extractor](https://apify.com/cynix_dev/sec-edgar-filings) | Search and extract SEC EDGAR filings: full-text search across all filings or company filing histories by CIK. |

### Legal and responsible use

This Actor collects only publicly available information. You are responsible for how you use the data, including compliance with the target site's Terms of Service, robots directives, copyright, and data protection law such as GDPR and CCPA. Do not use it to gather personal data without a lawful basis.

### Support and feedback

Found a bug, hit a site change, or need an extra field? Open a ticket on the **Issues** tab of this Actor — issues are read and fixed. Feature requests and custom-scraper enquiries are welcome through the same channel.

# Actor input Schema

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

Medical condition to search, e.g. 'melanoma' or 'type 2 diabetes'. Uses the official query.cond parameter.

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

Intervention, drug, or device name (query.intr). Combine with a condition for narrower results.

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

Filter by country where the trial recruits (query.locn), e.g. 'Germany' or 'United States'.

## `overallStatus` (type: `string`):

Trial recruitment status filter (filter.overallStatus).

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

Maximum number of studies to return (1-500). The actor pages the API automatically.

## `proxyConfiguration` (type: `object`):

The ClinicalTrials.gov API is a free, public US government endpoint and does not require a proxy. Leave this disabled unless you are rate-limited.

## Actor input object example

```json
{
  "condition": "type 2 diabetes",
  "intervention": "metformin",
  "country": "United States",
  "overallStatus": "ALL",
  "maxResults": 25,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing all clinical trial records.

# 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",
    "intervention": "metformin",
    "country": "United States"
};

// Run the Actor and wait for it to finish
const run = await client.actor("cynix_dev/clinicaltrials-scraper").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",
    "intervention": "metformin",
    "country": "United States",
}

# Run the Actor and wait for it to finish
run = client.actor("cynix_dev/clinicaltrials-scraper").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",
  "intervention": "metformin",
  "country": "United States"
}' |
apify call cynix_dev/clinicaltrials-scraper --silent --output-dataset

```

## MCP server setup

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

```

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/UP4hfvALBhsushLaR/builds/gxmRNL129iciWeXf4/openapi.json
