# Clinical Trials Scraper: ClinicalTrials.gov Studies (`thoob/clinical-trials-feed`) Actor

Enter filters, get clean, flat clinical trials records from the official ClinicalTrials.gov v2 API. Filter by condition, sponsor, status, phase, and country, with a what-changed-since-last-run mode. Billed only per delivered record.

- **URL**: https://apify.com/thoob/clinical-trials-feed.md
- **Developed by:** [Pono Data](https://apify.com/thoob) (community)
- **Categories:** Developer tools, News
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 trial records

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 Feed

Clean, flat clinical-trial records from the official ClinicalTrials.gov v2 API. Filter by condition, sponsor, status, phase, and country, get one useful row per study, and run a changes-only mode that returns just what is new, status-changed, or updated since your last run.

You pay only for a delivered study record. Filtered-out rows, unchanged rows in changes mode, and malformed records cost nothing.

### What a record is

One flat row per study, pulled from the nested ClinicalTrials.gov record:

- identity and title: `nctId`, `title`, study URL
- status and timeline: `overallStatus`, `startDate`, `primaryCompletionDate`, `completionDate`, `lastUpdatePostDate`
- design: `phase`, `studyType`, `enrollmentCount`
- subject and treatment: `conditions`, `interventions`
- sponsor: `leadSponsor`, `leadSponsorClass` (INDUSTRY, NIH, OTHER), `collaborators`
- reach: `countries` (distinct trial-site countries)
- provenance: `sourceUrl`, `retrievedAt`, `confidence`, `dataSource`, and in changes mode `changeType`

Every value appears verbatim at the study URL in `sourceUrl`. Nothing is guessed.

### Sample output

A real slice, recruiting Phase 3 non-small-cell lung cancer studies with a US site (abbreviated):

| nctId | overallStatus | phase | leadSponsor | sourceUrl |
|---|---|---|---|---|
| NCT07222566 | RECRUITING | PHASE3 | Pfizer | clinicaltrials.gov/study/NCT07222566 |
| NCT06890598 | RECRUITING | PHASE3 | Eli Lilly and Company | clinicaltrials.gov/study/NCT06890598 |
| NCT02468024 | RECRUITING | PHASE3 | UT Southwestern Medical Center | clinicaltrials.gov/study/NCT02468024 |

### Two modes

- **full**: every study matching your filter.
- **changes**: only studies that are new, have a changed overall status, or carry a newer last-update date since this account's last run. The state is tracked per account in a named store, so it is your timeline. The first changes run has no baseline, so it returns everything matching once, then tracks deltas from there.

### Filters

- **conditions**: diseases or conditions, combined into the API condition query.
- **sponsor**: keep only studies whose sponsor matches this name.
- **searchTerm**: an extra free-text term matched across the record.
- **statuses**: recruitment statuses (RECRUITING, ACTIVE_NOT_RECRUITING, COMPLETED, TERMINATED, and the rest).
- **phases**: PHASE1, PHASE2, PHASE3, PHASE4.
- **countries**: keep only studies with a site in these countries.
- **maxRecords**: a cap on how many records a run delivers and bills. 0 means no cap; the platform spend cap is honored regardless.

Condition, sponsor, term, and status are applied by the API; phase and country are applied to the returned record.

### What to expect

- ClinicalTrials.gov holds well over 500,000 studies, updated continuously. A filter narrows that to the slice you care about.
- The raw API is public and free directly from the National Library of Medicine. What this actor sells is the flat, joined record, the phase and country filtering, and the per-account change feed, so you do not have to walk the nested JSON or diff it yourself.
- A condition or sponsor watch is a few dollars; a daily changes feed is pennies a run.

### Source and scope

- Source: the official ClinicalTrials.gov API v2 (`clinicaltrials.gov/api/v2`), a US National Library of Medicine service, public domain, no key, no anti-bot, paged with a declared identifying User-Agent.
- The registry is global; the records are public study disclosures. This actor carries only that public record and stamps `dataSource=ClinicalTrials.gov`.
- This is a data tool, not medical, investment, or regulatory advice. A registry record is a filing, not a finding.
- No PHI: the feed carries public study disclosures only (sponsors, sites, design, status). It collects and stores no patient identifiers or health records. Transport is TLS to the official .gov endpoint.

### See also

More clean, pay-only-for-results data tools from Pono Data:

- [FDA Food Recall & Enforcement Alerts](https://apify.com/thoob/fda-food-recall-feed) - US food recalls and enforcement reports
- [Regulatory Change Monitor](https://apify.com/thoob/regulatory-change-monitor) - federal rulemaking from the Federal Register

Full catalog: https://apify.com/thoob

# Actor input Schema

## `conditions` (type: `array`):

Filter to studies of these conditions or diseases (for example non-small cell lung cancer, Alzheimer disease). Combined into the API condition query. Leave empty to match any condition.

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

Optional. Keep only studies whose sponsor matches this name (for example Pfizer, National Cancer Institute).

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

Optional. An additional free-text term matched across the study record (interventions, keywords, and more).

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

Filter to these recruitment statuses (for example RECRUITING, ACTIVE_NOT_RECRUITING, COMPLETED, TERMINATED). Leave empty for any status.

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

Keep only studies in these phases (for example PHASE1, PHASE2, PHASE3, PHASE4). Filtered on the returned record. Leave empty for any phase.

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

Keep only studies with at least one site in these countries (for example United States, China, Germany). Filtered on the returned record. Leave empty for any country.

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

full returns every study matching your filter. changes returns only studies that are new, have a changed overall status, or have a newer last-update date since this account's last run, tracked per account. The first changes run has no baseline, so it returns everything matching once, then tracks deltas.

## `maxRecords` (type: `integer`):

Safety cap on how many studies this run delivers and bills. The default of 1000 keeps a first run predictable: an uncapped run on the default query delivers about 31,800 studies and bills all of them, which is enough to hit the run charge ceiling and stop mid-delivery. Studies past the cap are not dropped, they are delivered on a later run and never billed twice. Set 0 for no cap once you know the volume you want. The platform spend cap (ACTOR_MAX_TOTAL_CHARGE_USD) is honored regardless.

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

How many studies to request per API page (1 to 1000). Larger pages are fewer requests; the default is a polite middle.

## Actor input object example

```json
{
  "conditions": [],
  "statuses": [],
  "phases": [],
  "countries": [],
  "mode": "full",
  "maxRecords": 1000,
  "pageSize": 100
}
```

# Actor output Schema

## `studies` (type: `string`):

One row per study matching your filter.

# 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 = {
    "conditions": [],
    "statuses": [],
    "phases": [],
    "countries": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("thoob/clinical-trials-feed").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 = {
    "conditions": [],
    "statuses": [],
    "phases": [],
    "countries": [],
}

# Run the Actor and wait for it to finish
run = client.actor("thoob/clinical-trials-feed").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 '{
  "conditions": [],
  "statuses": [],
  "phases": [],
  "countries": []
}' |
apify call thoob/clinical-trials-feed --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,thoob/clinical-trials-feed"
        }
    }
}
```

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/OPcV38a7U6e9b4vgu/builds/Ov3wDI2B4Qgkhy5ZN/openapi.json
