# ClinicalTrials.gov Sponsor, Location & NCT Lookup Tool (`vexaloom-labs/clinicaltrials-gov-sponsor-location-and-nct-lookup`) Actor

Look up ClinicalTrials.gov studies by lead sponsor, trial site location, or a list of NCT IDs, plus condition/intervention search, with status, phase, demographic and date filters.

- **URL**: https://apify.com/vexaloom-labs/clinicaltrials-gov-sponsor-location-and-nct-lookup.md
- **Developed by:** [vexaloom-labs](https://apify.com/vexaloom-labs) (community)
- **Categories:** Automation, Developer tools, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

## ClinicalTrials.gov Sponsor, Location & NCT Lookup Tool

ClinicalTrials.gov is the US National Library of Medicine's public registry of clinical research, covering more than 500,000 studies worldwide. This actor is built for the registry's three practical lookup paths — follow a sponsor's pipeline, see what is running at a trial site or in a country, or resolve a saved list of NCT IDs — and it also searches by condition, intervention, title, outcome, sponsor study ID or facility. Everything is public: no account, cookie or proxy is needed.

### What this actor does

- **Ten lookup modes**: `search`, `byNctIds`, `byCondition`, `byIntervention`, `byLocation`, `bySponsor`, `byTitle`, `byOutcome`, `byStudyId`, `byFacility`
- **Paste a URL**: a study link, a search-results link, or an `api/v2/studies` link is parsed into the matching mode and filters
- **Sponsor scope**: match the lead sponsor only, or include collaborators
- **Server-side filtering** for recruitment status, study type, phase, intervention type, age group, country, state, facility, funder class, healthy volunteers, patient registries, FDAAA 801 violations, results availability, FDA regulation, document labels, enrollment and six date ranges
- **Eligibility parsing**: raw criteria plus separated inclusion/exclusion lines, sex, minimum/maximum age in text and years, standard age groups and the healthy-volunteer flag
- **Posted documents**: protocol, statistical-analysis-plan and informed-consent metadata with public PDF URLs
- **Optional posted-results summary**: participant-flow and baseline counts, outcome-measure counts and a short sample, adverse-event counts and limitations
- **Token pagination up to 10,000 records per run**, deduplicated by NCT ID; the first page asks for the server-side match total
- **Omit-empty output**: a field the registry does not have is left out, never written as `null`, `""`, `[]` or `{}`

### Output per study (sample)

```json
{
  "nctId": "NCT04280705",
  "briefTitle": "Adaptive COVID-19 Treatment Trial (ACTT)",
  "officialTitle": "A Multicenter, Adaptive, Randomized Blinded Controlled Trial...",
  "organization": "National Institute of Allergy and Infectious Diseases (NIAID)",
  "overallStatus": "COMPLETED",
  "startDate": "2020-02-21",
  "completionDate": "2020-05-21",
  "leadSponsor": "National Institute of Allergy and Infectious Diseases (NIAID)",
  "leadSponsorClass": "NIH",
  "conditions": ["COVID-19"],
  "studyType": "INTERVENTIONAL",
  "phases": ["PHASE3"],
  "enrollmentCount": 1062,
  "sex": "ALL",
  "minimumAge": "18 Years",
  "maximumAge": "99 Years",
  "minimumAgeYears": 18.0,
  "maximumAgeYears": 99.0,
  "standardAges": ["ADULT", "OLDER_ADULT"],
  "healthyVolunteers": false,
  "inclusionCriteria": ["Admitted to a hospital with symptoms suggestive of COVID-19 infection."],
  "exclusionCriteria": ["Alanine Transaminase (ALT) or Aspartate Transaminase (AST) > 5 times the upper limit of normal."],
  "documentTypes": ["PROTOCOL", "SAP"],
  "documents": [
    {
      "type": "Prot_SAP",
      "label": "Study Protocol and Statistical Analysis Plan",
      "filename": "Prot_SAP_000.pdf",
      "sizeBytes": 989192,
      "url": "https://clinicaltrials.gov/ProvidedDocs/05/NCT04280705/Prot_SAP_000.pdf"
    }
  ],
  "locations": [
    {
      "facility": "National Institutes of Health Clinical Center",
      "city": "Bethesda",
      "state": "Maryland",
      "country": "United States"
    }
  ],
  "locationCountries": ["United States", "Japan"],
  "locationCount": 73,
  "hasResults": true,
  "studyUrl": "https://clinicaltrials.gov/study/NCT04280705",
  "recordType": "clinicalTrial",
  "scrapedAt": "2026-11-24T12:00:00+00:00"
}
```

#### Available fields

- **Identification**: `nctId`, `briefTitle`, `officialTitle`, `acronym`, `organization`, `organizationClass`, `orgStudyId`
- **Status & dates**: `overallStatus`, `startDate`, `startDateType`, `primaryCompletionDate`, `completionDate`, `studyFirstSubmitDate`, `studyFirstPostDate`, `lastUpdateSubmitDate`, `lastUpdatePostDate`, `resultsFirstPostDate`, `statusVerifiedDate`, `hasExpandedAccess`
- **Sponsors**: `leadSponsor`, `leadSponsorClass`, `collaborators[]`, `responsiblePartyType`, `responsiblePartyInvestigator`
- **Oversight**: `isFdaRegulatedDrug`, `isFdaRegulatedDevice`, `hasDataMonitoringCommittee`, `fdaaa801Violation`
- **Description**: `briefSummary`, `detailedDescription`
- **Conditions**: `conditions[]`, `keywords[]`
- **Design**: `studyType`, `phases[]`, `enrollmentCount`, `enrollmentType`, `allocation`, `interventionModel`, `primaryPurpose`, `masking`, `whoMasked[]`, `observationalModel`, `timePerspective`, `targetDuration`, `patientRegistry`
- **Arms / interventions**: `armGroups[]`, `interventions[]`, `interventionNames[]`, `interventionTypes[]`
- **Eligibility**: `eligibilityCriteria`, `inclusionCriteria[]`, `exclusionCriteria[]`, `sex`, `minimumAge`, `maximumAge`, `minimumAgeYears`, `maximumAgeYears`, `standardAges[]`, `healthyVolunteers`
- **Outcomes**: `primaryOutcomes[]`, `secondaryOutcomes[]`
- **Locations**: `locations[]`, `locationCities[]`, `locationStates[]`, `locationCountries[]`, `locationCount`, `overallOfficials[]`
- **Documents**: `documents[]`, `documentTypes[]`, `documentCount`
- **Results** (with `includeResults`): `results` → `participantFlowGroupCount`, `participantFlowPeriodCount`, `baselineGroupCount`, `outcomeMeasureCount`, `outcomeMeasureTypes[]`, `topOutcomeMeasures[]`, `seriousAdverseEventCount`, `otherAdverseEventCount`, `adverseEventFrequencyThreshold`, `adverseEventTimeFrame`, `limitationsAndCaveats`, `resultsUrl`
- **Derived**: `studyUrl`, `recordType`, `scrapedAt`

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | enum | `search` | `search`, `byNctIds`, `byCondition`, `byIntervention`, `byLocation`, `bySponsor`, `byTitle`, `byOutcome`, `byStudyId`, `byFacility` |
| `searchQuery` | string | `cancer immunotherapy` | Free-text query for `mode=search`; fallback for the other browse modes |
| `conditionQuery` | string | – | Disease or condition for `mode=byCondition` |
| `interventionQuery` | string | – | Drug, device, biological or therapy for `mode=byIntervention` |
| `interventionTypes` | array enum | – | Drug / Device / Biological / Procedure / Behavioral / Dietary supplement / Combination product / Diagnostic test / Genetic / Other |
| `locationQuery` | string | – | City, state or country text for `mode=byLocation` |
| `sponsorQuery` | string | – | Sponsor name for `mode=bySponsor`; exact registered names work best |
| `sponsorScope` | enum | `lead` | `lead` (lead sponsor only) or `all` (lead sponsor plus collaborators) |
| `titleQuery` | string | – | Words from the title or acronym for `mode=byTitle` |
| `outcomeQuery` | string | – | Words from an outcome measure for `mode=byOutcome` |
| `studyIdQuery` | string | – | Sponsor's own study identifier for `mode=byStudyId` |
| `facilityQuery` | string | – | Trial-site facility name for `mode=byFacility` |
| `nctIds` | array | – | NCT IDs or study URLs for `mode=byNctIds`; repeats are dropped |
| `startUrl` | string | – | Study, search-results or `api/v2/studies` URL; parsed values override the matching fields |
| `statuses` | array enum | – | Any of the 14 recruitment/overall statuses |
| `studyTypes` | array enum | – | Interventional / Observational / Expanded Access |
| `phases` | array enum | – | Early Phase 1 / Phase 1 / 2 / 3 / 4 / Not Applicable |
| `sex` | enum | – | `ALL` (both sexes only), `MALE`, `FEMALE`; empty keeps every study |
| `ageGroups` | array enum | – | Child / Adult / Older Adult |
| `healthyVolunteersFilter` | enum | – | `yes` or `no`; empty means no filter |
| `ageRangeUnit` | enum | `years` | Unit for `ageRangeFrom` and `ageRangeTo`: `years` or `months` |
| `ageRangeFrom` | int | – | Lower bound of the eligible-age overlap window (0-1440) |
| `ageRangeTo` | int | – | Upper bound of the eligible-age overlap window (0-1440) |
| `country` | enum | – | 54 common trial countries |
| `countryText` | string | – | Any country name; overrides `country` |
| `state` | string | – | Registered state or region name (not a two-letter code) |
| `sponsorClass` | enum | – | NIH / Other US federal / Industry / Network / Individual / Other / Other government / Unknown / Ambiguous |
| `fdaRegulated` | enum | – | `drug` or `device` |
| `onlyPatientRegistries` | bool | `false` | Keep only studies flagged as patient registries |
| `onlyFdaaaViolations` | bool | `false` | Keep only studies with an FDAAA 801 violation |
| `resultsAvailability` | enum | – | `with_results` or `without_results` |
| `startDateFrom` | string | – | Study-start lower bound |
| `startDateTo` | string | – | Study-start upper bound |
| `primaryCompletionDateFrom` | string | – | Primary-completion lower bound |
| `primaryCompletionDateTo` | string | – | Primary-completion upper bound |
| `completionDateFrom` | string | – | Study-completion lower bound |
| `completionDateTo` | string | – | Study-completion upper bound |
| `firstPostedDateFrom` | string | – | First-posted lower bound |
| `firstPostedDateTo` | string | – | First-posted upper bound |
| `resultsFirstPostedDateFrom` | string | – | Results-first-posted lower bound |
| `resultsFirstPostedDateTo` | string | – | Results-first-posted upper bound |
| `lastUpdatePostedDateFrom` | string | – | Last-update lower bound |
| `lastUpdatePostedDateTo` | string | – | Last-update upper bound |
| `enrollmentFrom` | int | – | Minimum planned or actual enrollment |
| `enrollmentTo` | int | – | Maximum planned or actual enrollment |
| `containsKeyword` | string | – | Client-side case-insensitive substring across title, summary, eligibility, conditions, keywords and interventions |
| `documentTypes` | array enum | – | Protocol / Statistical analysis plan / Informed consent form |
| `sort` | enum | `relevance` | Relevance, last update, start/completion/first-posted/results dates or enrollment |
| `includeResults` | bool | `false` | Add the compact `results` summary when the study has posted results |
| `maxItems` | int | `50` | Hard cap (1-10,000); prefill `3` for the smallest paid test run |

Dates accept ISO 8601 partial values — `2020`, `2020-01` or `2020-01-15`.

#### Example: a sponsor's recruiting pipeline

```json
{
  "mode": "bySponsor",
  "sponsorQuery": "Mayo Clinic",
  "sponsorScope": "lead",
  "statuses": ["RECRUITING"],
  "studyTypes": ["INTERVENTIONAL"],
  "sort": "lastUpdateDesc",
  "maxItems": 100
}
```

#### Example: what is running at sites in a country

```json
{
  "mode": "byLocation",
  "locationQuery": "Germany",
  "phases": ["PHASE2", "PHASE3"],
  "country": "Germany",
  "maxItems": 200
}
```

#### Example: resolve a saved NCT list, including URLs

```json
{
  "mode": "byNctIds",
  "nctIds": [
    "NCT04280705",
    "https://clinicaltrials.gov/study/NCT03695107",
    "NCT04611802"
  ],
  "includeResults": true
}
```

#### Example: filtered condition landscape by URL

```json
{
  "startUrl": "https://clinicaltrials.gov/search?cond=breast%20cancer&aggFilters=status:rec%20act,phase:3,studyType:int&country=United%20States",
  "ageRangeFrom": 18,
  "ageRangeTo": 65,
  "maxItems": 500
}
```

### Legacy input compatibility

Saved tasks and integrations built on earlier versions keep working. The actor maps these old keys in code without showing them in the input form:

`query`, `searchTerm`, `term`, `keyword`, `q`, `condition`, `cond`, `intervention`, `intr`, `location`, `locationTerm`, `locn`, `sponsor`, `sponsorOrCollaborator`, `leadSponsor`, `titleOrAcronym`, `outcomeMeasure`, `studyIds`, `nctId`, `nct_id`, `status`, `overallStatus`, `statusFilter`, `studyType`, `phase`, `phaseFilter`, `hasResults`, `resultsSubmitted`, `acceptsHealthyVolunteers`, `healthyVolunteers`, `maxStudies`, `maxResults`, `limit`, `sortBy`, `studyStartDateFrom/To`, `studyCompletionDateFrom/To`, `postedFrom/To`, `url`, `searchUrl`.

Only the fields the actor actually reads are shown in the form; old keys are accepted in the raw input and mapped onto the current contract.

### Use cases

- **Competitive intelligence** — collect every registered trial for a named sponsor, including collaborators, and sort by the latest update
- **Site feasibility** — see which studies are recruiting around a city, state or country before opening a new site
- **Portfolio tracking** — resolve a spreadsheet of NCT IDs into current status, dates and enrollment on a schedule
- **Patient matching** — combine condition, sex and age-window filters with the raw inclusion/exclusion criteria
- **Regulatory and policy work** — monitor FDA-regulated studies, posted results and protocol/SAP/ICF documents
- **Research data pipelines** — export a filtered trial landscape with structured interventions, outcomes and locations

### FAQ

**Who runs ClinicalTrials.gov?** The US National Library of Medicine, part of the National Institutes of Health. Sponsors and investigators worldwide submit and update the records.

**Is this an official ClinicalTrials.gov or NIH product?** No. It is an independent client for the registry's public v2 API.

**Why does a sponsor lookup sometimes miss a company I know?** The API matches the registered sponsor string, so `Pfizer` and `Pfizer Inc.` are not identical. Check the exact name in a ClinicalTrials.gov record, and remember that collaborators are only searched when `sponsorScope` is `all`.

**What happens with a mixed NCT list?** Valid IDs resolve; IDs that do not match a study are omitted, and the status message reports how many were emitted. Duplicate IDs are removed before lookup.

**Do I need an API key or proxy?** No. The actor calls the public registry directly and never uses cookies or credentials.

**How does pagination stop?** It stops when `maxItems` is reached, when the registry returns no further page token, or when the query is exhausted. It never pads the dataset to hit the cap.

**What is the difference between `locations[]` and the flattened location fields?** `locations[]` holds one object per trial site (facility, city, state, zip, country, coordinates). `locationCities[]`, `locationStates[]` and `locationCountries[]` are convenience lists derived from those sites, and `locationCount` is the number of sites.

**Why do some dates have only a month?** Sponsors may register partial dates. The actor preserves the precision the registry supplies instead of inventing a day.

**What does `includeResults` add?** A small `results` object with counts, a five-item outcome-measure sample, adverse-event counts, limitations and a `resultsUrl` — not the full results tables.

**Are filters applied before or after download?** Status, study type, phase, intervention type, age group, country, state, facility, funder, healthy volunteers, registries, FDAAA, results availability, FDA regulation, documents, enrollment and date ranges are applied by the API. Sex, age-window overlap and the keyword substring are re-checked after fetch; the status message notes when that reduces the result set.

**Why is `officialTitle` sometimes absent?** Many records register only a brief title. The actor omits fields the registry does not provide rather than sending a placeholder.

# Actor input Schema

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

Which lookup axis to use.

## `searchQuery` (type: `string`):

Free-text query against the full study record. Used by mode=search; also serves as a fallback for the other browse modes if their specific query is empty.

## `conditionQuery` (type: `string`):

Disease, condition, or medical term (e.g. `diabetes`, `breast cancer`, `Alzheimer disease`).

## `interventionQuery` (type: `string`):

Drug name, device, biological, or therapy (e.g. `metformin`, `pembrolizumab`, `CAR-T`).

## `interventionTypes` (type: `array`):

Keep studies with any of the selected intervention types. Empty = no intervention-type filter.

## `locationQuery` (type: `string`):

Geographic location text (city, state, country) — e.g. `Boston`, `California`, `United States`.

## `sponsorQuery` (type: `string`):

Lead sponsor or collaborator name. Use `sponsorScope` to choose which one. Exact registered names work best (e.g. `Pfizer Inc.`, `Mayo Clinic`); partial names usually still match.

## `sponsorScope` (type: `string`):

Match `sponsorQuery` against the lead sponsor only or against lead sponsor plus collaborators.

## `titleQuery` (type: `string`):

Words from the brief title, official title or acronym (e.g. `remdesivir`, `ACTT`).

## `outcomeQuery` (type: `string`):

Words from a primary or secondary outcome measure (e.g. `quality of life`, `progression-free survival`).

## `studyIdQuery` (type: `string`):

The sponsor's own study identifier (e.g. `20-0006`, `SC2900`). Exact identifier only.

## `facilityQuery` (type: `string`):

Trial-site facility name (e.g. `Mayo Clinic`, `Johns Hopkins`).

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

List of NCT identifiers like `NCT04280705`. Full URLs (`https://clinicaltrials.gov/study/NCT...`) are also accepted.

## `startUrl` (type: `string`):

Paste a study URL (`https://clinicaltrials.gov/study/NCT...`), a search-results URL, or an `https://clinicaltrials.gov/api/v2/studies?...` URL. Values in the URL take precedence over the matching input fields; the remaining filters still apply.

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

Keep studies with any of the selected statuses. Empty = no status filter.

## `studyTypes` (type: `array`):

Keep studies of any of the selected types. Empty = no study-type filter.

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

Keep studies in any of the selected trial phases. Empty = no phase filter.

## `sex` (type: `string`):

Restrict by the sex a study enrolls. `ALL` keeps only studies open to both sexes; `MALE`/`FEMALE` keep studies open to that sex (including both-sex studies).

## `ageGroups` (type: `array`):

Keep studies that enroll any of the selected age groups. Empty = no age-group filter.

## `healthyVolunteersFilter` (type: `string`):

Keep studies that do or do not accept healthy volunteers. Empty = no filter.

## `ageRangeUnit` (type: `string`):

Unit for ageRangeFrom/ageRangeTo.

## `ageRangeFrom` (type: `integer`):

Keep studies whose eligibility age window overlaps this lower bound, expressed in `ageRangeUnit` (years by default). Studies with no age limit are treated as 0-120 years.

## `ageRangeTo` (type: `integer`):

Keep studies whose eligibility age window overlaps this upper bound, expressed in `ageRangeUnit`.

## `country` (type: `string`):

Keep studies with a trial location in this country.

## `countryText` (type: `string`):

Any country name, including countries not in the dropdown. Takes precedence over `country`.

## `state` (type: `string`):

Trial-site state or region as registered on ClinicalTrials.gov (e.g. `California`, `Ontario`). Exact name, not a two-letter code.

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

Keep studies by lead-sponsor class. Empty = no funder filter.

## `fdaRegulated` (type: `string`):

Keep studies that are FDA-regulated drug or device trials. Empty = no filter.

## `onlyPatientRegistries` (type: `boolean`):

When enabled, keep only studies flagged as patient registries.

## `onlyFdaaaViolations` (type: `boolean`):

When enabled, keep only studies with an FDAAA 801 violation.

## `resultsAvailability` (type: `string`):

Keep studies with or without posted results. Empty = no filter.

## `startDateFrom` (type: `string`):

Drop studies that started before this date. ISO 8601 partial dates accepted (e.g. `2020`, `2020-01`, `2020-01-15`).

## `startDateTo` (type: `string`):

Drop studies that started after this date.

## `primaryCompletionDateFrom` (type: `string`):

Drop studies whose primary completion date is before this date.

## `primaryCompletionDateTo` (type: `string`):

Drop studies whose primary completion date is after this date.

## `completionDateFrom` (type: `string`):

Drop studies whose completion date is before this date.

## `completionDateTo` (type: `string`):

Drop studies whose completion date is after this date.

## `firstPostedDateFrom` (type: `string`):

Drop studies first posted before this date.

## `firstPostedDateTo` (type: `string`):

Drop studies first posted after this date.

## `resultsFirstPostedDateFrom` (type: `string`):

Drop studies whose results were first posted before this date.

## `resultsFirstPostedDateTo` (type: `string`):

Drop studies whose results were first posted after this date.

## `lastUpdatePostedDateFrom` (type: `string`):

Drop studies last updated before this date.

## `lastUpdatePostedDateTo` (type: `string`):

Drop studies last updated after this date.

## `enrollmentFrom` (type: `integer`):

Drop studies whose planned or actual enrollment is below this number.

## `enrollmentTo` (type: `integer`):

Drop studies whose planned or actual enrollment is above this number.

## `containsKeyword` (type: `string`):

Client-side filter: keep only records whose title, summary, eligibility, conditions, keywords, or interventions contain this substring (case-insensitive).

## `documentTypes` (type: `array`):

Keep studies that have any of these documents posted. Empty = no document filter.

## `sort` (type: `string`):

Order of the results returned by ClinicalTrials.gov.

## `includeResults` (type: `boolean`):

When enabled, add a compact `results` object (participant-flow/baseline group counts, outcome-measure counts and a 5-item sample, adverse-event counts, limitations) for studies with posted results.

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

Hard cap on emitted records.

## Actor input object example

```json
{
  "mode": "search",
  "searchQuery": "cancer immunotherapy",
  "interventionTypes": [],
  "sponsorScope": "lead",
  "nctIds": [],
  "statuses": [],
  "studyTypes": [],
  "phases": [],
  "ageGroups": [],
  "ageRangeUnit": "years",
  "onlyPatientRegistries": false,
  "onlyFdaaaViolations": false,
  "documentTypes": [],
  "sort": "relevance",
  "includeResults": false,
  "maxItems": 3
}
```

# Actor output Schema

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

Dataset containing all scraped clinical-trial records.

# 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 = {
    "mode": "search",
    "searchQuery": "cancer immunotherapy",
    "interventionTypes": [],
    "sponsorScope": "lead",
    "nctIds": [],
    "statuses": [],
    "studyTypes": [],
    "phases": [],
    "ageGroups": [],
    "ageRangeUnit": "years",
    "onlyPatientRegistries": false,
    "onlyFdaaaViolations": false,
    "documentTypes": [],
    "sort": "relevance",
    "includeResults": false,
    "maxItems": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("vexaloom-labs/clinicaltrials-gov-sponsor-location-and-nct-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 = {
    "mode": "search",
    "searchQuery": "cancer immunotherapy",
    "interventionTypes": [],
    "sponsorScope": "lead",
    "nctIds": [],
    "statuses": [],
    "studyTypes": [],
    "phases": [],
    "ageGroups": [],
    "ageRangeUnit": "years",
    "onlyPatientRegistries": False,
    "onlyFdaaaViolations": False,
    "documentTypes": [],
    "sort": "relevance",
    "includeResults": False,
    "maxItems": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("vexaloom-labs/clinicaltrials-gov-sponsor-location-and-nct-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 '{
  "mode": "search",
  "searchQuery": "cancer immunotherapy",
  "interventionTypes": [],
  "sponsorScope": "lead",
  "nctIds": [],
  "statuses": [],
  "studyTypes": [],
  "phases": [],
  "ageGroups": [],
  "ageRangeUnit": "years",
  "onlyPatientRegistries": false,
  "onlyFdaaaViolations": false,
  "documentTypes": [],
  "sort": "relevance",
  "includeResults": false,
  "maxItems": 3
}' |
apify call vexaloom-labs/clinicaltrials-gov-sponsor-location-and-nct-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vexaloom-labs/clinicaltrials-gov-sponsor-location-and-nct-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/geFvd8bEgRzgFr40o/builds/SKvvznYMTZF5b9Hiq/openapi.json
