# ClinicalTrials.gov Scraper (`crawlerbros/clinicaltrialsgov-scraper`) Actor

Scrape the US government clinical-trial registry (500K+ studies). Search by condition, intervention, location, sponsor, or NCT ID; filter by status, phase, study type, demographics, country, and dates. Public REST API, no auth, no proxy.

- **URL**: https://apify.com/crawlerbros/clinicaltrialsgov-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 7 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $3.00 / 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/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

Scrape the US government clinical-trial registry — **500,000+ studies** spanning interventional trials, observational studies, and expanded-access programs across **220+ countries**. Search by free-text, condition, intervention, location, or sponsor; look up by NCT ID; filter by recruitment status, phase, study type, demographic eligibility, and date ranges. HTTP-only via the public ClinicalTrials.gov **REST API v2** — no authentication, no cookies, no proxy required.

### What this actor does

- **Six modes**: `search`, `byNctIds`, `byCondition`, `byIntervention`, `byLocation`, `bySponsor`
- **Server-side filters**: status, phase, study type, country (passed directly to the API)
- **Client-side filters**: sex, age groups, start / completion date ranges, has-results, keyword substring
- **Cursor pagination**: scales to thousands of records per run
- **Polite-pool**: identifies itself via `User-Agent` header with contact email
- **Empty fields are omitted** — no `null`, `""`, `[]`, or `{}` in the output

### 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)",
  "conditions": ["COVID-19"],
  "keywords": ["Adaptive", "COVID-19", "Efficacy", "Multicenter"],
  "studyType": "INTERVENTIONAL",
  "phases": ["PHASE3"],
  "enrollmentCount": 1062,
  "allocation": "RANDOMIZED",
  "interventionModel": "PARALLEL",
  "primaryPurpose": "TREATMENT",
  "interventionNames": ["Placebo", "Remdesivir"],
  "interventionTypes": ["OTHER", "DRUG"],
  "locationCountries": ["United States", "Japan", "Korea, Republic of", "..."],
  "locationCount": 73,
  "hasResults": true,
  "studyUrl": "https://clinicaltrials.gov/study/NCT04280705",
  "recordType": "clinicalTrial",
  "scrapedAt": "2026-05-21T11:53: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`
- **Description**: `briefSummary`, `detailedDescription`
- **Conditions**: `conditions[]`, `keywords[]`
- **Design**: `studyType`, `phases[]`, `enrollmentCount`, `enrollmentType`, `allocation`, `interventionModel`, `primaryPurpose`, `masking`
- **Arms / interventions**: `armGroups[]`, `interventions[]`, `interventionNames[]`, `interventionTypes[]`
- **Eligibility**: `eligibilityCriteria`, `sex`, `minimumAge`, `maximumAge`, `standardAges[]`, `healthyVolunteers`
- **Outcomes**: `primaryOutcomes[]`, `secondaryOutcomes[]`
- **Locations**: `locations[]`, `locationCities[]`, `locationCountries[]`, `locationCount`, `overallOfficials[]`
- **Results**: `hasResults`
- **Derived**: `studyUrl`, `recordType`, `scrapedAt`

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `search` | One of `search`, `byNctIds`, `byCondition`, `byIntervention`, `byLocation`, `bySponsor` |
| `searchQuery` | string | `cancer immunotherapy` | Free-text query (mode=search; also fallback for other modes) |
| `conditionQuery` | string | – | Disease / condition (mode=byCondition) |
| `interventionQuery` | string | – | Drug / device / therapy (mode=byIntervention) |
| `locationQuery` | string | – | Geographic text (mode=byLocation) |
| `sponsorQuery` | string | – | Lead sponsor name (mode=bySponsor) |
| `nctIds` | array | – | List of NCT IDs (mode=byNctIds) |
| `status` | enum | – | Overall recruitment status (Recruiting, Completed, etc.) |
| `studyType` | enum | – | Interventional / Observational / Expanded Access |
| `phases` | array enum | – | One or more of Early Phase 1 / Phase 1 / Phase 2 / Phase 3 / Phase 4 / NA |
| `sex` | enum | – | Eligible sex (All / Male / Female) |
| `ageGroups` | array enum | – | One or more of Child / Adult / Older Adult |
| `country` | enum | – | Country with a trial location |
| `startDateFrom` / `startDateTo` | string | – | ISO date bounds for study start |
| `completionDateFrom` / `completionDateTo` | string | – | ISO date bounds for completion |
| `hasResults` | bool | `false` | Only studies with results posted |
| `containsKeyword` | string | – | Case-insensitive substring filter |
| `maxItems` | int | `50` | Hard cap (1–5000) |

