# ClinicalTrials.gov Scraper (`logiover/clinicaltrials-gov-scraper`) Actor

Scrape clinical trials from the official ClinicalTrials.gov API — no login, no API key, no blocking. 585K+ studies with status, phase, sponsor, conditions, interventions, enrollment, eligibility and locations. Filter by condition, sponsor and status. Tens of thousands per run.

- **URL**: https://apify.com/logiover/clinicaltrials-gov-scraper.md
- **Developed by:** [Logiover](https://apify.com/logiover) (community)
- **Categories:** Automation, Developer tools
- **Stats:** 16 total users, 3 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 review extracteds

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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 — Clinical Trial Data from the Official API

Scrape **clinical trials** straight from the **official ClinicalTrials.gov API** — no login, no API key, no blocking. This Apify Actor covers the full ClinicalTrials.gov database of **585,000+ studies worldwide**, returning deep structured data: trial status, phase, sponsor, conditions, interventions, enrollment, eligibility, locations, and key dates. One run can return tens of thousands of trials.

If you need bulk **clinical trial data** for pharma intelligence, patient recruitment, or research, this Actor turns the world's largest trials registry into a clean, exportable dataset (JSON, CSV, or Excel).

### ✨ What this Actor does / Key features

- **Official NIH / ClinicalTrials.gov API source** — reliable, stable, and never gets blocked.
- **No API key or login required** — just set your filters and run.
- **Full database coverage** — 585,000+ studies, fully paginated at 1,000 per page.
- **Deep structured data** — status, study type, phase, lead sponsor, sponsor class, collaborators, conditions, and interventions.
- **Eligibility details** — sex, minimum and maximum age, and healthy-volunteer eligibility.
- **Timeline data** — start date, completion date, primary completion date, first-posted and last-update-posted dates.
- **Location data** — array of trial sites per study, plus a results-available flag.
- **Powerful filters** — by condition/disease, free-text search term, lead sponsor, and trial status.
- **Built for scheduling** — trial statuses update constantly, so run it on a schedule for an always-current feed.

### 🔍 Input

| Field | Type | Description |
|---|---|---|
| `condition` | string | Filter by condition or disease, e.g. `diabetes`, `breast cancer`, `alzheimer`. Leave empty for all. |
| `searchTerm` | string | Free-text search across the whole study record (intervention, sponsor, keyword). Leave empty for all. |
| `sponsor` | string | Filter by lead sponsor, e.g. `pfizer`, `moderna`, `national cancer institute`. Leave empty for all. |
| `overallStatus` | array | Filter by trial status, e.g. `RECRUITING`, `COMPLETED`, `ACTIVE_NOT_RECRUITING`. Leave empty for all. |
| `maxStudies` | integer | Maximum studies to save. `0` = all matching (up to ~585,000 across the whole database). |

### 🚀 Example input

```json
{
  "condition": "breast cancer",
  "searchTerm": "",
  "sponsor": "",
  "overallStatus": ["RECRUITING"],
  "maxStudies": 10000
}
````

### 📦 Output

Each dataset item is one clinical trial study. Output fields:

| Field | Description |
|---|---|
| `nctId` | ClinicalTrials.gov registration number (NCT ID). |
| `briefTitle` | Short study title. |
| `officialTitle` | Full official study title. |
| `acronym` | Study acronym, if any. |
| `organization` | Organization that submitted the record. |
| `overallStatus` | Current trial status (e.g. `RECRUITING`, `COMPLETED`). |
| `studyType` | Study type (e.g. interventional, observational). |
| `phases` | Array of trial phases. |
| `enrollmentCount` | Number of participants enrolled or planned. |
| `leadSponsor` | Lead sponsor of the trial. |
| `sponsorClass` | Sponsor classification (e.g. industry, NIH, other). |
| `collaborators` | Array of collaborating organizations. |
| `conditions` | Array of conditions/diseases studied. |
| `interventions` | Array of interventions tested. |
| `briefSummary` | Short summary of the study. |
| `sex` | Eligible sex. |
| `minimumAge` / `maximumAge` | Age eligibility range. |
| `healthyVolunteers` | Whether healthy volunteers are accepted. |
| `startDate` | Trial start date. |
| `completionDate` | Overall completion date. |
| `primaryCompletionDate` | Primary completion date. |
| `firstPostedDate` | When the study was first posted. |
| `lastUpdatePostedDate` | When the study was last updated. |
| `locations` | Array of trial site locations. |
| `hasResults` | Whether study results have been posted. |
| `url` | Direct link to the study on ClinicalTrials.gov. |
| `scrapedAt` | Timestamp of when the record was scraped. |

### 💡 Use cases

- **Pharma & biotech competitive intelligence** — track competitor trials by phase, sponsor, and condition.
- **CROs & patient recruitment** — find recruiting trials by condition and location at scale.
- **Investors & analysts** — monitor the clinical pipeline across the industry.
- **Researchers & academics** — build datasets from the world's largest trials registry.
- **Journalists & policy teams** — analyze trial trends, sponsor activity, and enrollment data.

### ❓ Frequently Asked Questions

**Is this an official ClinicalTrials.gov API or a scraper?**
It pulls data from the official ClinicalTrials.gov API, so the data is authoritative and stable. There is no affiliation with ClinicalTrials.gov or the NIH.

**Do I need an API key or login?**
No. The Actor handles everything — you only need an Apify account. There is no ClinicalTrials.gov API key to register.

**Is it legal to use this data?**
ClinicalTrials.gov study records are public information published by the US National Library of Medicine. Use the data responsibly and in line with ClinicalTrials.gov terms.

**How much data can I get in one run?**
A single run can return tens of thousands of studies. Set `maxStudies` to `0` to capture everything matching your filters, up to the full ~585,000-study database.

**Can I filter the results?**
Yes — filter by condition/disease, free-text search term, lead sponsor, and trial status, in any combination.

**How fresh is the data?**
It reflects what is currently published on ClinicalTrials.gov, including each study's `lastUpdatePostedDate`. Schedule the Actor to keep a continuously updated dataset.

**What output formats are supported?**
JSON, CSV, Excel (XLSX), HTML, and JSONLines, available through the Apify dataset and API.

### ⏰ Scheduling & integration

Schedule the Actor on Apify to keep an always-fresh clinical trials database. Export results to JSON, CSV, or Excel, call it from the Apify API, or connect it to Google Sheets, Airtable, databases, or Slack with webhooks and no-code tools like Make, n8n, and Zapier.

***

**Keywords:** clinicaltrials.gov scraper, clinical trial data api, clinical trials scraper, clinical trial database, pharma competitive intelligence, patient recruitment data, clinical pipeline data, nct id scraper, clinical research dataset, clinical trials export

# Actor input Schema

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

Filter by condition or disease, e.g. 'diabetes', 'breast cancer', 'alzheimer'. Leave empty for all.

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

Free-text search across the whole study record (intervention, sponsor, keyword). Leave empty for all.

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

Filter by lead sponsor, e.g. 'pfizer', 'moderna', 'national cancer institute'. Leave empty for all.

## `overallStatus` (type: `array`):

Filter by trial status, e.g. 'RECRUITING', 'COMPLETED', 'ACTIVE\_NOT\_RECRUITING'. Leave empty for all.

## `maxStudies` (type: `integer`):

Maximum studies to save. 0 = all matching (up to ~585,000 across the whole database).

## Actor input object example

```json
{
  "condition": "",
  "searchTerm": "",
  "sponsor": "",
  "overallStatus": []
}
```

# Actor output Schema

## `nctId` (type: `string`):

nctId

## `briefTitle` (type: `string`):

briefTitle

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

overallStatus

## `phases` (type: `string`):

phases

## `leadSponsor` (type: `string`):

leadSponsor

## `conditions` (type: `string`):

conditions

## `enrollmentCount` (type: `string`):

enrollmentCount

## `startDate` (type: `string`):

startDate

# 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 = {
    "overallStatus": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/clinicaltrials-gov-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 = { "overallStatus": [] }

# Run the Actor and wait for it to finish
run = client.actor("logiover/clinicaltrials-gov-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 '{
  "overallStatus": []
}' |
apify call logiover/clinicaltrials-gov-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "ClinicalTrials.gov Scraper",
        "description": "Scrape clinical trials from the official ClinicalTrials.gov API — no login, no API key, no blocking. 585K+ studies with status, phase, sponsor, conditions, interventions, enrollment, eligibility and locations. Filter by condition, sponsor and status. Tens of thousands per run.",
        "version": "1.0",
        "x-build-id": "agjMKgmt7pMKKCs4u"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/logiover~clinicaltrials-gov-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-logiover-clinicaltrials-gov-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/logiover~clinicaltrials-gov-scraper/runs": {
            "post": {
                "operationId": "runs-sync-logiover-clinicaltrials-gov-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/logiover~clinicaltrials-gov-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-logiover-clinicaltrials-gov-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "condition": {
                        "title": "Condition / Disease",
                        "type": "string",
                        "description": "Filter by condition or disease, e.g. 'diabetes', 'breast cancer', 'alzheimer'. Leave empty for all.",
                        "default": ""
                    },
                    "searchTerm": {
                        "title": "Search Term",
                        "type": "string",
                        "description": "Free-text search across the whole study record (intervention, sponsor, keyword). Leave empty for all.",
                        "default": ""
                    },
                    "sponsor": {
                        "title": "Sponsor",
                        "type": "string",
                        "description": "Filter by lead sponsor, e.g. 'pfizer', 'moderna', 'national cancer institute'. Leave empty for all.",
                        "default": ""
                    },
                    "overallStatus": {
                        "title": "Status",
                        "type": "array",
                        "description": "Filter by trial status, e.g. 'RECRUITING', 'COMPLETED', 'ACTIVE_NOT_RECRUITING'. Leave empty for all.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxStudies": {
                        "title": "Max Studies",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum studies to save. 0 = all matching (up to ~585,000 across the whole database)."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
