{
  "data": {
    "id": "5Ue8ST2jyniIF4Q6c",
    "actId": "AJoBdPIUjsCSPo24p",
    "userId": "4BicJNfmk8uEe3GtT",
    "startedAt": "2026-11-22T12:56:19.520Z",
    "finishedAt": "2026-11-22T12:56:29.154Z",
    "status": "SUCCEEDED",
    "meta": {
      "origin": "CI"
    },
    "stats": {
      "durationMillis": 9564,
      "runTimeSecs": 9.564,
      "computeUnits": 0.010626666666666666,
      "imageSizeBytes": 319192576
    },
    "options": {
      "useCache": true,
      "betaPackages": false,
      "memoryMbytes": 4096,
      "diskMbytes": 8192
    },
    "createdByOrganizationMemberUserId": "chIfRjofLtMMYtdFe",
    "exitCode": 0,
    "inputSchema": "{\n  \"title\": \"ClinicalTrialsGov Scraper Input\",\n  \"description\": \"Scrape the US government clinical-trial registry (ClinicalTrials.gov v2 REST API). Search by free-text, condition, intervention, location, sponsor, or look up by NCT ID. Filter by status, phase, study type, demographic eligibility, country, and date ranges.\",\n  \"type\": \"object\",\n  \"schemaVersion\": 1,\n  \"properties\": {\n    \"mode\": {\n      \"title\": \"Mode\",\n      \"type\": \"string\",\n      \"description\": \"Which lookup axis to use.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"search\",\n        \"byNctIds\",\n        \"byCondition\",\n        \"byIntervention\",\n        \"byLocation\",\n        \"bySponsor\"\n      ],\n      \"enumTitles\": [\n        \"Free-text search\",\n        \"Lookup by NCT IDs\",\n        \"Browse by condition / disease\",\n        \"Browse by intervention / drug\",\n        \"Browse by location / country\",\n        \"Browse by lead sponsor\"\n      ],\n      \"default\": \"search\",\n      \"prefill\": \"search\"\n    },\n    \"searchQuery\": {\n      \"title\": \"Search query (mode=search)\",\n      \"type\": \"string\",\n      \"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.\",\n      \"editor\": \"textfield\",\n      \"default\": \"cancer immunotherapy\",\n      \"prefill\": \"cancer immunotherapy\"\n    },\n    \"conditionQuery\": {\n      \"title\": \"Condition / disease (mode=byCondition)\",\n      \"type\": \"string\",\n      \"description\": \"Disease, condition, or medical term (e.g. `diabetes`, `breast cancer`, `Alzheimer disease`).\",\n      \"editor\": \"textfield\"\n    },\n    \"interventionQuery\": {\n      \"title\": \"Intervention / drug (mode=byIntervention)\",\n      \"type\": \"string\",\n      \"description\": \"Drug name, device, biological, or therapy (e.g. `metformin`, `pembrolizumab`, `CAR-T`).\",\n      \"editor\": \"textfield\"\n    },\n    \"locationQuery\": {\n      \"title\": \"Location (mode=byLocation)\",\n      \"type\": \"string\",\n      \"description\": \"Geographic location text (city, state, country) — e.g. `Boston`, `California`, `United States`.\",\n      \"editor\": \"textfield\"\n    },\n    \"sponsorQuery\": {\n      \"title\": \"Lead sponsor (mode=bySponsor)\",\n      \"type\": \"string\",\n      \"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.\",\n      \"editor\": \"textfield\"\n    },\n    \"nctIds\": {\n      \"title\": \"NCT IDs (mode=byNctIds)\",\n      \"type\": \"array\",\n      \"description\": \"List of NCT identifiers like `NCT04280705`. Full URLs (`https://clinicaltrials.gov/study/NCT...`) are also accepted.\",\n      \"editor\": \"stringList\",\n      \"default\": [],\n      \"prefill\": []\n    },\n    \"status\": {\n      \"title\": \"Overall status\",\n      \"type\": \"string\",\n      \"description\": \"Restrict to a single recruitment / overall status. Leave empty for no filter.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"\",\n        \"NOT_YET_RECRUITING\",\n        \"RECRUITING\",\n        \"ENROLLING_BY_INVITATION\",\n        \"ACTIVE_NOT_RECRUITING\",\n        \"SUSPENDED\",\n        \"TERMINATED\",\n        \"COMPLETED\",\n        \"WITHDRAWN\",\n        \"UNKNOWN\",\n        \"AVAILABLE\",\n        \"NO_LONGER_AVAILABLE\",\n        \"TEMPORARILY_NOT_AVAILABLE\",\n        \"APPROVED_FOR_MARKETING\",\n        \"WITHHELD\"\n      ],\n      \"enumTitles\": [\n        \"Any status\",\n        \"Not yet recruiting\",\n        \"Recruiting\",\n        \"Enrolling by invitation\",\n        \"Active, not recruiting\",\n        \"Suspended\",\n        \"Terminated\",\n        \"Completed\",\n        \"Withdrawn\",\n        \"Unknown\",\n        \"Available (expanded access)\",\n        \"No longer available (expanded access)\",\n        \"Temporarily not available (expanded access)\",\n        \"Approved for marketing (expanded access)\",\n        \"Withheld\"\n      ]\n    },\n    \"studyType\": {\n      \"title\": \"Study type\",\n      \"type\": \"string\",\n      \"description\": \"Restrict to a study type. Leave empty for no filter.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"\",\n        \"INTERVENTIONAL\",\n        \"OBSERVATIONAL\",\n        \"EXPANDED_ACCESS\"\n      ],\n      \"enumTitles\": [\n        \"Any type\",\n        \"Interventional (clinical trial)\",\n        \"Observational\",\n        \"Expanded access (compassionate use)\"\n      ]\n    },\n    \"phases\": {\n      \"title\": \"Phases\",\n      \"type\": \"array\",\n      \"description\": \"Restrict to one or more trial phases. Empty array = no filter.\",\n      \"editor\": \"select\",\n      \"items\": {\n        \"type\": \"string\",\n        \"enum\": [\n          \"EARLY_PHASE1\",\n          \"PHASE1\",\n          \"PHASE2\",\n          \"PHASE3\",\n          \"PHASE4\",\n          \"NA\"\n        ],\n        \"enumTitles\": [\n          \"Early Phase 1\",\n          \"Phase 1\",\n          \"Phase 2\",\n          \"Phase 3\",\n          \"Phase 4\",\n          \"Not Applicable\"\n        ]\n      },\n      \"uniqueItems\": true,\n      \"default\": [],\n      \"prefill\": []\n    },\n    \"sex\": {\n      \"title\": \"Eligible sex\",\n      \"type\": \"string\",\n      \"description\": \"Restrict to studies enrolling a specific sex. `ALL` matches studies open to any sex.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"\",\n        \"ALL\",\n        \"MALE\",\n        \"FEMALE\"\n      ],\n      \"enumTitles\": [\n        \"Any\",\n        \"All sexes\",\n        \"Male only\",\n        \"Female only\"\n      ]\n    },\n    \"ageGroups\": {\n      \"title\": \"Age groups\",\n      \"type\": \"array\",\n      \"description\": \"Restrict to studies enrolling one or more age groups. Empty = no filter.\",\n      \"editor\": \"select\",\n      \"items\": {\n        \"type\": \"string\",\n        \"enum\": [\n          \"CHILD\",\n          \"ADULT\",\n          \"OLDER_ADULT\"\n        ],\n        \"enumTitles\": [\n          \"Child (birth-17)\",\n          \"Adult (18-64)\",\n          \"Older Adult (65+)\"\n        ]\n      },\n      \"uniqueItems\": true,\n      \"default\": [],\n      \"prefill\": []\n    },\n    \"country\": {\n      \"title\": \"Country\",\n      \"type\": \"string\",\n      \"description\": \"Restrict to studies with a trial location in a specific country (matches `protocolSection.contactsLocationsModule.locations[].country`).\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"\",\n        \"United States\",\n        \"Canada\",\n        \"United Kingdom\",\n        \"Germany\",\n        \"France\",\n        \"Italy\",\n        \"Spain\",\n        \"Netherlands\",\n        \"Belgium\",\n        \"Sweden\",\n        \"Norway\",\n        \"Denmark\",\n        \"Finland\",\n        \"Switzerland\",\n        \"Austria\",\n        \"Poland\",\n        \"Czechia\",\n        \"Hungary\",\n        \"Romania\",\n        \"Bulgaria\",\n        \"Greece\",\n        \"Portugal\",\n        \"Ireland\",\n        \"Iceland\",\n        \"Russia\",\n        \"Ukraine\",\n        \"Turkey\",\n        \"Israel\",\n        \"Saudi Arabia\",\n        \"United Arab Emirates\",\n        \"Egypt\",\n        \"South Africa\",\n        \"China\",\n        \"Japan\",\n        \"Korea, Republic of\",\n        \"Taiwan\",\n        \"Hong Kong\",\n        \"India\",\n        \"Pakistan\",\n        \"Bangladesh\",\n        \"Thailand\",\n        \"Vietnam\",\n        \"Indonesia\",\n        \"Malaysia\",\n        \"Singapore\",\n        \"Philippines\",\n        \"Australia\",\n        \"New Zealand\",\n        \"Mexico\",\n        \"Brazil\",\n        \"Argentina\",\n        \"Chile\",\n        \"Colombia\",\n        \"Peru\"\n      ],\n      \"enumTitles\": [\n        \"Any country\",\n        \"United States\",\n        \"Canada\",\n        \"United Kingdom\",\n        \"Germany\",\n        \"France\",\n        \"Italy\",\n        \"Spain\",\n        \"Netherlands\",\n        \"Belgium\",\n        \"Sweden\",\n        \"Norway\",\n        \"Denmark\",\n        \"Finland\",\n        \"Switzerland\",\n        \"Austria\",\n        \"Poland\",\n        \"Czechia\",\n        \"Hungary\",\n        \"Romania\",\n        \"Bulgaria\",\n        \"Greece\",\n        \"Portugal\",\n        \"Ireland\",\n        \"Iceland\",\n        \"Russia\",\n        \"Ukraine\",\n        \"Turkey\",\n        \"Israel\",\n        \"Saudi Arabia\",\n        \"United Arab Emirates\",\n        \"Egypt\",\n        \"South Africa\",\n        \"China\",\n        \"Japan\",\n        \"Korea, Republic of\",\n        \"Taiwan\",\n        \"Hong Kong\",\n        \"India\",\n        \"Pakistan\",\n        \"Bangladesh\",\n        \"Thailand\",\n        \"Vietnam\",\n        \"Indonesia\",\n        \"Malaysia\",\n        \"Singapore\",\n        \"Philippines\",\n        \"Australia\",\n        \"New Zealand\",\n        \"Mexico\",\n        \"Brazil\",\n        \"Argentina\",\n        \"Chile\",\n        \"Colombia\",\n        \"Peru\"\n      ]\n    },\n    \"startDateFrom\": {\n      \"title\": \"Start date — from (YYYY or YYYY-MM-DD)\",\n      \"type\": \"string\",\n      \"description\": \"Drop studies that started before this date. ISO 8601 partial dates accepted (e.g. `2020`, `2020-01`, `2020-01-15`).\",\n      \"editor\": \"textfield\"\n    },\n    \"startDateTo\": {\n      \"title\": \"Start date — to (YYYY or YYYY-MM-DD)\",\n      \"type\": \"string\",\n      \"description\": \"Drop studies that started after this date.\",\n      \"editor\": \"textfield\"\n    },\n    \"completionDateFrom\": {\n      \"title\": \"Completion date — from (YYYY or YYYY-MM-DD)\",\n      \"type\": \"string\",\n      \"description\": \"Drop studies whose completion date is before this date.\",\n      \"editor\": \"textfield\"\n    },\n    \"completionDateTo\": {\n      \"title\": \"Completion date — to (YYYY or YYYY-MM-DD)\",\n      \"type\": \"string\",\n      \"description\": \"Drop studies whose completion date is after this date.\",\n      \"editor\": \"textfield\"\n    },\n    \"hasResults\": {\n      \"title\": \"Only studies with posted results\",\n      \"type\": \"boolean\",\n      \"description\": \"When enabled, only emit studies that have results posted on ClinicalTrials.gov. When disabled (default), all studies are returned regardless of results status.\",\n      \"default\": false,\n      \"prefill\": false,\n      \"groupCaption\": \"Filters\"\n    },\n    \"containsKeyword\": {\n      \"title\": \"Contains keyword\",\n      \"type\": \"string\",\n      \"description\": \"Client-side filter: keep only records whose title, summary, eligibility, conditions, keywords, or interventions contain this substring (case-insensitive).\",\n      \"editor\": \"textfield\"\n    },\n    \"maxItems\": {\n      \"title\": \"Max items\",\n      \"type\": \"integer\",\n      \"description\": \"Hard cap on emitted records.\",\n      \"minimum\": 1,\n      \"maximum\": 5000,\n      \"default\": 50,\n      \"prefill\": 10\n    }\n  },\n  \"required\": [\n    \"mode\"\n  ]\n}",
    "readme": "# ClinicalTrials.gov Trial Registry & Eligibility Extractor\n\nScrape 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. No authentication, no cookies, no proxy required.\n\n## What this actor does\n\n- **Six modes**: `search`, `byNctIds`, `byCondition`, `byIntervention`, `byLocation`, `bySponsor`\n- **Core filters**: status, phase, study type, country\n- **Additional filters**: sex, age groups, start / completion date ranges, has-results, keyword substring\n- **Scales to thousands of records per run**, up to your `maxItems` cap\n- **Empty fields are omitted** — no `null`, `\"\"`, `[]`, or `{}` in the output\n\n## Output per study (sample)\n\n```json\n{\n  \"nctId\": \"NCT04280705\",\n  \"briefTitle\": \"Adaptive COVID-19 Treatment Trial (ACTT)\",\n  \"officialTitle\": \"A Multicenter, Adaptive, Randomized Blinded Controlled Trial...\",\n  \"organization\": \"National Institute of Allergy and Infectious Diseases (NIAID)\",\n  \"overallStatus\": \"COMPLETED\",\n  \"startDate\": \"2020-02-21\",\n  \"completionDate\": \"2020-05-21\",\n  \"leadSponsor\": \"National Institute of Allergy and Infectious Diseases (NIAID)\",\n  \"conditions\": [\"COVID-19\"],\n  \"keywords\": [\"Adaptive\", \"COVID-19\", \"Efficacy\", \"Multicenter\"],\n  \"studyType\": \"INTERVENTIONAL\",\n  \"phases\": [\"PHASE3\"],\n  \"enrollmentCount\": 1062,\n  \"allocation\": \"RANDOMIZED\",\n  \"interventionModel\": \"PARALLEL\",\n  \"primaryPurpose\": \"TREATMENT\",\n  \"interventionNames\": [\"Placebo\", \"Remdesivir\"],\n  \"interventionTypes\": [\"OTHER\", \"DRUG\"],\n  \"locationCountries\": [\"United States\", \"Japan\", \"Korea, Republic of\", \"...\"],\n  \"locationCount\": 73,\n  \"hasResults\": true,\n  \"studyUrl\": \"https://clinicaltrials.gov/study/NCT04280705\",\n  \"recordType\": \"clinicalTrial\",\n  \"scrapedAt\": \"2026-05-21T11:53:00+00:00\"\n}\n```\n\n### Available fields\n\n- **Identification**: `nctId`, `briefTitle`, `officialTitle`, `acronym`, `organization`, `organizationClass`, `orgStudyId`\n- **Status & dates**: `overallStatus`, `startDate`, `startDateType`, `primaryCompletionDate`, `completionDate`, `studyFirstSubmitDate`, `studyFirstPostDate`, `lastUpdateSubmitDate`, `lastUpdatePostDate`, `resultsFirstPostDate`, `statusVerifiedDate`, `hasExpandedAccess`\n- **Sponsors**: `leadSponsor`, `leadSponsorClass`, `collaborators[]`, `responsiblePartyType`, `responsiblePartyInvestigator`\n- **Oversight**: `isFdaRegulatedDrug`, `isFdaRegulatedDevice`, `hasDataMonitoringCommittee`\n- **Description**: `briefSummary`, `detailedDescription`\n- **Conditions**: `conditions[]`, `keywords[]`\n- **Design**: `studyType`, `phases[]`, `enrollmentCount`, `enrollmentType`, `allocation`, `interventionModel`, `primaryPurpose`, `masking`\n- **Arms / interventions**: `armGroups[]`, `interventions[]`, `interventionNames[]`, `interventionTypes[]`\n- **Eligibility**: `eligibilityCriteria`, `sex`, `minimumAge`, `maximumAge`, `standardAges[]`, `healthyVolunteers`\n- **Outcomes**: `primaryOutcomes[]`, `secondaryOutcomes[]`\n- **Locations**: `locations[]`, `locationCities[]`, `locationCountries[]`, `locationCount`, `overallOfficials[]`\n- **Results**: `hasResults`\n- **Derived**: `studyUrl`, `recordType`, `scrapedAt`\n\n## Input\n\n| Field | Type | Default | Description |\n|---|---|---|---|\n| `mode` | string | `search` | One of `search`, `byNctIds`, `byCondition`, `byIntervention`, `byLocation`, `bySponsor` |\n| `searchQuery` | string | `cancer immunotherapy` | Free-text query (mode=search; also fallback for other modes) |\n| `conditionQuery` | string | – | Disease / condition (mode=byCondition) |\n| `interventionQuery` | string | – | Drug / device / therapy (mode=byIntervention) |\n| `locationQuery` | string | – | Geographic text (mode=byLocation) |\n| `sponsorQuery` | string | – | Lead sponsor name (mode=bySponsor) |\n| `nctIds` | array | – | List of NCT IDs (mode=byNctIds) |\n| `status` | enum | – | Overall recruitment status (Recruiting, Completed, etc.) |\n| `studyType` | enum | – | Interventional / Observational / Expanded Access |\n| `phases` | array enum | – | One or more of Early Phase 1 / Phase 1 / Phase 2 / Phase 3 / Phase 4 / NA |\n| `sex` | enum | – | Eligible sex (All / Male / Female) |\n| `ageGroups` | array enum | – | One or more of Child / Adult / Older Adult |\n| `country` | enum | – | Country with a trial location |\n| `startDateFrom` / `startDateTo` | string | – | ISO date bounds for study start |\n| `completionDateFrom` / `completionDateTo` | string | – | ISO date bounds for completion |\n| `hasResults` | bool | `false` | Only studies with results posted |\n| `containsKeyword` | string | – | Case-insensitive substring filter |\n| `maxItems` | int | `50` | Hard cap (1–5000) |\n\n### Example: actively recruiting Phase 3 cancer trials in the US\n\n```json\n{\n  \"mode\": \"byCondition\",\n  \"conditionQuery\": \"breast cancer\",\n  \"status\": \"RECRUITING\",\n  \"phases\": [\"PHASE3\"],\n  \"country\": \"United States\",\n  \"maxItems\": 200\n}\n```\n\n### Example: lookup by NCT IDs\n\n```json\n{\n  \"mode\": \"byNctIds\",\n  \"nctIds\": [\"NCT04280705\", \"NCT03695107\", \"NCT04611802\"]\n}\n```\n\n### Example: every metformin trial since 2020 with results posted\n\n```json\n{\n  \"mode\": \"byIntervention\",\n  \"interventionQuery\": \"metformin\",\n  \"startDateFrom\": \"2020\",\n  \"hasResults\": true,\n  \"maxItems\": 500\n}\n```\n\n## Use cases\n\n- **Pharmaceutical intelligence** — track competitive trials by drug or sponsor\n- **Clinical research** — discover trials matching a specific patient profile\n- **Health-tech startups** — surface relevant trials by condition or geography\n- **Academic research** — bulk-export the trial landscape for a disease\n- **Regulatory analysts** — monitor FDA-regulated trials by status and phase\n- **Patient advocacy groups** — find recruiting studies for rare diseases\n- **Biostatistics** — feed structured trial metadata into meta-analysis pipelines\n\n## FAQ\n\n**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).\n\n**Do I need an account or API key?**  No. ClinicalTrials.gov's registry data is fully public and free to query.\n\n**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.\n\n**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.\n\n**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.\n\n**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).\n\n**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.\n\n**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.\n\n**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.\n\n**Can I filter by multiple phases at once?**  Yes — `phases` is an array. Selecting `[\"PHASE2\", \"PHASE3\"]` returns trials in either phase (server-side OR).\n\n**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.\n\n**Are NCT-ID lookups deduplicated?**  Yes — duplicate IDs in the input list are silently merged.\n\n**Does this actor respect ClinicalTrials.gov's terms?**  Yes. It only requests the data you explicitly query — no bulk dumps of the entire registry are produced.\n",
    "actorDefinition": {
      "actorSpecification": 1,
      "name": "clinicaltrials-gov-trial-registry-and-eligibility",
      "title": "ClinicalTrials.gov Trial Registry & Eligibility Extractor",
      "description": "Search the US clinical-trial registry (500K+ studies) by condition, intervention, location, sponsor, or NCT ID, with eligibility, demographic, status, phase and date filters. No login required.",
      "version": "1.0",
      "buildTag": "latest",
      "dockerfile": "./Dockerfile",
      "readme": "# ClinicalTrials.gov Trial Registry & Eligibility Extractor\n\nScrape 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. No authentication, no cookies, no proxy required.\n\n## What this actor does\n\n- **Six modes**: `search`, `byNctIds`, `byCondition`, `byIntervention`, `byLocation`, `bySponsor`\n- **Core filters**: status, phase, study type, country\n- **Additional filters**: sex, age groups, start / completion date ranges, has-results, keyword substring\n- **Scales to thousands of records per run**, up to your `maxItems` cap\n- **Empty fields are omitted** — no `null`, `\"\"`, `[]`, or `{}` in the output\n\n## Output per study (sample)\n\n```json\n{\n  \"nctId\": \"NCT04280705\",\n  \"briefTitle\": \"Adaptive COVID-19 Treatment Trial (ACTT)\",\n  \"officialTitle\": \"A Multicenter, Adaptive, Randomized Blinded Controlled Trial...\",\n  \"organization\": \"National Institute of Allergy and Infectious Diseases (NIAID)\",\n  \"overallStatus\": \"COMPLETED\",\n  \"startDate\": \"2020-02-21\",\n  \"completionDate\": \"2020-05-21\",\n  \"leadSponsor\": \"National Institute of Allergy and Infectious Diseases (NIAID)\",\n  \"conditions\": [\"COVID-19\"],\n  \"keywords\": [\"Adaptive\", \"COVID-19\", \"Efficacy\", \"Multicenter\"],\n  \"studyType\": \"INTERVENTIONAL\",\n  \"phases\": [\"PHASE3\"],\n  \"enrollmentCount\": 1062,\n  \"allocation\": \"RANDOMIZED\",\n  \"interventionModel\": \"PARALLEL\",\n  \"primaryPurpose\": \"TREATMENT\",\n  \"interventionNames\": [\"Placebo\", \"Remdesivir\"],\n  \"interventionTypes\": [\"OTHER\", \"DRUG\"],\n  \"locationCountries\": [\"United States\", \"Japan\", \"Korea, Republic of\", \"...\"],\n  \"locationCount\": 73,\n  \"hasResults\": true,\n  \"studyUrl\": \"https://clinicaltrials.gov/study/NCT04280705\",\n  \"recordType\": \"clinicalTrial\",\n  \"scrapedAt\": \"2026-05-21T11:53:00+00:00\"\n}\n```\n\n### Available fields\n\n- **Identification**: `nctId`, `briefTitle`, `officialTitle`, `acronym`, `organization`, `organizationClass`, `orgStudyId`\n- **Status & dates**: `overallStatus`, `startDate`, `startDateType`, `primaryCompletionDate`, `completionDate`, `studyFirstSubmitDate`, `studyFirstPostDate`, `lastUpdateSubmitDate`, `lastUpdatePostDate`, `resultsFirstPostDate`, `statusVerifiedDate`, `hasExpandedAccess`\n- **Sponsors**: `leadSponsor`, `leadSponsorClass`, `collaborators[]`, `responsiblePartyType`, `responsiblePartyInvestigator`\n- **Oversight**: `isFdaRegulatedDrug`, `isFdaRegulatedDevice`, `hasDataMonitoringCommittee`\n- **Description**: `briefSummary`, `detailedDescription`\n- **Conditions**: `conditions[]`, `keywords[]`\n- **Design**: `studyType`, `phases[]`, `enrollmentCount`, `enrollmentType`, `allocation`, `interventionModel`, `primaryPurpose`, `masking`\n- **Arms / interventions**: `armGroups[]`, `interventions[]`, `interventionNames[]`, `interventionTypes[]`\n- **Eligibility**: `eligibilityCriteria`, `sex`, `minimumAge`, `maximumAge`, `standardAges[]`, `healthyVolunteers`\n- **Outcomes**: `primaryOutcomes[]`, `secondaryOutcomes[]`\n- **Locations**: `locations[]`, `locationCities[]`, `locationCountries[]`, `locationCount`, `overallOfficials[]`\n- **Results**: `hasResults`\n- **Derived**: `studyUrl`, `recordType`, `scrapedAt`\n\n## Input\n\n| Field | Type | Default | Description |\n|---|---|---|---|\n| `mode` | string | `search` | One of `search`, `byNctIds`, `byCondition`, `byIntervention`, `byLocation`, `bySponsor` |\n| `searchQuery` | string | `cancer immunotherapy` | Free-text query (mode=search; also fallback for other modes) |\n| `conditionQuery` | string | – | Disease / condition (mode=byCondition) |\n| `interventionQuery` | string | – | Drug / device / therapy (mode=byIntervention) |\n| `locationQuery` | string | – | Geographic text (mode=byLocation) |\n| `sponsorQuery` | string | – | Lead sponsor name (mode=bySponsor) |\n| `nctIds` | array | – | List of NCT IDs (mode=byNctIds) |\n| `status` | enum | – | Overall recruitment status (Recruiting, Completed, etc.) |\n| `studyType` | enum | – | Interventional / Observational / Expanded Access |\n| `phases` | array enum | – | One or more of Early Phase 1 / Phase 1 / Phase 2 / Phase 3 / Phase 4 / NA |\n| `sex` | enum | – | Eligible sex (All / Male / Female) |\n| `ageGroups` | array enum | – | One or more of Child / Adult / Older Adult |\n| `country` | enum | – | Country with a trial location |\n| `startDateFrom` / `startDateTo` | string | – | ISO date bounds for study start |\n| `completionDateFrom` / `completionDateTo` | string | – | ISO date bounds for completion |\n| `hasResults` | bool | `false` | Only studies with results posted |\n| `containsKeyword` | string | – | Case-insensitive substring filter |\n| `maxItems` | int | `50` | Hard cap (1–5000) |\n\n### Example: actively recruiting Phase 3 cancer trials in the US\n\n```json\n{\n  \"mode\": \"byCondition\",\n  \"conditionQuery\": \"breast cancer\",\n  \"status\": \"RECRUITING\",\n  \"phases\": [\"PHASE3\"],\n  \"country\": \"United States\",\n  \"maxItems\": 200\n}\n```\n\n### Example: lookup by NCT IDs\n\n```json\n{\n  \"mode\": \"byNctIds\",\n  \"nctIds\": [\"NCT04280705\", \"NCT03695107\", \"NCT04611802\"]\n}\n```\n\n### Example: every metformin trial since 2020 with results posted\n\n```json\n{\n  \"mode\": \"byIntervention\",\n  \"interventionQuery\": \"metformin\",\n  \"startDateFrom\": \"2020\",\n  \"hasResults\": true,\n  \"maxItems\": 500\n}\n```\n\n## Use cases\n\n- **Pharmaceutical intelligence** — track competitive trials by drug or sponsor\n- **Clinical research** — discover trials matching a specific patient profile\n- **Health-tech startups** — surface relevant trials by condition or geography\n- **Academic research** — bulk-export the trial landscape for a disease\n- **Regulatory analysts** — monitor FDA-regulated trials by status and phase\n- **Patient advocacy groups** — find recruiting studies for rare diseases\n- **Biostatistics** — feed structured trial metadata into meta-analysis pipelines\n\n## FAQ\n\n**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).\n\n**Do I need an account or API key?**  No. ClinicalTrials.gov's registry data is fully public and free to query.\n\n**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.\n\n**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.\n\n**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.\n\n**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).\n\n**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.\n\n**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.\n\n**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.\n\n**Can I filter by multiple phases at once?**  Yes — `phases` is an array. Selecting `[\"PHASE2\", \"PHASE3\"]` returns trials in either phase (server-side OR).\n\n**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.\n\n**Are NCT-ID lookups deduplicated?**  Yes — duplicate IDs in the input list are silently merged.\n\n**Does this actor respect ClinicalTrials.gov's terms?**  Yes. It only requests the data you explicitly query — no bulk dumps of the entire registry are produced.\n",
      "input": {
        "title": "ClinicalTrialsGov Scraper Input",
        "description": "Scrape the US government clinical-trial registry (ClinicalTrials.gov v2 REST API). Search by free-text, condition, intervention, location, sponsor, or look up by NCT ID. Filter by status, phase, study type, demographic eligibility, country, and date ranges.",
        "type": "object",
        "schemaVersion": 1,
        "properties": {
          "mode": {
            "title": "Mode",
            "type": "string",
            "description": "Which lookup axis to use.",
            "editor": "select",
            "enum": [
              "search",
              "byNctIds",
              "byCondition",
              "byIntervention",
              "byLocation",
              "bySponsor"
            ],
            "enumTitles": [
              "Free-text search",
              "Lookup by NCT IDs",
              "Browse by condition / disease",
              "Browse by intervention / drug",
              "Browse by location / country",
              "Browse by lead sponsor"
            ],
            "default": "search",
            "prefill": "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.",
            "editor": "textfield",
            "default": "cancer immunotherapy",
            "prefill": "cancer immunotherapy"
          },
          "conditionQuery": {
            "title": "Condition / disease (mode=byCondition)",
            "type": "string",
            "description": "Disease, condition, or medical term (e.g. `diabetes`, `breast cancer`, `Alzheimer disease`).",
            "editor": "textfield"
          },
          "interventionQuery": {
            "title": "Intervention / drug (mode=byIntervention)",
            "type": "string",
            "description": "Drug name, device, biological, or therapy (e.g. `metformin`, `pembrolizumab`, `CAR-T`).",
            "editor": "textfield"
          },
          "locationQuery": {
            "title": "Location (mode=byLocation)",
            "type": "string",
            "description": "Geographic location text (city, state, country) — e.g. `Boston`, `California`, `United States`.",
            "editor": "textfield"
          },
          "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.",
            "editor": "textfield"
          },
          "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.",
            "editor": "stringList",
            "default": [],
            "prefill": []
          },
          "status": {
            "title": "Overall status",
            "type": "string",
            "description": "Restrict to a single recruitment / overall status. Leave empty for no filter.",
            "editor": "select",
            "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"
            ],
            "enumTitles": [
              "Any status",
              "Not yet recruiting",
              "Recruiting",
              "Enrolling by invitation",
              "Active, not recruiting",
              "Suspended",
              "Terminated",
              "Completed",
              "Withdrawn",
              "Unknown",
              "Available (expanded access)",
              "No longer available (expanded access)",
              "Temporarily not available (expanded access)",
              "Approved for marketing (expanded access)",
              "Withheld"
            ]
          },
          "studyType": {
            "title": "Study type",
            "type": "string",
            "description": "Restrict to a study type. Leave empty for no filter.",
            "editor": "select",
            "enum": [
              "",
              "INTERVENTIONAL",
              "OBSERVATIONAL",
              "EXPANDED_ACCESS"
            ],
            "enumTitles": [
              "Any type",
              "Interventional (clinical trial)",
              "Observational",
              "Expanded access (compassionate use)"
            ]
          },
          "phases": {
            "title": "Phases",
            "type": "array",
            "description": "Restrict to one or more trial phases. Empty array = no filter.",
            "editor": "select",
            "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"
              ]
            },
            "uniqueItems": true,
            "default": [],
            "prefill": []
          },
          "sex": {
            "title": "Eligible sex",
            "type": "string",
            "description": "Restrict to studies enrolling a specific sex. `ALL` matches studies open to any sex.",
            "editor": "select",
            "enum": [
              "",
              "ALL",
              "MALE",
              "FEMALE"
            ],
            "enumTitles": [
              "Any",
              "All sexes",
              "Male only",
              "Female only"
            ]
          },
          "ageGroups": {
            "title": "Age groups",
            "type": "array",
            "description": "Restrict to studies enrolling one or more age groups. Empty = no filter.",
            "editor": "select",
            "items": {
              "type": "string",
              "enum": [
                "CHILD",
                "ADULT",
                "OLDER_ADULT"
              ],
              "enumTitles": [
                "Child (birth-17)",
                "Adult (18-64)",
                "Older Adult (65+)"
              ]
            },
            "uniqueItems": true,
            "default": [],
            "prefill": []
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Restrict to studies with a trial location in a specific country (matches `protocolSection.contactsLocationsModule.locations[].country`).",
            "editor": "select",
            "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"
            ],
            "enumTitles": [
              "Any country",
              "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"
            ]
          },
          "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`).",
            "editor": "textfield"
          },
          "startDateTo": {
            "title": "Start date — to (YYYY or YYYY-MM-DD)",
            "type": "string",
            "description": "Drop studies that started after this date.",
            "editor": "textfield"
          },
          "completionDateFrom": {
            "title": "Completion date — from (YYYY or YYYY-MM-DD)",
            "type": "string",
            "description": "Drop studies whose completion date is before this date.",
            "editor": "textfield"
          },
          "completionDateTo": {
            "title": "Completion date — to (YYYY or YYYY-MM-DD)",
            "type": "string",
            "description": "Drop studies whose completion date is after this date.",
            "editor": "textfield"
          },
          "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,
            "prefill": false,
            "groupCaption": "Filters"
          },
          "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).",
            "editor": "textfield"
          },
          "maxItems": {
            "title": "Max items",
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "minimum": 1,
            "maximum": 5000,
            "default": 50,
            "prefill": 10
          }
        },
        "required": [
          "mode"
        ]
      },
      "output": {
        "actorOutputSchemaVersion": 1,
        "title": "ClinicalTrials.gov Trial Registry & Eligibility Extractor Output",
        "description": "Clinical trials from the US government ClinicalTrials.gov registry — NCT ID, title, conditions, interventions, eligibility, locations, outcomes, sponsors, status, and dates.",
        "properties": {
          "studies": {
            "type": "string",
            "title": "Clinical trial studies",
            "description": "Dataset containing all scraped clinical-trial records.",
            "template": "{{links.apiDefaultDatasetUrl}}/items"
          }
        }
      },
      "storages": {
        "dataset": {
          "actorSpecification": 1,
          "views": {
            "overview": {
              "title": "Clinical trials",
              "transformation": {
                "fields": [
                  "nctId",
                  "briefTitle",
                  "overallStatus",
                  "studyType",
                  "phases",
                  "leadSponsor",
                  "startDate",
                  "studyUrl"
                ]
              },
              "display": {
                "component": "table",
                "properties": {}
              }
            }
          }
        }
      },
      "environmentVariables": {}
    },
    "buildNumber": "1.0.1",
    "imageDigest": "b72115d9f2a079c7df9117084a7a828f79ecb8ae5374f3088eb83c08570e9718",
    "actVersion": {
      "sourceType": "SOURCE_FILES",
      "buildTag": "latest",
      "versionNumber": "1.0"
    },
    "usage": {
      "ACTOR_COMPUTE_UNITS": 0.010626666666666666
    }
  }
}