# ClinicalTrials Scraper · Trials, Sponsors, Phases & Outcomes (`reapx/clinicaltrials-scraper`) Actor

Clinical Trials Scraper (ClinicalTrials.gov Scraper) for clinical trials, studies, medical research, sponsors, phases, and outcomes. Scrape ClinicalTrials.gov by condition, intervention, sponsor, phase, status, or country. Returns structured NCT trial datasets. No API key required.

- **URL**: https://apify.com/reapx/clinicaltrials-scraper.md
- **Developed by:** [Tarek Etman](https://apify.com/reapx) (community)
- **Categories:** Business, Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 trial returneds

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/platform/actors/running/actors-in-store#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

![reapX — public sources in, addressable records out](https://reapx.dev/reapx.gif)

## Clinical Trials Scraper (ClinicalTrials.gov Scraper) · Studies, Sponsors & Outcomes

**Clinical Trials Scraper** and **ClinicalTrials.gov Scraper** that pulls clinical trial studies straight from the ClinicalTrials.gov registry and returns one clean row per trial: the NCT ID, sponsor, phase, recruitment status, planned enrolment, eligibility, primary outcomes, site countries and every relevant date. Search by condition, intervention, sponsor, location or raw registry expression. No API key, no login, no browser.

> Maintained by **reapX**. Every row cites the Apify run that produced it — nothing is
> inferred, modelled or filled in, and a field absent from the source is absent from the row.
> The extracted archive for this source is browsable at
> [reapx.dev/data/clinicaltrials-scraper/](https://reapx.dev/data/clinicaltrials-scraper/) and mirrored as an open dataset on
> [Hugging Face](https://huggingface.co/datasets/reapxdev/clinicaltrials-scraper) and
> [Kaggle](https://www.kaggle.com/datasets/reapxdev/clinicaltrials-scraper). Questions: reapxdev@proton.me

### How to scrape ClinicalTrials.gov clinical trials

1. Type a **condition** such as `pancreatic cancer`, or an **intervention** such as `pembrolizumab`, or a **sponsor** such as `Pfizer`. Combine as many as you like - they narrow each other exactly as the registry's own search does.
2. Optionally restrict **recruitment status**, **phase**, **study type**, **site country**, **minimum enrolment** or **last-updated date**.
3. Set **maximum trials to return**. That is your cost ceiling.
4. Press **Start**. Leaving every field empty returns recruiting lung cancer trials, so the actor always has a working default run.

### Clinical Trials Scraper data output

| Column | What it is |
| --- | --- |
| `nctId` | ClinicalTrials.gov registry ID - the stable join key for every row |
| `studyTitle`, `officialTitle`, `studyAcronym` | Public title, full scientific title, sponsor's acronym |
| `overallStatus` | Recruiting, completed, terminated, withdrawn and the rest |
| `studyType`, `phases`, `primaryPurpose` | Interventional or observational, phase list, what the trial is for |
| `studyAllocation`, `studyMasking` | Randomised or not, and the blinding applied |
| `plannedEnrollment` | Participant count the sponsor registered |
| `sponsorName`, `sponsorClass`, `sponsorOrganization`, `sponsorCollaborators` | Who runs it, in which sector, with whom |
| `studyConditions`, `studyInterventions`, `studyInterventionTypes` | Diseases addressed and treatments tested |
| `primaryOutcomes` | What the trial primarily measures |
| `patientSex`, `patientAgeMin`, `patientAgeMax`, `patientAgeGroups`, `volunteersAccepted` | Full eligibility profile |
| `startDate`, `primaryCompletionDate`, `studyCompletionDate`, `postedDate`, `updatedDate` | Every date, normalised to `YYYY-MM-DD` |
| `studyLocationCount`, `studyCountries` | How many sites, and which countries they are in |
| `resultsPosted`, `studyUrl`, `summary` | Whether results exist, the registry link, the plain-language summary |

Five named views ship with the dataset: **Trials**, **Sponsors and funding**, **Design and outcomes**, **Eligibility and sites**, and **Timeline**. Export any of them to JSON, CSV, Excel or XML, or read them from the API.

### Search clinical trials by sponsor

Put a company or institute in the **sponsor** field and you get that organisation's whole registered pipeline - every phase, every status, with enrolment and completion dates attached. Combine it with **phase** to isolate late-stage assets, or with **recruitment status** to see only what is actively enrolling. `sponsorClass` separates industry from NIH, federal and academic sponsors in one column.

### Find recruiting trials near a location

Set **location** to a country, state or city and the registry restricts to trials with sites there. `studyCountries` on every row lists the distinct countries that trial actually runs in, so a multinational study is visible as such rather than being reduced to one address. Add **only trials with a site in** to keep results to a specific country after the fact.

### Track trials by phase and status

**Phase** and **recruitment status** are registry-side filters, applied before anything is fetched, so narrowing them costs nothing and speeds the run up. `updatedAfter` turns the actor into a change feed: run it on a schedule with a rolling date and you get only records the registry has touched since your last run.

### Advanced registry expressions

Anything the fields do not cover goes in **advanced registry expression** as a raw ClinicalTrials.gov `AREA` expression - for example `AREA[StartDate]RANGE[2025-01-01,MAX]`, or `AREA[LeadSponsorClass]INDUSTRY`. It is merged into the same query as the structured fields.

### Limits you should know about

- The registry serves up to 1,000 studies per request; this actor pages through them for you with `nextPageToken`.
- Country, minimum-enrolment, results-posted and last-updated filters are applied after fetching, so the actor scans deeper than your row target to fill it. Scanned-but-dropped trials are never charged.
- Requests are plain HTTP, held to a polite rate, with exponential backoff on 429 and 5xx.
- ClinicalTrials.gov is a public US government registry. Everything returned is public record.

### Input configuration

Every field is optional. The prefilled values below are what runs if you press Start without changing anything.

#### What to search for

Fill in any combination. They are combined with AND, exactly as the registry's own search does. Leave all of them empty and the run falls back to recruiting lung cancer trials.

| Field | Type | Accepts | What it does |
| --- | --- | --- | --- |
| `condition` | string | free text | The disease, condition or health problem the trial studies. Example: pancreatic cancer. Prefilled with `"lung cancer"`. |
| `intervention` | string | free text | Drug, device, procedure or behavioural intervention under study. Example: pembrolizumab. Prefilled with `""`. |
| `sponsor` | string | free text | Organisation running or funding the trial. Example: Pfizer, or National Cancer Institute. Prefilled with `""`. |
| `location` | string | free text | Country, state or city where the trial has sites. Example: Germany. Prefilled with `""`. |
| `searchTerms` | string | free text | Any other words to match across the whole study record. Example: CAR-T relapsed. Prefilled with `""`. |
| `advancedFilter` | string | free text | Raw ClinicalTrials.gov AREA expression for anything the fields above do not cover. Example: AREA\[StartDate]RANGE\[2025-01-01,MAX]. Prefilled with `""`. |

#### Narrow the trials

Registry-side filters are applied before anything is fetched, so they cost you nothing.

| Field | Type | Accepts | What it does |
| --- | --- | --- | --- |
| `statuses` | list | one value per line | Keep only trials in these recruitment states. Leave empty for every status. Example: RECRUITING. Prefilled with `[]`. |
| `phases` | list | one value per line | Keep only these phases. Leave empty for every phase. Example: PHASE3. Prefilled with `[]`. |
| `studyType` | string | \`\`, `INTERVENTIONAL`, `OBSERVATIONAL`, `EXPANDED_ACCESS` | Interventional trials test a treatment; observational ones only watch. Example: INTERVENTIONAL. Prefilled with `""`. |
| `countries` | list | one value per line | Country names as the registry writes them. A trial is kept if any of its sites is in one of them. Example: United States, Germany. Prefilled with `[]`. |
| `minEnrollment` | integer | 0 to 10000000 | Drop small trials below this participant count. Example: 500 keeps only large studies. Prefilled with `0`. |
| `onlyWithResults` | true/false | checkbox | Keep only trials that have published results on the registry. Example: true for outcome research. Prefilled with `false`. |
| `updatedAfter` | string | `YYYY-MM-DD` | Drop records whose last registry update predates this date. Example: 2026-01-01. Prefilled with `""`. |

#### How much to return

You pay per trial returned. Filtered-out trials are never charged.

| Field | Type | Accepts | What it does |
| --- | --- | --- | --- |
| `sortBy` | string | one of 7: `LastUpdatePostDate:desc`, `LastUpdatePostDate:asc`, `StudyFirstPostDate:desc`, `StudyFirstPostDate:asc`, ... | Which trials come back first. Example: LastUpdatePostDate:desc for the freshest records. Prefilled with `"LastUpdatePostDate:desc"`. |
| `maxTrials` | integer | 1 to 20000 | Hard stop for the run, and your cost ceiling. Example: 100. Prefilled with `100`. |

#### Connection

| Field | Type | Accepts | What it does |
| --- | --- | --- | --- |
| `proxyConfiguration` | object | free text | Routes registry reads through Apify Proxy. Leave it on unless you have a reason not to. Example: the default. Prefilled with `{"useApifyProxy": true}`. |

### Pricing

Pay per event. The primary event is **Trial returned** (`trial`), charged at **$0.0015 per event** on the free plan, falling to $0.0005 on the highest tier.

Charged once for each clinical trial written to the dataset. Registry searches that match nothing, blocked runs and trials removed by your filters are never charged.

Other charged events: `apify-actor-start` (Actor Start).

Minimum charge cap per run: $0.0015.

Tiered discounts apply automatically on every paid Apify plan. Platform usage is absorbed by the Actor, so the per-event price is the whole price.

### Usage examples

#### The prefilled run, which is what Start does with nothing changed

```json
{
  "condition": "lung cancer",
  "minEnrollment": 0,
  "onlyWithResults": false,
  "sortBy": "LastUpdatePostDate:desc",
  "maxTrials": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

#### A larger run, with the record cap as the cost cap

```json
{
  "condition": "lung cancer",
  "minEnrollment": 0,
  "onlyWithResults": false,
  "sortBy": "LastUpdatePostDate:desc",
  "maxTrials": 5000,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

### Output example

One row, exactly as the actor wrote it to the dataset:

```json
{
  "nctId": "NCT07739511",
  "studyTitle": "Paclitaxel Oral Solution in HER2-Positive Breast Cancer Neoadjuvant Therapy: A Dose-Finding Study",
  "officialTitle": "A Dose-Finding Study of Paclitaxel Oral Solution in Neoadjuvant Therapy for Patients With HER2-Positive Breast Cancer",
  "studyAcronym": "GBCF002",
  "overallStatus": "NOT_YET_RECRUITING",
  "studyType": "INTERVENTIONAL",
  "phases": [
    "PHASE1",
    "PHASE2"
  ],
  "primaryPurpose": "TREATMENT",
  "studyAllocation": "NON_RANDOMIZED",
  "studyMasking": "NONE",
  "plannedEnrollment": 30,
  "sponsorName": "Liu Shu",
  "sponsorClass": "OTHER",
  "sponsorOrganization": "The Affiliated Hospital Of Guizhou Medical University",
  "sponsorCollaborators": [],
  "studyConditions": [
    "HER2 + Breast Cancer"
  ],
  "studyInterventions": [
    "Paclitaxel oral solution plus Trastuzumab and Pertuzumab"
  ],
  "studyInterventionTypes": [
    "COMBINATION_PRODUCT"
  ]
}
```

That row carries 36 fields in total; 18 are shown.

#### Fields on every row

| Field | Type | What it is |
| --- | --- | --- |
| `nctId` | string | ClinicalTrials.gov registry identifier. Unique and stable across runs - use it as the join key. |
| `studyTitle` | string | Short public title of the trial. |
| `officialTitle` | string | Full scientific title as registered. |
| `studyAcronym` | string | Short trial acronym, when the sponsor registered one. |
| `overallStatus` | string | Current recruitment state of the trial. |
| `studyType` | string | Whether the study tests an intervention or only observes. |
| `phases` | list | Trial phases. Observational studies carry NA. |
| `primaryPurpose` | string | What the trial is trying to do. |
| `studyAllocation` | string | How participants are assigned to arms. |
| `studyMasking` | string | Blinding applied in the trial design. |
| `plannedEnrollment` | integer | Participant count the sponsor registered, estimated or actual. |
| `sponsorName` | string | Organisation responsible for the trial. |
| `sponsorClass` | string | Sector the lead sponsor belongs to. |
| `sponsorOrganization` | string | Organisation that submitted the record to the registry. |
| `sponsorCollaborators` | list | Other organisations named on the trial. |
| `studyConditions` | list | Diseases or conditions the trial addresses. |
| `studyInterventions` | list | Names of the drugs, devices or procedures under study. |
| `studyInterventionTypes` | list | Kinds of intervention involved. |
| `primaryOutcomes` | list | What the trial primarily measures. |
| `patientSex` | string | Which participants the trial accepts. |
| `patientAgeMin` | string | Lowest eligible age, as registered. |
| `patientAgeMax` | string | Highest eligible age, when the sponsor set one. |
| `patientAgeGroups` | list | Standard age bands the trial recruits from. |
| `volunteersAccepted` | true/false | Whether the trial enrols healthy volunteers. |
| `startDate` | string | Study start date, normalised to YYYY-MM-DD. |
| `primaryCompletionDate` | string | Date the primary outcome measure is or was due. |
| `studyCompletionDate` | string | Date the whole study is or was due to finish. |
| `postedDate` | string | Date the record first appeared on the registry. |
| `updatedDate` | string | Date of the most recent registry update. |
| `studyLocationCount` | integer | Number of registered trial sites. |
| `studyCountries` | list | Distinct countries the trial has sites in. |
| `resultsPosted` | true/false | Whether the sponsor has published results on the registry. |
| `studyUrl` | string | Public ClinicalTrials.gov page for the trial. |
| `summary` | string | Plain-language description of the trial as registered. |
| `scrapedAt` | string | When this run read the registry. |
| `sourceQuery` | string | The registry search this row came from, echoed for provenance. |

5 named dataset views ship with it: **Trials**, **Sponsors and funding**, **Design and outcomes**, **Eligibility and sites**, **Timeline**. They drive the Output tab in Console and the Output block on the Actor's `.md` page.

### FAQ

#### Can I scrape ClinicalTrials.gov without an API key?

Yes. The registry publishes an open REST API (v2) with no authentication, and this actor uses it directly.

#### What is the NCT number and why is it on every row?

It is the registry's permanent identifier for a study, like `NCT07586202`. It never changes, so it is the right key for joining this dataset to your own records or to a later re-run.

#### Can I get only Phase 3 recruiting trials?

Set **phase** to `PHASE3` and **recruitment status** to `RECRUITING`. Both are applied by the registry before any data is fetched.

#### How do I find every trial a company is running?

Put the company in **sponsor** and leave the condition blank. Add a phase or status filter to narrow it. `sponsorCollaborators` also surfaces trials where the company is a partner rather than the lead.

#### Does this return trial results?

It returns whether results have been posted (`resultsPosted`) and the primary outcome measures the trial is designed to report. Full result tables are on the registry page linked from `studyUrl`.

#### How fresh is the data?

Live. Every run queries the registry at that moment, and `updatedDate` tells you when each record was last changed at source.

#### Can I run this on a schedule?

Yes. Save any configuration as an Apify task and schedule it. With `updatedAfter` set to a rolling date it becomes an incremental feed rather than a full re-pull.

***

Unofficial - not affiliated with ClinicalTrials.gov. Collects public data only. reapx.
Contact reapxdev@proton.me.

### The full published archive

- **[clinicaltrials scraper archive](https://reapx.dev/data/clinicaltrials-scraper/)** — every entity this Actor has observed
- **[All reapx datasets](https://reapx.dev/data/)** — 20 sources, tens of thousands of pages
- **[llms.txt](https://reapx.dev/llms.txt)** · **[feed.json](https://reapx.dev/feed.json)** ·
  **[feed.xml](https://reapx.dev/feed.xml)** — the machine-readable index, for agents

Each archive page carries Dataset JSON-LD, a canonical URL and the identifiers used, so an agent
can resolve an entity without running anything. Nothing on those pages is estimated or modelled.

### 🧪 Example input

A real, runnable configuration — this is an actual input this Actor has run with.

```json
{
  "maxTrials": 200,
  "sortBy": "StudyFirstPostDate:desc",
  "advancedFilter": "AREA[StudyFirstPostDate]RANGE[2026-01-01,MAX]",
  "searchTerms": "study"
}
```

### 📄 Sample output

One real row from a real run of this Actor, unedited.

```json
{
  "nctId": "NCT07739511",
  "studyTitle": "Paclitaxel Oral Solution in HER2-Positive Breast Cancer Neoadjuvant Therapy: A Dose-Finding Study",
  "officialTitle": "A Dose-Finding Study of Paclitaxel Oral Solution in Neoadjuvant Therapy for Patients With HER2-Positive Breast Cancer",
  "studyAcronym": "GBCF002",
  "overallStatus": "NOT_YET_RECRUITING",
  "studyType": "INTERVENTIONAL",
  "phases": [
    "PHASE1",
    "PHASE2"
  ],
  "primaryPurpose": "TREATMENT",
  "studyAllocation": "NON_RANDOMIZED",
  "studyMasking": "NONE",
  "plannedEnrollment": 30,
  "sponsorName": "Liu Shu",
  "sponsorClass": "OTHER",
  "sponsorOrganization": "The Affiliated Hospital Of Guizhou Medical University",
  "sponsorCollaborators": [],
  "studyConditions": [
    "HER2 + Breast Cancer"
  ],
  "studyInterventions": [
    "Paclitaxel oral solution plus Trastuzumab and Pertuzumab"
  ],
  "studyInterventionTypes": [
    "COMBINATION_PRODUCT"
  ],
  "primaryOutcomes": [
    "Maximum Tolerated Dose(MTD)"
  ],
  "patientSex": "FEMALE",
  "patientAgeMin": "18 Years",
  "patientAgeMax": "70 Years",
  "patientAgeGroups": [
    "ADULT",
    "OLDER_ADULT"
  ],
  "volunteersAccepted": false,
  "startDate": "2026-07-31",
  "primaryCompletionDate": "2027-07-31",
  "studyCompletionDate": "2029-07-30",
  "postedDate": "2026-07-31",
  "updatedDate": "2026-07-31",
  "studyLocationCount": 0,
  "studyCountries": [],
  "resultsPosted": false,
  "studyUrl": "https://clinicaltrials.gov/study/NCT07739511",
  "summary": "This is a multicenter, open-label, dose-finding trial using a backfill Bayesian optimal interval (BF-BOIN) design to determine the maximum tolerated dose (MTD) and/or recommended phase 2 dose (RP2D) for paclitaxel oral solution combined with anti-HER2 treatment. Eligible HER2-positive breast cancer patients receive 6 cycles of neoadjuvant THP regimen(paclitaxel oral solution + trastuzumab+pertuzumab) and are enrolled in three cohorts at oral paclitaxel dose levels 1-3 (125, 150, 175 mg/m²).",
  "scrapedAt": "2026-08-03T01:42:21Z",
  "sourceQuery": "terms=study; advanced=AREA[StudyFirstPostDate]RANGE[2026-01-01,MAX]"
}
```

### How it works

1. You set the filters below, or none at all.
2. The Actor calls the source's own public endpoint and pages through the results.
3. Every row is pushed to the dataset **as it is built**, not buffered to the end — so a
   run that hits its time limit still returns everything it collected up to that point.
4. You are charged per row returned, so the maximum-results field is also your cost cap.

### 💬 Your feedback

Found a bug, or need a field this does not return yet? Open an issue on the Actor's **Issues**
tab, or write to **reapxdev@proton.me**. Bugs get fixed and reasonable field requests get
added.

# Actor input Schema

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

The disease, condition or health problem the trial studies. Example: pancreatic cancer.<br><br>Leave this field empty to skip this filter.

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

Drug, device, procedure or behavioural intervention under study. Example: pembrolizumab.<br><br>Leave this field empty to skip this filter.

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

Organisation running or funding the trial. Example: Pfizer, or National Cancer Institute.<br><br>Leave this field empty to skip this filter.

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

Country, state or city where the trial has sites. Example: Germany.<br><br>Leave this field empty to skip this filter.

## `searchTerms` (type: `string`):

Any other words to match across the whole study record. Example: CAR-T relapsed.<br><br>Leave this field empty to skip this filter.

## `advancedFilter` (type: `string`):

Raw ClinicalTrials.gov AREA expression for anything the fields above do not cover. Example: AREA\[StartDate]RANGE\[2025-01-01,MAX].<br><br>Leave this field empty to skip this filter.

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

Keep only trials in these recruitment states. Leave empty for every status. Example: RECRUITING.

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

Keep only these phases. Leave empty for every phase. Example: PHASE3.

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

Interventional trials test a treatment; observational ones only watch. Example: INTERVENTIONAL.<br><br>Options: <code></code>, <code>INTERVENTIONAL</code>, <code>OBSERVATIONAL</code>, <code>EXPANDED\_ACCESS</code>.

## `countries` (type: `array`):

Country names as the registry writes them. A trial is kept if any of its sites is in one of them. Example: United States, Germany.<br><br>Leave this field empty to include every option.

## `minEnrollment` (type: `integer`):

Drop small trials below this participant count. Example: 500 keeps only large studies.

## `onlyWithResults` (type: `boolean`):

Keep only trials that have published results on the registry. Example: true for outcome research.

## `updatedAfter` (type: `string`):

Drop records whose last registry update predates this date. Example: 2026-01-01.

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

Which trials come back first. Example: LastUpdatePostDate:desc for the freshest records.<br><br>Options: <code>LastUpdatePostDate:desc</code>, <code>LastUpdatePostDate:asc</code>, <code>StudyFirstPostDate:desc</code>, <code>StudyFirstPostDate:asc</code>, <code>EnrollmentCount:desc</code>, <code>StartDate:desc</code>.

## `maxTrials` (type: `integer`):

Hard stop for the run, and your cost ceiling. Example: 100.<br><br>The higher the number, the longer the run takes and the more you are charged, because you pay per row returned.

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

Routes registry reads through Apify Proxy. Leave it on unless you have a reason not to. Example: the default.

## Actor input object example

```json
{
  "condition": "lung cancer",
  "statuses": [],
  "phases": [],
  "countries": [],
  "sortBy": "LastUpdatePostDate:desc",
  "maxTrials": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Every trial with its status, phase, sponsor and enrolment.

## `sponsors` (type: `string`):

Who runs each trial, in what sector, with which collaborators.

## `design` (type: `string`):

Phase, allocation, masking, interventions and what each trial measures.

## `eligibility` (type: `string`):

Who can enrol, and where the trial actually runs.

## `timeline` (type: `string`):

Registration, start, completion and last-update dates for each trial.

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

Every record this run produced, with all fields and no view applied. Field-level titles, types, descriptions and examples are declared in the dataset schema.

# 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": "lung cancer",
    "intervention": "",
    "sponsor": "",
    "location": "",
    "searchTerms": "",
    "advancedFilter": "",
    "statuses": [],
    "phases": [],
    "studyType": "",
    "countries": [],
    "minEnrollment": 0,
    "onlyWithResults": false,
    "updatedAfter": "",
    "sortBy": "LastUpdatePostDate:desc",
    "maxTrials": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("reapx/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": "lung cancer",
    "intervention": "",
    "sponsor": "",
    "location": "",
    "searchTerms": "",
    "advancedFilter": "",
    "statuses": [],
    "phases": [],
    "studyType": "",
    "countries": [],
    "minEnrollment": 0,
    "onlyWithResults": False,
    "updatedAfter": "",
    "sortBy": "LastUpdatePostDate:desc",
    "maxTrials": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("reapx/clinicaltrials-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": "lung cancer",
  "intervention": "",
  "sponsor": "",
  "location": "",
  "searchTerms": "",
  "advancedFilter": "",
  "statuses": [],
  "phases": [],
  "studyType": "",
  "countries": [],
  "minEnrollment": 0,
  "onlyWithResults": false,
  "updatedAfter": "",
  "sortBy": "LastUpdatePostDate:desc",
  "maxTrials": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call reapx/clinicaltrials-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=reapx/clinicaltrials-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/fs7VJIq92ejwHdgFW/builds/OMwzWyiBePInr2V8d/openapi.json
