# ClinicalTrials.gov Scraper: Recruiting Trial Sites & Sponsors (`groundplanes/clinicaltrials-recruiting-sites`) Actor

Recruiting clinical trials from the ClinicalTrials.gov API v2, one row per recruiting site: sponsor, phase, condition, intervention, facility and city/state, newest updates first. Filter by condition, sponsor, phase, country, state and site status. Published contacts optional.

- **URL**: https://apify.com/groundplanes/clinicaltrials-recruiting-sites.md
- **Developed by:** [John](https://apify.com/groundplanes) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 trial sites

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

## ClinicalTrials.gov Recruiting Trial Sites & Sponsors (API v2)

Extract recruiting clinical studies from the official **ClinicalTrials.gov REST API v2** (`https://clinicaltrials.gov/api/v2/studies`), including lead sponsor details, clinical phases, conditions, interventions, target enrollment and the participating trial sites. Optionally (off by default) it also returns the **study contacts published on ClinicalTrials.gov** for each study and site.

Supports two output modes:

- **Site-row mode (`flattenSites: true`, default):** one row per matching clinical trial site (`siteFacility`, `siteCity`, `siteState`, `siteCountry`, and site-level contacts when `includeSiteContacts` is on), with study and sponsor metadata repeated on each row.
- **Study-row mode (`flattenSites: false`):** one row per study (`nctId`) with all matching trial locations nested under `sites`.

### Who it's for

- **CROs, patient recruitment vendors, eClinical / CTMS / EDC providers & specialty labs** identifying active Industry-sponsored Phase 2 and Phase 3 studies and their participating clinical trial sites
- **Biopharma business development & medical affairs teams** tracking competing pipelines, sponsor classes (`INDUSTRY`, `NIH`, `FED`, `OTHER`), and investigating facilities by therapeutic area and state
- **Clinical trial site networks \&SMO teams** monitoring newly updated recruiting trials across specific US states or countries

### Input

All filters are optional. Default input pulls up to 200 US trial site rows from `RECRUITING` and `NOT_YET_RECRUITING` Industry-sponsored Phase 2 and Phase 3 clinical trials, most recently updated first. Only sites that are themselves recruiting or not yet recruiting are included, at most 20 sites per trial, and contact fields are off.

```json
{
  "conditionOrDisease": "Non-Small Cell Lung Cancer",
  "interventionOrTreatment": "",
  "sponsorName": "",
  "overallStatuses": ["RECRUITING", "NOT_YET_RECRUITING"],
  "sponsorClass": "INDUSTRY",
  "phases": ["PHASE2", "PHASE3"],
  "updatedSinceDate": "2026-09-01",
  "flattenSites": true,
  "siteCountries": ["United States"],
  "siteStates": ["CA", "TX", "NY"],
  "siteStatuses": ["RECRUITING", "NOT_YET_RECRUITING"],
  "maxSitesPerTrial": 20,
  "includeSiteContacts": false,
  "maxItems": 200
}
```

| Field | Type | Default | Description |
|---|---|---|---|
| `conditionOrDisease` | string | `""` (all) | Condition or disease search (`query.cond`). |
| `interventionOrTreatment` | string | `""` (all) | Drug, biological, device, or procedure query (`query.intr`). |
| `sponsorName` | string | `""` (all) | Lead sponsor or collaborator query (`query.spons`). |
| `overallStatuses` | array | `["RECRUITING", "NOT_YET_RECRUITING"]` | Recruitment statuses (`filter.overallStatus`). |
| `sponsorClass` | string | `"INDUSTRY"` | `INDUSTRY`, `NIH`, `FED`, `OTHER`, or `ALL`. |
| `phases` | array | `["PHASE2", "PHASE3"]` | `EARLY_PHASE1`, `PHASE1`, `PHASE2`, `PHASE3`, `PHASE4`, `NA`. |
| `updatedSinceDate` | string (`YYYY-MM-DD`) | `""` | Minimum `LastUpdatePostDate` (`AREA[LastUpdatePostDate]RANGE[<date>,MAX]`). |
| `flattenSites` | boolean | `true` | Emit one row per matching study site (`true`) or one row per study (`false`). |
| `siteCountries` | array of strings | `["United States"]` | Filter trial locations by country name. |
| `siteStates` | array of strings | `[]` (all) | Filter trial locations by state/province (accepts both 2-letter US codes like `"TX"` and full names like `"Texas"`). |
| `siteStatuses` | array | `["RECRUITING", "NOT_YET_RECRUITING"]` | Keep only sites with these site-level recruitment statuses. Empty list = all sites. |
| `maxSitesPerTrial` | integer | `20` | Maximum sites returned per trial, so one large trial doesn't fill the whole result. `0` = no cap. |
| `includeSiteContacts` | boolean | `false` | Also return central and site contact names, emails and phones as published on ClinicalTrials.gov. Read the compliance section first. |
| `maxItems` | integer | `200` | Maximum number of output rows. |

### Output

| Field | Type | Description |
|---|---|---|
| `nctId` | string | ClinicalTrials.gov NCT identifier |
| `briefTitle` | string | null | Study brief title |
| `overallStatus` | string | null | Recruitment status (`RECRUITING`, `NOT_YET_RECRUITING`, etc.) |
| `phases` | array of strings | Clinical phases (`PHASE2`, `PHASE3`, etc.) |
| `conditions` | array of strings | Conditions or diseases studied |
| `interventions` | array of strings | Intervention names |
| `enrollmentTarget` | integer | null | Target or actual participant enrollment count |
| `startDate` | string | null | Study start date |
| `lastUpdatePostDate` | string | null | Last update posted date |
| `leadSponsorName` | string | null | Lead sponsor organization name |
| `leadSponsorClass` | string | null | Lead sponsor class (`INDUSTRY`, `NIH`, `FED`, `OTHER`) |
| `centralContactName` | string | null | Central published study contact name (as listed on ClinicalTrials.gov). Only with `includeSiteContacts` |
| `centralContactEmail` | string | null | Central published study contact email (as listed on ClinicalTrials.gov). Only with `includeSiteContacts` |
| `centralContactPhone` | string | null | Central published study contact phone (as listed on ClinicalTrials.gov). Only with `includeSiteContacts` |
| `overallOfficial` | string | null | Primary overall study official (`Name (Role) - Affiliation`). **Only filled when `includeSiteContacts` is on**; otherwise `null`. |
| `overallOfficialRole` | string | null | Role of the primary overall official (e.g. `PRINCIPAL_INVESTIGATOR`). Always included. |
| `overallOfficialAffiliation` | string | null | Affiliation of the primary overall official. Always included. |
| `siteFacility` | string | null | Trial site facility name |
| `siteStatus` | string | null | Site-specific recruitment status |
| `siteCity` | string | null | Trial site city |
| `siteState` | string | null | Trial site state or province |
| `siteZip` | string | null | Trial site postal/ZIP code |
| `siteCountry` | string | null | Trial site country |
| `siteContactName` | string | null | Site-level published study contact name (as listed on ClinicalTrials.gov). Only with `includeSiteContacts` |
| `siteContactRole` | string | null | Site-level published study contact role. Only with `includeSiteContacts` |
| `siteContactEmail` | string | null | Site-level published study contact email (as listed on ClinicalTrials.gov). Only with `includeSiteContacts` |
| `siteContactPhone` | string | null | Site-level published study contact phone (as listed on ClinicalTrials.gov). Only with `includeSiteContacts` |
| `sites` | array | null | Array of matching sites when `flattenSites` is `false` (`null` in site-row mode) |
| `studyUrl` | string | Direct URL: `https://clinicaltrials.gov/study/<nctId>` |

#### Sample output row

```json
{
  "nctId": "NCT07221669",
  "briefTitle": "A Study to Learn About Salanersen's (BIIB115) Effects on Movement and Its Safety When Given Before Symptoms Appear in Babies With Genetically Diagnosed Spinal Muscular Atrophy (SMA)",
  "overallStatus": "RECRUITING",
  "phases": ["PHASE3"],
  "conditions": ["Muscular Atrophy, Spinal"],
  "interventions": ["Salanersen"],
  "enrollmentTarget": 30,
  "startDate": "2026-04-28",
  "lastUpdatePostDate": "2026-10-23",
  "leadSponsorName": "Biogen",
  "leadSponsorClass": "INDUSTRY",
  "centralContactName": null,
  "centralContactEmail": null,
  "centralContactPhone": null,
  "overallOfficial": null,
  "overallOfficialRole": "STUDY_DIRECTOR",
  "overallOfficialAffiliation": "Example Biotherapeutics",
  "studyUrl": "https://clinicaltrials.gov/study/NCT07221669",
  "siteFacility": "Ann and Robert H Lurie Childrens Hospital of Chicago",
  "siteStatus": "RECRUITING",
  "siteCity": "Chicago",
  "siteState": "Illinois",
  "siteZip": "60611",
  "siteCountry": "United States",
  "siteContactName": null,
  "siteContactRole": null,
  "siteContactEmail": null,
  "siteContactPhone": null,
  "sites": null
}
```

### How pricing works

Pay per result. You only pay for rows returned.

### Data source and terms

**Source: ClinicalTrials.gov**, a service of the U.S. National Library of Medicine (NLM), National Institutes of Health, via its REST API v2 (`https://clinicaltrials.gov/api/v2/studies`). ClinicalTrials.gov updates daily on federal business days; each row's `lastUpdatePostDate` is the date ClinicalTrials.gov last posted an update for that study. Use of the data is subject to the [ClinicalTrials.gov Terms and Conditions](https://clinicaltrials.gov/about-site/terms-conditions).

**Modified/derived data notice:** this Actor does not change study content, but it reshapes it: it selects a subset of fields, flattens each study into one row per site (repeating study fields), keeps only the first central and site contact, filters sites by country/state/site status, caps sites per trial, and removes contact fields unless `includeSiteContacts` is on. For the authoritative, current record always check `studyUrl`. This Actor is not affiliated with or endorsed by NLM, NIH or ClinicalTrials.gov.

### Compliance: contact data

- **No unsolicited marketing.** ClinicalTrials.gov's terms say email addresses from its database must not be used for marketing or promotional purposes. Contacts are published so patients and referring clinicians can ask about a study.
- **CAN-SPAM and TCPA** apply to any commercial email, call or text you send in the US. Don't autodial or text without the required consent.
- **GDPR / UK GDPR and other privacy laws** apply to contacts at non-US sites (and many named US contacts are personal data). You need a lawful basis to process them.
- Keep `includeSiteContacts` off unless you need contacts for a permitted purpose.

### Limits and FAQ

- **Why are `siteContactName` or `siteContactEmail` sometimes `null`?** Large industry sponsors often publish a centralized trial hotline/email (`centralContactName`, `centralContactEmail`, `centralContactPhone`) while listing only facility names and phone numbers at individual sites, whereas academic and mid-size biotech trials more frequently list individual site coordinator names and emails. With `includeSiteContacts` on, both central and site-level contacts are included on every row.
- **Can I pass 2-letter state codes like `"CA"` in `siteStates`?** Yes. ClinicalTrials.gov stores full state names (`"California"`) on US locations, and this Actor automatically matches both 2-letter US postal codes (`"CA"`) and full state names (`"California"`).

### Changelog

- **v0.1.2** — Contacts are off by default (`includeSiteContacts`). New `siteStatuses` filter (default recruiting / not yet recruiting) and `maxSitesPerTrial` cap (default 20). Added source attribution and a modified-data notice.

- **v0.1.1** — Results are sorted by most recently updated study first.

- **v0.1** — Initial release supporting ClinicalTrials.gov API v2 Essie advanced filters, automatic US state code/name matching, and site/study row modes.

# Actor input Schema

## `conditionOrDisease` (type: `string`):

Optional condition or disease query (e.g. 'Non-Small Cell Lung Cancer', 'Type 2 Diabetes'). Leave empty for all conditions.

## `interventionOrTreatment` (type: `string`):

Optional drug, biological, device, or procedure query (e.g. 'pembrolizumab'). Leave empty for all.

## `sponsorName` (type: `string`):

Optional sponsor organization query (e.g. 'Pfizer', 'AstraZeneca'). Leave empty for all sponsors.

## `overallStatuses` (type: `array`):

Study recruitment statuses to include.

## `sponsorClass` (type: `string`):

Filter by lead sponsor organization class (INDUSTRY, NIH, FED, OTHER, or ALL).

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

Clinical trial phases to include. Leave empty for all phases.

## `updatedSinceDate` (type: `string`):

Optional minimum LastUpdatePostDate in YYYY-MM-DD format. Leave empty for no date filter.

## `flattenSites` (type: `boolean`):

When true, outputs one row per matching study site (location) with study fields repeated. When false, outputs one row per study with a nested 'sites' array.

## `siteCountries` (type: `array`):

Filter trial sites by country name (e.g. \["United States", "Canada"]). Leave empty for all countries.

## `siteStates` (type: `array`):

Optional list of state names or 2-letter US state codes (e.g. \["California", "CA", "Texas", "TX"]). Leave empty for all states.

## `siteStatuses` (type: `array`):

Keep only trial sites with these site-level statuses. Empty = all sites.

## `maxSitesPerTrial` (type: `integer`):

Cap on sites returned per trial so one large trial doesn't fill the result. 0 = no cap.

## `includeSiteContacts` (type: `boolean`):

Also return central and site contacts as published on ClinicalTrials.gov. Its terms forbid using these emails for marketing; CAN-SPAM, TCPA and GDPR (non-US sites) apply. Off by default.

## `maxItems` (type: `integer`):

Maximum number of output rows (site rows when flattenSites is true; study rows when false).

## Actor input object example

```json
{
  "conditionOrDisease": "",
  "interventionOrTreatment": "",
  "sponsorName": "",
  "overallStatuses": [
    "RECRUITING",
    "NOT_YET_RECRUITING"
  ],
  "sponsorClass": "INDUSTRY",
  "phases": [
    "PHASE2",
    "PHASE3"
  ],
  "flattenSites": true,
  "siteCountries": [
    "United States"
  ],
  "siteStates": [],
  "siteStatuses": [
    "RECRUITING",
    "NOT_YET_RECRUITING"
  ],
  "maxSitesPerTrial": 20,
  "includeSiteContacts": false,
  "maxItems": 200
}
```

# 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 = {
    "conditionOrDisease": "",
    "interventionOrTreatment": "",
    "sponsorName": "",
    "overallStatuses": [
        "RECRUITING",
        "NOT_YET_RECRUITING"
    ],
    "sponsorClass": "INDUSTRY",
    "phases": [
        "PHASE2",
        "PHASE3"
    ],
    "flattenSites": true,
    "siteCountries": [
        "United States"
    ],
    "siteStates": [],
    "siteStatuses": [
        "RECRUITING",
        "NOT_YET_RECRUITING"
    ],
    "maxItems": 200
};