#### Example: actively recruiting Phase 3 cancer trials in the US

```json
{
  "mode": "byCondition",
  "conditionQuery": "breast cancer",
  "status": "RECRUITING",
  "phases": ["PHASE3"],
  "country": "United States",
  "maxItems": 200
}
```

#### Example: lookup by NCT IDs

```json
{
  "mode": "byNctIds",
  "nctIds": ["NCT04280705", "NCT03695107", "NCT04611802"]
}
```

#### Example: every metformin trial since 2020 with results posted

```json
{
  "mode": "byIntervention",
  "interventionQuery": "metformin",
  "startDateFrom": "2020",
  "hasResults": true,
  "maxItems": 500
}
```

### Use cases

- **Pharmaceutical intelligence** — track competitive trials by drug or sponsor
- **Clinical research** — discover trials matching a specific patient profile
- **Health-tech startups** — surface relevant trials by condition or geography
- **Academic research** — bulk-export the trial landscape for a disease
- **Regulatory analysts** — monitor FDA-regulated trials by status and phase
- **Patient advocacy groups** — find recruiting studies for rare diseases
- **Biostatistics** — feed structured trial metadata into meta-analysis pipelines

### FAQ

**What is ClinicalTrials.gov?**  The world's largest publicly accessible registry of clinical trials, run by the US National Library of Medicine (NIH). It contains over half a million studies from 220+ countries, with information sourced from trial sponsors and investigators. See [clinicaltrials.gov](https://clinicaltrials.gov).

**Do I need an account or API key?**  No. The v2 REST API is fully public and free.

**How fresh is the data?**  Trial sponsors submit updates continuously; ClinicalTrials.gov re-indexes the API in near-real-time. Most records are updated within hours of sponsor submission.

**What's an NCT ID?**  A unique 11-character identifier (e.g., `NCT04280705`) assigned to every registered trial. Each NCT ID maps to one study record.

**What's the difference between `studyType` values?**  `INTERVENTIONAL` = traditional clinical trial with an assigned treatment; `OBSERVATIONAL` = researchers observe but don't assign treatment; `EXPANDED_ACCESS` = compassionate-use programs outside of a clinical trial.

**What do the phase labels mean?**  `EARLY_PHASE1` and `PHASE1` = first-in-human safety; `PHASE2` = efficacy + dosing; `PHASE3` = large-scale comparison vs. standard of care; `PHASE4` = post-marketing surveillance. `NA` = not applicable (e.g., observational studies, device trials).

**Why are some date fields like `2024-04` (no day) instead of `2024-04-15`?**  Some sponsors register their trials with month-precision dates. The actor preserves whatever precision the upstream record has.

**What's the difference between `startDate` and `studyFirstPostDate`?**  `startDate` is when participant enrollment begins; `studyFirstPostDate` is when the trial was first registered on ClinicalTrials.gov.

**How are locations structured?**  Each trial may run at multiple sites. The actor emits a flat `locations[]` array (with `facility`, `city`, `state`, `zip`, `country`, `lat`/`lon`) plus derived `locationCountries[]`, `locationCities[]`, and `locationCount` for quick filtering and aggregation.

**Can I filter by multiple phases at once?**  Yes — `phases` is an array. Selecting `["PHASE2", "PHASE3"]` returns trials in either phase (server-side OR).

**What if a study has no results posted yet?**  The `hasResults` field will be absent or `false`. Use `hasResults: true` in input to keep only studies with posted results.

**Are NCT-ID lookups deduplicated?**  Yes — duplicate IDs in the input list are silently merged.

**Does this actor respect ClinicalTrials.gov's terms?**  Yes. The actor sends a polite `User-Agent` header with a contact email, includes small inter-request delays, and uses the official public REST API. No bulk data dumps are produced — only the data the user explicitly queries.

# 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`).

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

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

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

Lead sponsor / organization name (e.g. `Pfizer`, `Mayo Clinic`, `NIH`). Use the exact registered lead-sponsor name as it appears on ClinicalTrials.gov — for example, `ModernaTX` (not `Moderna`), `Pfizer Inc.` (not `Pfizer`). Partial names may return 0 results — use the CT.gov website search to identify the exact registered name first.

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

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

## `status` (type: `string`):

Restrict to a single recruitment / overall status. Leave empty for no filter.

## `studyType` (type: `string`):

Restrict to a study type. Leave empty for no filter.

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

Restrict to one or more trial phases. Empty array = no filter.

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

Restrict to studies enrolling a specific sex. `ALL` matches studies open to any sex.

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

