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

Search ClinicalTrials.gov by condition, drug or sponsor: status, phase, conditions, interventions, sponsor, enrollment, dates, countries and investigators as clean JSON, CSV or Excel. Only-new alerts. $3 per 1,000 trials.

- **URL**: https://apify.com/tacps126/clinical-trials-scraper.md
- **Developed by:** [Tapaswai Choudhary](https://apify.com/tacps126) (community)
- **Categories:** AI, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.40 / 1,000 results

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/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 Scraper: ClinicalTrials.gov Studies

Search **ClinicalTrials.gov** by condition, drug, device or sponsor and get every matching study as a clean row: official title, summary, **status** (recruiting, completed...), **phase**, conditions, **interventions**, **sponsor**, enrollment, start and completion dates, **countries** and investigators. Newest updates first. Schedule it with *Only new results* and it becomes an alert; follow it as an **RSS/Atom feed**; add **AI summaries** on your own AI key.

**Built for** pharma and biotech competitive-intelligence teams, CROs and site networks finding new studies, medical-affairs and BD teams, investors tracking pipelines, patient-recruitment agencies and AI agents.

**At a glance**

- **Price:** $3 per 1,000 results, plus a small start fee per run.
- **First run:** the prefilled search returns the newest results for "GLP-1 obesity" in seconds.
- **More sources in one run:** [Research Radar](https://apify.com/tacps126/research-radar) searches OpenAlex, arXiv, PubMed, Europe PMC, worldwide patents, ClinicalTrials.gov, DOAJ, DataCite and Crossref together and merges duplicates.

### How to use it

1. Enter one or more **search queries**, for example `GLP-1 obesity`, `Alzheimer lecanemab`, `Pfizer RSV vaccine`.
2. Optionally set **Published within (days)** and **Sort by**.
3. Press **Start**. Download from the **Output** tab, or connect Google Sheets, Slack, Make, Zapier, n8n or webhooks.

Each row carries the study's NCT id and link; *Published within (days)* keeps studies updated in that window, so a weekly schedule with *Only new results* catches new and changed trials.

```json
{
  "queries": [
    "GLP-1 obesity",
    "Alzheimer lecanemab"
  ],
  "postedWithinDays": 30,
  "maxItems": 200
}
```

### Output

| Field | Description |
|-------|-------------|
| `type` | `paper`, `preprint`, `patent`, `trial`, `dataset` or `software` |
| `title`, `abstract` | As published |
| `authors` | `[{name, affiliation, orcid, country}]` when the source has them |
| `publishedAt` | Publication date (YYYY-MM-DD) |
| `venue` | Journal, server (arXiv) or repository |
| `doi`, `url`, `pdfUrl` | Identifiers and links (PDF when openly available) |
| `openAccess`, `citations`, `language`, `keywords` | When known |
| `citationsPerYear` | Citations divided by years since publication |
| `fieldNormalizedImpact`, `citationRank` | Impact against papers of the same field and year (1.0 = average); `top 1%` / `top 10%` |
| `retracted` | `true` for retracted papers (only with *Include retracted*) |
| `ids` | `openalex`, `pmid`, `pmcid`, `arxiv`, `europepmc`, `nct`, `doaj` |
| `patent` | For patents: `number`, `kind`, `country`, `familyId`, `applicationNumber`, `filingDate`, `priorityDate`, `classifications` (IPC), `applicants` |
| `trial` | For clinical trials: `nctId`, `status`, `phases`, `studyType`, `conditions`, `interventions`, `sponsor`, `sponsorClass`, `enrollment`, `startDate`, `completionDate`, `lastUpdated`, `locations`, `countries`, `hasResults` |
| `foundIn` | Every source that returned it |
| `query`, `matchedQuery`, `queryLanguage` | Which of your queries found it (and the translation, for multilingual search) |
| `aiSummary` | With *AI summaries* on |

The key-value store also holds `REPORT` (a Markdown digest to read or forward) and `CITATIONS` (BibTeX).

### Pricing

**$3 per 1,000 results** (each paper or patent counts once, however many sources found it) plus a small start fee per run. Duplicates and, with *Only new results*, already-delivered items are free. AI summaries and translations cost the model's tokens: a fraction of a cent each with the built-in AI (billed to your Apify account by Apify's AI gateway), or your provider's price with your own key. See the **Pricing** tab, and set a maximum charge per run to cap spend.

### FAQ

**What does it search?** ClinicalTrials.gov, by condition, drug, device or sponsor, newest updates first.

**What does each row include?** Official title, summary, status, phase, conditions, interventions, sponsor, enrollment, start and completion dates, countries and investigators.

**Can I get new results every week?** Yes. Turn on *Only new results* and schedule it; already-delivered items are free.

**How much does it cost?** $3 per 1,000 results plus a small start fee per run.

### Tips

- Use several specific queries rather than one broad one; results are merged.
- Queries match titles and abstracts, so papers that only mention your words in passing stay out.
- For a literature review, set *Sort by* to *Highest impact* with *Published within* 1,100 days: the most influential work of the last three years, deduplicated, with BibTeX.
- For a weekly alert, set *Published within* to 8 days and schedule weekly with *Only new results*.
- A free [OpenAlex key](https://openalex.org/settings/api) gives your runs their own daily budget.

### Use from AI agents

AI agents can run it through Apify's MCP server (`https://mcp.apify.com?tools=tacps126/clinical-trials-scraper`), and it is part of the [webdata-tools-mcp](https://github.com/tacps126/webdata-tools-mcp) server.

# Actor input Schema

## `queries` (type: `array`):

Keywords or phrases, one per line. Each is searched in every source you pick. Boolean operators (AND, OR, NOT) and quotes work in most sources.

## `postedWithinDays` (type: `integer`):

Only results published in the last N days. Leave empty for any time.

## `dateFrom` (type: `string`):

Only results published on or after this date.

## `openAccessOnly` (type: `boolean`):

Only papers you can read for free (patents are always included).

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

Newest first suits alerts; the other two surface the most influential work.

## `includeRetracted` (type: `boolean`):

Retracted papers are left out by default. Turn on to keep them (flagged `retracted`).

## `maxItemsPerSource` (type: `integer`):

Most results each source returns for each query, before merging.

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

Most results delivered in total (after merging).

## `onlyNew` (type: `boolean`):

Schedule the Actor and each run returns only papers and patents earlier runs didn't deliver - a research alert you pay for only when something new appears.

## `stateKey` (type: `string`):

Optional: name this monitor to keep its history even if you change the queries.

## `summarize` (type: `boolean`):

Add a short plain-language summary to each result, written by the AI model of your choice on your own API key (you pay your provider directly; nothing extra here).

## `summaryLanguage` (type: `string`):

e.g. English, German, Japanese. Default English.

## `languages` (type: `array`):

Translate each query into these languages (e.g. de, fr, zh, ja) with your AI key and search those too - finds work published in other languages.

## `aiProvider` (type: `string`):

Which AI does the analysis. Apify needs no key: the model's tokens are billed to your Apify account by Apify's AI gateway (a fraction of a cent per call with the default model). Any other provider uses your own key and bills you there.

## `aiApiKey` (type: `string`):

Your own key for the provider above (not needed for Apify). Sent only to that provider, never stored.

## `aiModel` (type: `string`):

Model name. Apify: an OpenRouter id like anthropic/claude-sonnet-... or google/gemini-... (default: the newest Claude Haiku listed, a light model since it runs once per result). Anthropic: default claude-opus-5-5. Others: required.

## `aiBaseUrl` (type: `string`):

Only for "Other OpenAI-compatible API", e.g. http://localhost:11434/v1 for Ollama.

## Actor input object example

```json
{
  "queries": [
    "GLP-1 obesity"
  ],
  "postedWithinDays": 30,
  "openAccessOnly": false,
  "sortBy": "newest",
  "includeRetracted": false,
  "maxItemsPerSource": 50,
  "maxItems": 200,
  "onlyNew": false,
  "summarize": false,
  "aiProvider": "apify"
}
```

# Actor output Schema

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

The produced items (default dataset items).

# 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 = {
    "queries": [
        "GLP-1 obesity"
    ],
    "postedWithinDays": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("tacps126/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 = {
    "queries": ["GLP-1 obesity"],
    "postedWithinDays": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("tacps126/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 '{
  "queries": [
    "GLP-1 obesity"
  ],
  "postedWithinDays": 30
}' |
apify call tacps126/clinical-trials-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tacps126/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/PxOO7YYg3idYVglns/builds/2ks7mvecKDSNGXhKQ/openapi.json
