# ClinicalTrials.gov API — NIH Study Registry Search (`accountable_eel/clinicaltrials-study-lookup`) Actor

Look up registered clinical trials by NCT ID against the official, free NIH ClinicalTrials.gov registry. Get status, phase, study type, sponsor, enrollment count, conditions, interventions, and trial site countries. Pay only for NCT IDs that resolve.

- **URL**: https://apify.com/accountable\_eel/clinicaltrials-study-lookup.md
- **Developed by:** [Adrian Voss](https://apify.com/accountable_eel) (community)
- **Categories:** Developer tools, Education
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 successful lookups

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?

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

## ClinicalTrials.gov Study Lookup

Look up any registered clinical trial by NCT ID against the official, free
[ClinicalTrials.gov](https://clinicaltrials.gov) v2 API run by the U.S. National
Institutes of Health — status, phase, sponsor, enrollment, conditions, interventions,
and trial site countries. No API key, no scraping — this hits the official government
API directly.

### Features

- **NCT ID → full protocol record.** Brief and official title, overall status, phase,
  study type, start/completion dates.
- **Sponsor & scale.** Lead sponsor name and target enrollment count.
- **Clinical detail.** Conditions studied, interventions (with type: drug, device,
  behavioral, etc.), and location countries with site count.
- **Pay only for hits.** NCT IDs that don't resolve cost nothing — see [Pricing](#pricing).
- **Built for bulk.** Feed in thousands of NCT IDs; concurrency, keyword filtering, and
  column selection are all configurable.

### How to use ClinicalTrials.gov Study Lookup — Official NIH Registry API

1. **In the Apify Console.** Open the actor page and click **Start** — the `nctIds` field is already pre-filled with a working example. Results land in the run's dataset as soon as each item is found.
2. **Via the API.** Call it directly with a POST request — no Console needed once you have an API token:
   ```bash
   curl "https://api.apify.com/v2/acts/accountable_eel~clinicaltrials-study-lookup/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
     -X POST \
     -H "Content-Type: application/json" \
     -d '{"nctIds":["NCT04280705"]}'
   ```
3. **On a schedule.** Save this actor as an Apify **Task** with the input you want, then add a **Schedule** (hourly, daily, weekly) so it runs on its own — no server of your own required.

### Input

```json
{
  "nctIds": [
    "NCT04280705"
  ]
}
```

One NCT ID per line, e.g. NCT04280705. Accepted formats: NCT04280705.

```json
{
  "nctIds": ["NCT04280705"],
  "testRun": false,
  "onlyFound": false,
  "maxConcurrency": 5
}
```

`nctIds` is a list of ClinicalTrials.gov identifiers (format `NCT` followed by 8 digits,
e.g. `NCT04280705`). One dataset row is returned per ID; rows with `"found": false` are
never charged. Turn on `testRun` to try your list against just the first 5 IDs before
running the full batch. Optional `includeKeywords` / `excludeKeywords` filter rows by
content, `maxResults` caps the run early, and `columns` lets you pick which fields to
return.

### Output

| query | found | status | title | nctId | overallStatus | phase | studyType | startDate | completionDate | enrollment | leadSponsor | conditions | interventions | locationCountries | locationCount | briefSummary | officialTitle | scrapedAt |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| NCT04280705 | true | OK | Adaptive COVID-19 Treatment Trial (ACTT) | NCT04280705 | COMPLETED | PHASE3 | INTERVENTIONAL | 2020-02-21 | 2020-05-21 | 1062 | National Institute of Allergy and Infectious Diseases (NIAID) | \["COVID-19"] | \[{"type":"OTHER","name":"Placebo"},{"type":"DRUG","name":"Remdesivir"}] | \["United States","Denmark","Germany","Greece","Japan","Mexico","Singapore","South Korea","Spain","United Kingdom"] | 60 | This study is an adaptive, randomized, double-blind, placebo-controlled trial to evaluate the safety and efficacy of novel therapeutic agents in hospitalized adults diagnosed with COVID-19. The study is a multicenter trial that will be conducted in up to approximately 100 sites globally. The study will compare different investigational therapeutic agents to a control arm. There will be interim monitoring to introduce new arms and allow early stopping for futility, efficacy, or safety. If one therapy proves to be efficacious, then this treatment may become the control arm for comparison(s) with new experimental treatment(s). Any such change would be accompanied by an updated sample size. Because background standards of supportive care may evolve/improve over time as more is learned about successful management of COVID-19, comparisons of safety and efficacy will be based on data from concurrently randomized subjects. An independent Data and Safety Monitoring Board (DSMB) will actively monitor interim data to make recommendations about early study closure or changes to study arms. To evaluate the clinical efficacy, as assessed by time to recovery, of different investigational therapeutics as compared to the control arm. | A Multicenter, Adaptive, Randomized Blinded Controlled Trial of the Safety and Efficacy of Investigational Therapeutics for the Treatment of COVID-19 in Hospitalized Adults | 2026-08-31T06:20:20.443Z |

One row per NCT ID, for example:

```json
{
  "query": "NCT04280705",
  "found": true,
  "status": "OK",
  "nctId": "NCT04280705",
  "title": "Adaptive COVID-19 Treatment Trial (ACTT)",
  "officialTitle": "A Multicenter, Adaptive, Randomized Blinded Controlled Trial of the Safety and Efficacy of Investigational Therapeutics for the Treatment of COVID-19",
  "overallStatus": "COMPLETED",
  "startDate": "2020-02-21",
  "completionDate": "2021-04-19",
  "phase": "PHASE3",
  "studyType": "INTERVENTIONAL",
  "enrollment": 1062,
  "leadSponsor": "National Institute of Allergy and Infectious Diseases (NIAID)",
  "conditions": ["Covid19"],
  "interventions": [{ "type": "DRUG", "name": "Remdesivir" }],
  "locationCountries": ["United States", "South Korea", "Japan"],
  "locationCount": 60,
  "briefSummary": "A randomized, placebo-controlled trial evaluating investigational therapeutics for COVID-19...",
  "scrapedAt": "2026-08-21T10:00:00.000Z"
}
```

NCT IDs that don't resolve still get a row (`"found": false`, `"status": "NOT_FOUND"` or
`"BAD_FORMAT"`, with a plain-English `message`), so you always get one row per input —
but you're never charged for those.

### Use cases

- **Trial status monitoring** — track a watchlist of NCT IDs for status changes
  (recruiting → active → completed) across a therapeutic area.
- **Competitive intelligence** — pull sponsor, phase, and enrollment for a set of trials
  in a given condition or drug class.
- **Site & country coverage analysis** — see which countries a trial recruits in and how
  many sites it runs, without opening each record.
- **Regulatory & literature enrichment** — attach structured trial metadata to a
  publication or citation dataset that already references NCT IDs.

### Pricing

$4 per 1,000 studies, plus a $0.00005 start fee. Misses (`found:false`) are never charged.

### Use it from Clay, n8n, Make, or an AI agent

This actor runs synchronously over plain HTTP — call it directly from a script, a workflow tool, or an AI agent, no Apify Console needed once you have an API token.

```bash
curl "https://api.apify.com/v2/acts/accountable_eel~clinicaltrials-study-lookup/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"nctIds":["NCT04280705"]}'
```

**n8n.** Add an HTTP Request node: Method `POST`, URL `https://api.apify.com/v2/acts/accountable_eel~clinicaltrials-study-lookup/run-sync-get-dataset-items?token=<YOUR_TOKEN>`, Body Content Type `JSON`, JSON Body `{"nctIds":["NCT04280705"]}` (swap in an expression from an earlier node for a real value).

**Clay.** Add an "HTTP API" column: Method `POST`, URL `https://api.apify.com/v2/acts/accountable_eel~clinicaltrials-study-lookup/run-sync-get-dataset-items?token=<YOUR_TOKEN>`, Body `{"nctIds":["{{study}}"]}`, mapping the row's study into the `nctIds` array.

**MCP.** In Claude, Cursor, or any MCP client with the Apify MCP server, ask for "ClinicalTrials.gov API — Study Protocol & Status Lookup" — the agent will find and run this actor.

### FAQ

**Do I need a ClinicalTrials.gov API key?**
No. The ClinicalTrials.gov v2 API is free and public — this actor calls it directly,
with no credentials required on your end.

**What counts as "not found"?**
A well-formed NCT ID with no matching study returns `"found": false"` with `"status":
"NOT_FOUND"`. An ID that doesn't match the `NCT` + 8-digit pattern is rejected before
any request is made and returns `"BAD_FORMAT"`. Neither is charged.

**What ID format does it expect?**
`NCT` followed by exactly 8 digits, e.g. `NCT04280705`. The actor extracts the NCT
pattern from your input automatically, so pasting a longer string containing a valid ID
still works.

**Does `phase` cover trials with multiple phases?**
Yes — some trials span more than one phase (e.g. Phase 2/3). When that's the case,
`phase` returns a comma-separated list, e.g. `"PHASE2, PHASE3"`.

**Can I run this against thousands of NCT IDs at once?**
Yes. Turn on `testRun` first to sanity-check your list against just 5 IDs, then run the
full batch — `maxConcurrency` controls how many requests run in parallel.

**Is this limited to U.S. trials?**
No — ClinicalTrials.gov indexes trials registered from sponsors and sites worldwide.
Use `locationCountries` in each result to see which countries a given trial actually
recruits in.

# Actor input Schema

## `nctIds` (type: `array`):

One NCT ID per line, e.g. NCT04280705. Accepted formats: NCT04280705. You're only charged for the ones we actually find — a miss costs nothing.

## `testRun` (type: `boolean`):

Turn this on to test your input on a small sample before running the full list. Turn it off to process everything.

## `onlyFound` (type: `boolean`):

Only keep rows where something was actually found. Misses are always free, whether or not you show them here.

## `includeKeywords` (type: `array`):

Optional. Only keep results that mention at least one of these words (e.g. a job title, a city, a product name). Leave empty to keep everything.

## `excludeKeywords` (type: `array`):

Optional. Drop any result that mentions one of these words. Leave empty to skip nothing.

## `maxResults` (type: `integer`):

Optional. Stop the run once this many results have been found — useful for a quick, cheap sample. Leave blank for no limit.

## `columns` (type: `array`):

Choose which pieces of information to include in each result row. All are included by default.

## `maxConcurrency` (type: `integer`):

Parallel requests. Keep conservative — this target has no browser fallback, so getting blocked costs more than slow-and-steady.

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

Apify Proxy config. Residential recommended for anti-bot-sensitive targets.

## Actor input object example

```json
{
  "nctIds": [
    "NCT04280705"
  ],
  "testRun": false,
  "onlyFound": false,
  "includeKeywords": [],
  "excludeKeywords": [],
  "columns": [
    "title",
    "nctId",
    "overallStatus",
    "phase",
    "studyType",
    "startDate",
    "completionDate",
    "enrollment",
    "leadSponsor",
    "conditions",
    "interventions",
    "locationCountries",
    "locationCount",
    "briefSummary",
    "officialTitle"
  ],
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "nctIds": [
        "NCT04280705"
    ],
    "includeKeywords": [],
    "excludeKeywords": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("accountable_eel/clinicaltrials-study-lookup").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 = {
    "nctIds": ["NCT04280705"],
    "includeKeywords": [],
    "excludeKeywords": [],
}

# Run the Actor and wait for it to finish
run = client.actor("accountable_eel/clinicaltrials-study-lookup").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 '{
  "nctIds": [
    "NCT04280705"
  ],
  "includeKeywords": [],
  "excludeKeywords": []
}' |
apify call accountable_eel/clinicaltrials-study-lookup --silent --output-dataset

```

## MCP server setup

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

```

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/ULUfJXijqjX43CoYp/builds/4vW4ZUDWqwoeomDQl/openapi.json