Restrict to studies enrolling one or more age groups. Empty = no filter.

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

Restrict to studies with a trial location in a specific country (matches `protocolSection.contactsLocationsModule.locations[].country`).

## `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.

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

Drop studies whose completion date is before this date.

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

Drop studies whose completion date is after this date.

## `hasResults` (type: `boolean`):

When enabled, only emit studies that have results posted on ClinicalTrials.gov. When disabled (default), all studies are returned regardless of results status.

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

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

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

Hard cap on emitted records.

## Actor input object example

```json
{
  "mode": "search",
  "searchQuery": "cancer immunotherapy",
  "nctIds": [],
  "phases": [],
  "ageGroups": [],
  "hasResults": false,
  "maxItems": 10
}
```

# 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",
    "nctIds": [],
    "phases": [],
    "ageGroups": [],
    "hasResults": false,
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/clinicaltrialsgov-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 = {
    "mode": "search",
    "searchQuery": "cancer immunotherapy",
    "nctIds": [],
    "phases": [],
    "ageGroups": [],
    "hasResults": False,
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/clinicaltrialsgov-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 '{
  "mode": "search",
  "searchQuery": "cancer immunotherapy",
  "nctIds": [],
  "phases": [],
  "ageGroups": [],
  "hasResults": false,
  "maxItems": 10
}' |
apify call crawlerbros/clinicaltrialsgov-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "ClinicalTrials.gov Scraper",
        "description": "Scrape the US government clinical-trial registry (500K+ studies). Search by condition, intervention, location, sponsor, or NCT ID; filter by status, phase, study type, demographics, country, and dates. Public REST API, no auth, no proxy.",
        "version": "1.0",
        "x-build-id": "g9Q91z3IUOHDMLBGa"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/crawlerbros~clinicaltrialsgov-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-crawlerbros-clinicaltrialsgov-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/crawlerbros~clinicaltrialsgov-scraper/runs": {
            "post": {
                "operationId": "runs-sync-crawlerbros-clinicaltrialsgov-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/crawlerbros~clinicaltrialsgov-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-crawlerbros-clinicaltrialsgov-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",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "search",
                            "byNctIds",
                            "byCondition",
                            "byIntervention",
                            "byLocation",
                            "bySponsor"
                        ],
                        "type": "string",
                        "description": "Which lookup axis to use.",
                        "default": "search"
                    },
                    "searchQuery": {
                        "title": "Search query (mode=search)",
                        "type": "string",
                        "description": "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.",
                        "default": "cancer immunotherapy"
                    },
                    "conditionQuery": {
                        "title": "Condition / disease (mode=byCondition)",
                        "type": "string",
                        "description": "Disease, condition, or medical term (e.g. `diabetes`, `breast cancer`, `Alzheimer disease`)."
                    },
                    "interventionQuery": {
                        "title": "Intervention / drug (mode=byIntervention)",
                        "type": "string",
                        "description": "Drug name, device, biological, or therapy (e.g. `metformin`, `pembrolizumab`, `CAR-T`)."
                    },
                    "locationQuery": {
                        "title": "Location (mode=byLocation)",
                        "type": "string",
                        "description": "Geographic location text (city, state, country) — e.g. `Boston`, `California`, `United States`."
                    },
                    "sponsorQuery": {
                        "title": "Lead sponsor (mode=bySponsor)",
                        "type": "string",
                        "description": "Lead sponsor / organization name (e.g. `Pfizer`, `Mayo Clinic`, `NIH`). Use the exact registered lead-sponsor name as it appears on ClinicalTrials.gov — for example, `ModernaTX` (not `Moderna`), `Pfizer Inc.` (not `Pfizer`). Partial names may return 0 results — use the CT.gov website search to identify the exact registered name first."
                    },
                    "nctIds": {
                        "title": "NCT IDs (mode=byNctIds)",
                        "type": "array",
                        "description": "List of NCT identifiers like `NCT04280705`. Full URLs (`https://clinicaltrials.gov/study/NCT...`) are also accepted.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "status": {
                        "title": "Overall status",
                        "enum": [
                            "",
                            "NOT_YET_RECRUITING",
                            "RECRUITING",
                            "ENROLLING_BY_INVITATION",
                            "ACTIVE_NOT_RECRUITING",
                            "SUSPENDED",
                            "TERMINATED",
                            "COMPLETED",
                            "WITHDRAWN",
                            "UNKNOWN",
                            "AVAILABLE",
                            "NO_LONGER_AVAILABLE",
                            "TEMPORARILY_NOT_AVAILABLE",
                            "APPROVED_FOR_MARKETING",
                            "WITHHELD"
                        ],
                        "type": "string",
                        "description": "Restrict to a single recruitment / overall status. Leave empty for no filter."
                    },
                    "studyType": {
                        "title": "Study type",
                        "enum": [
                            "",
                            "INTERVENTIONAL",
                            "OBSERVATIONAL",
                            "EXPANDED_ACCESS"
                        ],
                        "type": "string",
                        "description": "Restrict to a study type. Leave empty for no filter."
                    },
                    "phases": {
                        "title": "Phases",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Restrict to one or more trial phases. Empty array = no filter.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "EARLY_PHASE1",
                                "PHASE1",
                                "PHASE2",
                                "PHASE3",
                                "PHASE4",
                                "NA"
                            ],
                            "enumTitles": [
                                "Early Phase 1",
                                "Phase 1",
                                "Phase 2",
                                "Phase 3",
                                "Phase 4",
                                "Not Applicable"
                            ]
                        },
                        "default": []
                    },
                    "sex": {
                        "title": "Eligible sex",
                        "enum": [
                            "",
                            "ALL",
                            "MALE",
                            "FEMALE"
                        ],
                        "type": "string",
                        "description": "Restrict to studies enrolling a specific sex. `ALL` matches studies open to any sex."
                    },
                    "ageGroups": {
                        "title": "Age groups",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Restrict to studies enrolling one or more age groups. Empty = no filter.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "CHILD",
                                "ADULT",
                                "OLDER_ADULT"
                            ],
                            "enumTitles": [
                                "Child (birth-17)",
                                "Adult (18-64)",
                                "Older Adult (65+)"
                            ]
                        },
                        "default": []
                    },
                    "country": {
                        "title": "Country",
                        "enum": [
                            "",
                            "United States",
                            "Canada",
                            "United Kingdom",
                            "Germany",
                            "France",
                            "Italy",
                            "Spain",
                            "Netherlands",
                            "Belgium",
                            "Sweden",
                            "Norway",
                            "Denmark",
                            "Finland",
                            "Switzerland",
                            "Austria",
                            "Poland",
                            "Czechia",
                            "Hungary",
                            "Romania",
                            "Bulgaria",
                            "Greece",
                            "Portugal",
                            "Ireland",
                            "Iceland",
                            "Russia",
                            "Ukraine",
                            "Turkey",
                            "Israel",
                            "Saudi Arabia",
                            "United Arab Emirates",
                            "Egypt",
                            "South Africa",
                            "China",
                            "Japan",
                            "Korea, Republic of",
                            "Taiwan",
                            "Hong Kong",
                            "India",
                            "Pakistan",
                            "Bangladesh",
                            "Thailand",
                            "Vietnam",
                            "Indonesia",
                            "Malaysia",
                            "Singapore",
                            "Philippines",
                            "Australia",
                            "New Zealand",
                            "Mexico",
                            "Brazil",
                            "Argentina",
                            "Chile",
                            "Colombia",
                            "Peru"
                        ],
                        "type": "string",
                        "description": "Restrict to studies with a trial location in a specific country (matches `protocolSection.contactsLocationsModule.locations[].country`)."
                    },
                    "startDateFrom": {
                        "title": "Start date — from (YYYY or YYYY-MM-DD)",
                        "type": "string",
                        "description": "Drop studies that started before this date. ISO 8601 partial dates accepted (e.g. `2020`, `2020-01`, `2020-01-15`)."
                    },
                    "startDateTo": {
                        "title": "Start date — to (YYYY or YYYY-MM-DD)",
                        "type": "string",
                        "description": "Drop studies that started after this date."
                    },
                    "completionDateFrom": {
                        "title": "Completion date — from (YYYY or YYYY-MM-DD)",
                        "type": "string",
                        "description": "Drop studies whose completion date is before this date."
                    },
                    "completionDateTo": {
                        "title": "Completion date — to (YYYY or YYYY-MM-DD)",
                        "type": "string",
                        "description": "Drop studies whose completion date is after this date."
                    },
                    "hasResults": {
                        "title": "Only studies with posted results",
                        "type": "boolean",
                        "description": "When enabled, only emit studies that have results posted on ClinicalTrials.gov. When disabled (default), all studies are returned regardless of results status.",
                        "default": false
                    },
                    "containsKeyword": {
                        "title": "Contains keyword",
                        "type": "string",
                        "description": "Client-side filter: keep only records whose title, summary, eligibility, conditions, keywords, or interventions contain this substring (case-insensitive)."
                    },
                    "maxItems": {
                        "title": "Max items",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Hard cap on emitted records.",
                        "default": 50
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