// Run the Actor and wait for it to finish
const run = await client.actor("groundplanes/clinicaltrials-recruiting-sites").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 = {
    "conditionOrDisease": "",
    "interventionOrTreatment": "",
    "sponsorName": "",
    "overallStatuses": [
        "RECRUITING",
        "NOT_YET_RECRUITING",
    ],
    "sponsorClass": "INDUSTRY",
    "phases": [
        "PHASE2",
        "PHASE3",
    ],
    "flattenSites": True,
    "siteCountries": ["United States"],
    "siteStates": [],
    "siteStatuses": [
        "RECRUITING",
        "NOT_YET_RECRUITING",
    ],
    "maxItems": 200,
}

# Run the Actor and wait for it to finish
run = client.actor("groundplanes/clinicaltrials-recruiting-sites").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 '{
  "conditionOrDisease": "",
  "interventionOrTreatment": "",
  "sponsorName": "",
  "overallStatuses": [
    "RECRUITING",
    "NOT_YET_RECRUITING"
  ],
  "sponsorClass": "INDUSTRY",
  "phases": [
    "PHASE2",
    "PHASE3"
  ],
  "flattenSites": true,
  "siteCountries": [
    "United States"
  ],
  "siteStates": [],
  "siteStatuses": [
    "RECRUITING",
    "NOT_YET_RECRUITING"
  ],
  "maxItems": 200
}' |
apify call groundplanes/clinicaltrials-recruiting-sites --silent --output-dataset

```

## MCP server setup

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

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/P7WIhk05N91mkqXOu/builds/UeWbO1Y6ualg2cmeS/openapi.json
