# ClinicalTrials.gov Scraper - Trials, Sites & Sponsor Leads (`scrapesage/clinical-trials-scraper`) Actor

Scrape ClinicalTrials.gov by condition, drug, sponsor, phase, status or location. Rich trial records, research-site & investigator contact leads, and sponsor pipeline analytics. Keyless, no browser, monitor mode. Independent tool, not affiliated with any government agency.

- **URL**: https://apify.com/scrapesage/clinical-trials-scraper.md
- **Developed by:** [Scrape Sage](https://apify.com/scrapesage) (community)
- **Categories:** Lead generation, Agents, Integrations
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 trial scrapeds

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

## ClinicalTrials.gov Scraper — Trials, Site Leads & Sponsor Pipeline

> **Disclaimer:** This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by the U.S. National Library of Medicine (NIH) or any government body. All trademarks mentioned are the property of their respective owners. "ClinicalTrials.gov" is referenced only to describe the public data source this Actor collects from.

Extract **complete clinical-trial data from ClinicalTrials.gov** — the world's largest trial registry (500,000+ studies from 220+ countries). Search by **condition, drug, sponsor, phase, status or location** and get the **richest dataset in the category**: full study details, sponsors and collaborators, interventions, eligibility, outcome measures, every research site with **investigator contact name, phone and email**, and ready-made **sponsor pipeline analytics**.

No login, no cookies, no browser, no API key — fast JSON extraction straight from the official ClinicalTrials.gov v2 API, with a built-in **monitor mode** that returns only new or updated trials on each run.

### Why this ClinicalTrials.gov scraper?

Most clinical-trial scrapers return a thin row — title, status, a couple of IDs — and stop. This actor flattens **every protocol module** into one dense record, turns each trial into **contactable research-site leads**, and rolls trials up into **per-sponsor pipeline intelligence**.

| Data | Typical scrapers | This actor |
|---|---|---|
| Title, status, phase, study type | ✅ | ✅ |
| Lead sponsor + collaborators + sponsor class | partial | ✅ |
| Interventions (drug/device) + arms | ❌ | ✅ |
| Primary & secondary outcome measures | ❌ | ✅ |
| Full eligibility criteria, sex, age, healthy-volunteer flag | partial | ✅ |
| Every research site: facility, city, geo (lat/lng) | partial | ✅ |
| **Site contact name, role, phone & email** | ❌ | ✅ |
| **Principal investigator / overall official** | ❌ | ✅ |
| **Lead score per site (0–100)** | ❌ | ✅ |
| MeSH-mapped conditions & interventions | ❌ | ✅ |
| Posted **results** (outcomes, adverse-event totals) | ❌ | ✅ opt-in |
| **Sponsor pipeline analytics** (counts by phase/status, top drugs/conditions) | ❌ | ✅ |
| Monitor mode — only new/updated trials | ❌ | ✅ |

### Use cases

- **Patient recruitment & site outreach** — find trials that are **recruiting now** in a condition and country, then export every site with its contact name, **phone and email** and a lead score. The fastest way to build a research-site / investigator contact list.
- **Pharma & biotech competitive intelligence** — track a competitor's pipeline with the **Sponsor pipeline** output: how many trials they run, by phase and status, in which conditions, with which drugs, and what changed since last week.
- **CRO & clinical-vendor lead generation** — sponsors and sites running active trials are in-market buyers for CRO, imaging, lab, eCOA, and recruitment services. Filter by `Industry` lead sponsor and recruiting status.
- **Investor & market research** — monitor drug-development programs, enrollment sizes, phase transitions and completion dates across an entire indication.
- **Trial-matching & patient apps** — feed structured, geo-coded trial and eligibility data into trial-finder tools.
- **Regulatory & medical-affairs monitoring** — watch a condition or sponsor for newly posted or updated studies and results.

### How to use

1. [Sign up for Apify](https://console.apify.com/sign-up) — the free plan is enough to try this actor.
2. Open the **ClinicalTrials.gov Scraper**, enter a **condition** (and optionally a drug, sponsor, phase, status or country), and pick an **Output type**.
3. Click **Start** and watch results stream into the dataset table.
4. **Export** as JSON, CSV, Excel, XML or RSS — or pull results programmatically via the [Apify API](https://docs.apify.com/api/v2).

### Input

```json
{
    "outputType": "siteLeads",
    "condition": "breast cancer",
    "intervention": "pembrolizumab",
    "status": ["RECRUITING", "NOT_YET_RECRUITING"],
    "phases": ["PHASE2", "PHASE3"],
    "locationCountry": "United States",
    "funderTypes": ["INDUSTRY"],
    "maxResults": 500
}
```

- **outputType** — `trials` (rich study records, default), `siteLeads` (one contactable research-site lead per site), or `sponsors` (per-lead-sponsor pipeline analytics).
- **condition / intervention / otherTerms / sponsor / titleSearch** — search fields (condition/disease, drug or device, free-text keywords, sponsor or collaborator, title).
- **nctIds** — scrape exact studies by NCT number; full detail including the results section is fetched for each.
- **searchUrls** — paste clinicaltrials.gov search or study URLs; filters in the URL (`cond`, `intr`, `aggFilters=status:rec,phase:2`, `country`, …) are converted automatically.
- **status / phases / studyType / funderTypes / resultsAvailability / sex / ages / healthyVolunteersOnly** — filters.
- **locationCountry / locationState / locationCity / locationTerm**, or **geoLatitude + geoLongitude + geoRadius** — location filters.
- **studyStartDateFrom/To**, **lastUpdateDateFrom/To**, **sortBy** — dates & ordering (sort by relevance, most-recently-updated, most-recently-posted, largest enrollment, start date).
- **includeResults** *(default false)* — attach a `resultsSummary` (outcome measures, participant flow, adverse-event totals) for trials that have posted results.
- **includeDetailedDescription / includeEligibilityText** *(default true)* — keep or drop the long free-text fields.
- **monitorMode** *(default false)* + **monitorKey** — remember records across runs and output only new/changed ones.

### Output

One record per trial (`type: "trial"`), per site lead (`type: "siteLead"`), or per sponsor (`type: "sponsor"`).

A **trial** record (abridged):

```json
{
    "type": "trial",
    "nctId": "NCT06970288",
    "url": "https://clinicaltrials.gov/study/NCT06970288",
    "briefTitle": "A Study of Drug X in Patients With Advanced Breast Cancer",
    "overallStatus": "Recruiting",
    "phase": "Phase 2/Phase 3",
    "studyType": "Interventional",
    "leadSponsor": "Acme Therapeutics",
    "leadSponsorClass": "Industry",
    "collaboratorNames": ["University Cancer Center"],
    "conditions": ["Breast Cancer", "HER2-positive Breast Cancer"],
    "interventionNames": ["Drug X", "Trastuzumab"],
    "enrollmentCount": 320,
    "startDate": "2026-01-15",
    "primaryCompletionDate": "2027-12-01",
    "lastUpdatePostDate": "2026-06-17",
    "minimumAge": "18 Years",
    "sex": "All",
    "primaryOutcomes": [{ "measure": "Progression-free survival", "timeFrame": "24 months" }],
    "locationCount": 18,
    "countries": ["United States", "Canada"],
    "primaryContactName": "Jane Doe, RN",
    "primaryContactEmail": "trials@acmetx.com",
    "primaryContactPhone": "+1 617 555 0199",
    "hasResults": false,
    "scrapedAt": "2026-06-17T13:00:00.000Z"
}
```

A **siteLead** record:

```json
{
    "type": "siteLead",
    "nctId": "NCT06970288",
    "briefTitle": "A Study of Drug X in Patients With Advanced Breast Cancer",
    "overallStatus": "Recruiting",
    "phase": "Phase 2/Phase 3",
    "leadSponsor": "Acme Therapeutics",
    "facility": "Memorial Cancer Institute",
    "city": "Boston",
    "state": "Massachusetts",
    "country": "United States",
    "latitude": 42.3601,
    "longitude": -71.0589,
    "contactName": "Jane Doe, RN",
    "contactRole": "Contact",
    "contactPhone": "+1 617 555 0199",
    "contactEmail": "jane.doe@mci.org",
    "principalInvestigator": "Dr. Alan Smith",
    "leadScore": 94,
    "scrapedAt": "2026-06-17T13:00:00.000Z"
}
```

A **sponsor** record carries `sponsorName`, `sponsorClass`, `totalTrials`, `recruitingCount`/`activeCount`/`completedCount`, `byPhase`, `byStatus`, `totalEnrollment`, `topConditions`, `topInterventions`, `countries`, `lastUpdatePostDate` and a `recentTrials` array.

#### What to expect (field coverage)

ClinicalTrials.gov is sponsor-entered data, so some fields are populated only when the sponsor filled them in. Across the registry you can typically expect:

| Field group | Coverage |
|---|---|
| Title, status, sponsor, conditions, study type | ~100% |
| Phase | ~100% of interventional trials (observational trials have no phase) |
| Interventions, eligibility, outcomes | ~90–100% |
| Site list with geo | ~95% of trials with locations |
| **Site / central contact email** | mostly on **recruiting / not-yet-recruiting** trials — completed trials usually drop contacts |
| Posted results | only trials that have submitted results (`hasResults: true`) |

A blank field means the sponsor didn't publish it — never that scraping failed. Nothing is dropped, so you always get the richest record available.

### How much does it cost to scrape ClinicalTrials.gov?

This Actor uses Apify's **pay-per-event** pricing: you are charged only for the results it delivers, with no monthly rental and no start fee. The events it can charge are:

- **Trial scraped** - One clinical trial record: title, status, phase, sponsor, conditions, interventions, eligibility, outcomes, sites and contacts.
- **Site / investigator lead scraped** - One contactable research-site lead: facility, location, contact name/role/phone/email, principal investigator, sponsor, trial context and lead score.
- **Sponsor pipeline record scraped** - One lead-sponsor analytics record: trial counts by phase & status, total enrollment, top conditions/interventions, countries and recent trials.

The current price of each event is shown on the **Pricing** tab of this page. Set a maximum total charge on the run if you want a hard cap on spend, and use the input limits to control how much the Actor fetches.

### Automate & schedule

Run this actor on autopilot and pull results into your own stack:

- **[Apify API](https://docs.apify.com/api/v2)** — start runs, fetch datasets, and manage schedules over REST.
- **[apify-client for JavaScript](https://docs.apify.com/api/client/js/)** and **[apify-client for Python](https://docs.apify.com/api/client/python/)** — official SDKs.
- **[Schedules](https://docs.apify.com/platform/schedules)** — run it daily/weekly to capture newly posted or updated trials in a condition, country, or for a specific sponsor. Combine with **monitor mode** so each run returns only what changed.
- **[Webhooks](https://docs.apify.com/platform/integrations/webhooks)** — trigger downstream actions (CRM import, Slack alert, email sequence) the moment a run finishes.

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'MY_APIFY_TOKEN' });

const run = await client.actor('scrapesage/clinical-trials-scraper').call({
    outputType: 'siteLeads',
    condition: 'breast cancer',
    status: ['RECRUITING'],
    locationCountry: 'United States',
    maxResults: 500,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${items.length} research-site leads`);
```

### Integrate with any app

Connect the dataset to 5,000+ apps — no code required:

- **[Make](https://docs.apify.com/platform/integrations/make)** — multi-step automation scenarios.
- **[Zapier](https://docs.apify.com/platform/integrations/zapier)** — push new site leads straight into your CRM.
- **[Slack](https://docs.apify.com/platform/integrations/slack)** — get notified when a monitored search finds new trials.
- **[Google Drive / Sheets](https://docs.apify.com/platform/integrations/drive)** — auto-export every run to a spreadsheet.
- **[Airbyte](https://docs.apify.com/platform/integrations/airbyte)** — pipe results into your data warehouse.
- **[GitHub](https://docs.apify.com/platform/integrations/github)** — trigger runs from commits or releases.

### Use with AI assistants (MCP)

The output is clean, LLM-ready JSON. Call this actor from Claude, ChatGPT, or any agent framework through the **[Apify MCP server](https://docs.apify.com/platform/integrations/mcp)** — ask your assistant to "find recruiting Phase 3 oncology trials in California and list the site contacts" and let it run this scraper for you.

### Agent-ready: autonomous payments (x402 & Skyfire)

This actor is **agent-ready** — AI agents can discover it, run it, and **pay for it autonomously**, with no Apify account and no human in the loop. It uses [pay-per-event](https://docs.apify.com/platform/actors/publishing/monetize/pay-per-event) pricing and [limited permissions](https://docs.apify.com/platform/actors/development/permissions), so it qualifies for Apify's agentic-payment standards:

- **[x402](https://docs.apify.com/platform/integrations/x402)** — an open, HTTP-native payment protocol. Agents pay per run in USDC on the Base network directly through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp) — no account, no API key.
- **[Skyfire](https://docs.apify.com/platform/integrations/skyfire)** — agent-to-service payments for fully autonomous AI-agent workflows.

Building an AI agent, MCP tool, or autonomous data pipeline? This scraper is ready to plug in and pay as it goes.

### More scrapers from scrapesage

Build a complete **healthcare & life-sciences data stack**:

- **[CMS Open Payments Scraper](https://apify.com/scrapesage/open-payments-scraper)** — pharma & device payments to physicians, plus doctor leads.
- **[Healthgrades Scraper](https://apify.com/scrapesage/healthgrades-scraper)** — doctors, specialties, reviews and provider leads.
- **[WebMD Scraper](https://apify.com/scrapesage/webmd-scraper)** — physician directory, reviews and provider leads.
- **[TherapyDen Scraper](https://apify.com/scrapesage/therapyden-scraper)** — therapists and mental-health provider leads.
- **[Caring.com Senior Living Scraper](https://apify.com/scrapesage/caring-senior-living-scraper)** — assisted-living facilities and leads.
- **[US Federal Grants Scraper](https://apify.com/scrapesage/us-federal-grants-scraper)** — Grants.gov, NIH & NSF research funding.
- **[SEC EDGAR Scraper](https://apify.com/scrapesage/sec-edgar-scraper)** — biotech & pharma filings and financials.
- **[Google Patents Scraper](https://apify.com/scrapesage/google-patents-scraper)** — drug & device patents, citations and assignees.
- **[Website Contact Scraper](https://apify.com/scrapesage/website-contact-scraper)** — enrich any sponsor or site with emails, phones and socials.

### Tips

- **Recruiting only**: set `status` to `RECRUITING` (and `NOT_YET_RECRUITING`) for the freshest, most contactable site leads — completed trials usually have their contacts removed.
- **Pipeline intelligence**: use `outputType: "sponsors"` with a `condition` or `sponsor` query and raise `maxTrialsToScan` to aggregate a fuller picture.
- **Incremental monitoring**: turn on `monitorMode`, sort by `lastUpdate`, and schedule the run — you'll only get trials that are new or changed since last time.
- **Big indications**: filter by `phases`, `locationCountry` or a `lastUpdateDateFrom` window to keep result sets focused.
- **Proxies**: the default Apify datacenter proxy is plenty — the API is clean and keyless.

### FAQ

**Where does the data come from?** The official [ClinicalTrials.gov API v2](https://clinicaltrials.gov/data-api/api) — the U.S. National Library of Medicine's public trial registry. No API key or login is required.

**Can I get investigator emails and phone numbers?** Yes — for trials that publish them (most **recruiting** trials do), each site's contact name, role, phone and email are included, along with the principal investigator. Completed trials usually have contacts removed by the sponsor.

**How do I scrape trials for a specific condition and country?** Put the disease in `condition` and the country in `locationCountry` (e.g. `United States`). Add `status: ["RECRUITING"]` for active trials only.

**Can I export to Google Sheets, CSV or Excel?** Yes — one click in the dataset view, or automatically on every run via the [Google Drive integration](https://docs.apify.com/platform/integrations/drive).

**How do I monitor for new trials?** Turn on `monitorMode`, create a [Schedule](https://docs.apify.com/platform/schedules), and optionally add a [webhook](https://docs.apify.com/platform/integrations/webhooks). Each run outputs only new or updated studies. Monitor mode uses its own storage and does not interfere with the schedule.

**A field is empty — why?** Some sponsors don't publish a detailed description, outcomes, or site contacts. Fields are blank only when the data doesn't exist in the registry, not because the scraper skipped them.

**Is scraping ClinicalTrials.gov legal?** This actor reads publicly available U.S. government data through the official public API. You are responsible for using the data in compliance with applicable laws (e.g. GDPR/CCPA where personal data such as investigator contacts is involved) and the ClinicalTrials.gov terms.

### Data & lawful use

The source is an official public register, published so that anyone can consult it. Records can name individuals (investigators and study contacts), so the output may contain personal data even though it is public. If you are in the EU or UK you are the data controller for what you do with it: have a lawful basis, honour access and deletion requests, and respect the register's own reuse conditions, which can restrict marketing or commercial use.

Under [Apify's Standard Actor Contract](https://docs.apify.com/legal/standard-actor-contract), which governs your use of this Actor, you are the controller of any personal data in your input and output and scrapesage acts only as your processor: that data is processed solely to run your job, written only to your own Apify storage, never used for any other purpose and never shared onward. If you need help with a data-subject request that involves this Actor's output, open an issue on the Issues tab.

### Disclaimer

**This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by the U.S. National Library of Medicine (NIH) or any government body. All trademarks mentioned are the property of their respective owners.**

"ClinicalTrials.gov" is referenced only in a descriptive, nominative sense - to identify the public data source this Actor collects from. This Actor is not an official product or service of the U.S. National Library of Medicine (NIH) and is not authorised or certified by it. It collects only publicly available records; you are responsible for ensuring your use of that data complies with applicable laws, regulations and the source's own terms of use or reuse conditions.

### Need help?

Open an issue on the actor's **Issues** tab, or visit the [Apify help center](https://help.apify.com/). Feature requests are welcome — this actor is actively maintained.

# Actor input Schema

## `outputType` (type: `string`):

What to output. `Trials` = one rich record per study (the default). `Site & investigator leads` = one contactable lead per research site/contact (name, phone, email, facility, geo + trial context + lead score). `Sponsor pipeline` = one analytics record per lead sponsor (trial counts by phase/status, top conditions/interventions, recent trials).

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

Condition or disease, e.g. `breast cancer`, `type 2 diabetes`, `alzheimer`. Maps to the ClinicalTrials.gov Condition field.

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

Drug, biologic, device or procedure name, e.g. `pembrolizumab`, `semaglutide`, `CAR-T`.

## `otherTerms` (type: `string`):

Free-text keywords searched across the whole record (titles, summary, etc.), e.g. `biomarker`, `pediatric`.

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

Sponsor or collaborator organization, e.g. `Pfizer`, `Mayo Clinic`, `National Cancer Institute`.

## `titleSearch` (type: `string`):

Search only the study title / acronym.

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

Scrape these exact studies by their NCT number (e.g. `NCT04368728`). Full detail including the results section is fetched for each.

## `searchUrls` (type: `array`):

Paste clinicaltrials.gov search URLs (e.g. `https://clinicaltrials.gov/search?cond=melanoma&aggFilters=status:rec,phase:2`) or study URLs (`/study/NCT…`). Filters in the URL are converted automatically.

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

Limit to these statuses. Leave empty for all.

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

Trial phase(s). Leave empty for all.

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

Interventional, observational or expanded access.

## `funderTypes` (type: `array`):

Limit by who is leading the trial (e.g. Industry for pharma pipeline intelligence).

## `resultsAvailability` (type: `string`):

Whether posted results must be present.

## `sex` (type: `string`):

Limit to trials enrolling a specific sex.

## `ages` (type: `array`):

Eligible age groups.

## `healthyVolunteersOnly` (type: `boolean`):

Only trials that accept healthy volunteers.

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

Limit to trials with a site in this country, e.g. `United States`, `Canada`, `Germany`.

## `locationState` (type: `string`):

Limit to trials with a site in this state/region, e.g. `California`, `Ontario`.

## `locationCity` (type: `string`):

Limit to trials with a site in this city.

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

Free-text location search (facility name, city, etc.).

## `geoLatitude` (type: `string`):

Latitude for radius search (used with longitude + radius).

## `geoLongitude` (type: `string`):

Longitude for radius search.

## `geoRadius` (type: `string`):

Radius for the geo search, e.g. `50mi` or `100km`.

## `studyStartDateFrom` (type: `string`):

Earliest study start date, `YYYY-MM-DD` (or `YYYY-MM`).

## `studyStartDateTo` (type: `string`):

Latest study start date, `YYYY-MM-DD` (or `YYYY-MM`).

## `lastUpdateDateFrom` (type: `string`):

Only trials whose record was last updated on/after this date, `YYYY-MM-DD`. Great for incremental monitoring.

## `lastUpdateDateTo` (type: `string`):

Only trials whose record was last updated on/before this date, `YYYY-MM-DD`.

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

Order of results. Use 'Most recently updated' with monitor mode for incremental runs.

## `includeResults` (type: `boolean`):

For trials that have posted results, attach a `resultsSummary` (outcome measures, participant flow, adverse-event totals). Adds one extra request per such trial.

## `includeDetailedDescription` (type: `boolean`):

Include the long detailed-description text on each trial record.

## `includeEligibilityText` (type: `boolean`):

Include the full inclusion/exclusion criteria text on each trial record.

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

Maximum output records (trials, site leads, or sponsors depending on output type).

## `maxTrialsToScan` (type: `integer`):

For the Sponsor pipeline output: how many matching trials to scan before aggregating sponsors.

## `deduplicateResults` (type: `boolean`):

Skip duplicate records within a run.

## `monitorMode` (type: `boolean`):

Remember records across runs and output only new or changed ones each time (a trial re-appears when its last-update date changes). Pairs perfectly with Apify Schedules for new-trial alerts. Uses its own named store — does not interfere with scheduling.

## `monitorKey` (type: `string`):

Name this monitor watchlist. Use different keys for different saved searches so their histories stay separate.

## `maxConcurrency` (type: `integer`):

Parallel requests to the API. 5 is a good default.

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

Apify Proxy settings. Datacenter proxy is plenty — the ClinicalTrials.gov API is clean and keyless.

## Actor input object example

```json
{
  "outputType": "trials",
  "condition": "breast cancer",
  "studyType": "",
  "resultsAvailability": "",
  "sex": "",
  "healthyVolunteersOnly": false,
  "geoRadius": "50mi",
  "sortBy": "relevance",
  "includeResults": false,
  "includeDetailedDescription": true,
  "includeEligibilityText": true,
  "maxResults": 200,
  "maxTrialsToScan": 1000,
  "deduplicateResults": true,
  "monitorMode": false,
  "monitorKey": "default",
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped records in the default dataset.

# 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": "breast cancer",
    "maxResults": 200
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesage/clinical-trials-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": "breast cancer",
    "maxResults": 200,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapesage/clinical-trials-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": "breast cancer",
  "maxResults": 200
}' |
apify call scrapesage/clinical-trials-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapesage/clinical-trials-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/1OWGUxzJa6mX6aywF/builds/DKcD1l728rJTfu7fX/openapi.json
