# ClinicalTrials.gov Studies Scraper (`grit-77/clinicaltrials-studies-scraper`) Actor

ClinicalTrials.gov studies scraper for condition, intervention and NCT ID searches. Export trial status, sponsors, eligibility, interventions and study locations as JSON.

- **URL**: https://apify.com/grit-77/clinicaltrials-studies-scraper.md
- **Developed by:** [Grit](https://apify.com/grit-77) (community)
- **Categories:** AI, Education
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 clinical studies

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Studies Scraper

ClinicalTrials.gov scraper returns public study records from the official registry API. Clinical trials API rows include study status, conditions, interventions, sponsors, dates, and registry links.

Combine condition, intervention, location, overall status, phase, study start date and last-update-posted date filters. Alternatively, look up a list of NCT IDs. Results include sponsors, enrollment, eligibility, interventions, study locations and outcome definitions, along with the original study URL and retrieval timestamp.

### What it returns

Each successful row has `rowType: "study"`. Missing top-level scalar values remain `null`; absent top-level lists are empty. Optional fields inside list entries can be `null`. Dates retain the precision published by the source, including `YYYY-MM` values. Enumerations such as `PHASE3` and `COMPLETED` keep the official API values.

| Field | Type | Example value |
|---|---|---|
| `rowType` | string | `"study"` |
| `nctId` | string | `"NCT06109311"` |
| `briefTitle` | string | `"A Study of Orforglipron (LY3502970) in Participants With Type 2 Diabetes and Inadequate Glycemic Control With Insulin Glargine, With or Without Metformin and/or SGLT-2 Inhibitor"` |
| `officialTitle` | string | `"A Phase 3, Randomized, Double-Blind Study to Investigate the Efficacy and Safety of Once Daily Oral Orforglipron Compared With Placebo in Adult Participants With Type 2 Diabetes and Inadequate Glycemic Control With Insulin Glargine, With or Without Metformin and/or SGLT-2 Inhibitor"` |
| `acronym` | string | `"ACHIEVE-5"` |
| `overallStatus` | string | `"COMPLETED"` |
| `lastKnownStatus` | null | `null` |
| `studyType` | string | `"INTERVENTIONAL"` |
| `phases` | array | `["PHASE3"]` |
| `conditions` | array | `["Type 2 Diabetes"]` |
| `interventions` | array | `[{"type": "DRUG", "name": "Orforglipron", "description": "Administered orally.", "otherNames": ["LY3502970"]}, {"type": "DRUG", "name": "Placebo", "description": "Administered orally.", "otherNames": null}]` |
| `leadSponsor` | string | `"Eli Lilly and Company"` |
| `leadSponsorClass` | string | `"INDUSTRY"` |
| `collaborators` | array | `[]` |
| `enrollmentCount` | integer | `546` |
| `enrollmentType` | string | `"ACTUAL"` |
| `hasResults` | boolean | `true` |
| `briefSummary` | string | `"The main purpose of this study is to determine the safety and efficacy of orforglipron. Participants will have Type 2 Diabetes (T2D) and have inadequate glycemic control with insulin glargine with or without metformin and/or SGLT-2 (sodium-glucose cotransporter-2) inhibitor. The study will last about 46 weeks and may include up to 20 visits."` |
| `eligibilityCriteria` | string | `"Inclusion Criteria:\n\n* Have Type 2 Diabetes (T2D)\n* Have HbA1c ≥7.0% \\[53 mmol/mol\\] to ≤10.5% \\[91 mmol/mol\\]\n* Have been treated with stable doses of the same formulation of the following for ≥90 days prior to screening visit 1 and have maintained the same doses through randomization:\n\n  * insulin glargine U-100 (100 U/mL) ≥0.25 U/kg/QD (units per kilogram per day) or ≥20 U/QD alone, or\n  * insulin glargine U-100 (100 U/mL) ≥0.25 U/kg/QD or ≥20 U/QD in combination with\n  * metformin, or\n  * SGLT-2 inhibitor, or\n  * both metformin and SGLT-2 inhibitor.\n* Are of stable body weight (±5%) for at least 90 days prior to screening visit 1 and agree to not initiate an intensive diet or exercise program during the study with the intent of reducing body weight, other than the lifestyle and/or dietary measures for diabetes treatment.\n* Have a Body Mass Index (BMI) ≥23.0 kg/m\\^2 at baseline.\n\nExclusion Criteria:\n\n* Have New York Heart Association functional classification III-IV congestive heart failure.\n* Have had any of the following cardiovascular conditions within 60 days prior to baseline.\n\n  * acute myocardial infarction\n  * cerebrovascular accident (stroke), or\n  * hospitalization for congestive heart failure.\n* Have acute or chronic hepatitis, including a history of autoimmune hepatitis, signs or symptoms of any other liver disease other than nonalcoholic fatty liver disease\n* Have had chronic or acute pancreatitis any time."` |
| `sex` | string | `"ALL"` |
| `minimumAge` | string | `"18 Years"` |
| `maximumAge` | string | `"18 Years"` |
| `healthyVolunteers` | boolean | `false` |
| `locations` | array | `[{"facility": "MD First Research - Chandler", "status": null, "city": "Chandler", "state": "Arizona", "zip": "85286", "country": "United States", "geoPoint": {"lat": 33.30616, "lon": -111.84125}}, {"facility": "Phoenix Clinical LLC", "status": null, "city": "Phoenix", "state": "Arizona", "zip": "85014", "country": "United States", "geoPoint": {"lat": 33.44838, "lon": -112.07404}}, {"facility": "SanRo Clinical Research Group", "status": null, "city": "Bryant", "state": "Arkansas", "zip": "72022", "country": "United States", "geoPoint": {"lat": 34.59593, "lon": -92.48905}}, {"facility": "Velocity Clinical Research, Gardena", "status": null, "city": "Gardena", "state": "California", "zip": "90247", "country": "United States", "geoPoint": {"lat": 33.88835, "lon": -118.30896}}, {"facility": "Loma Linda University Health System", "status": null, "city": "Loma Linda", "state": "California", "zip": "92350", "country": "United States", "geoPoint": {"lat": 34.04835, "lon": -117.26115}}, {"facility": "Western University of Health Sciences", "status": null, "city": "Pomona", "state": "California", "zip": "91766", "country": "United States", "geoPoint": {"lat": 34.05529, "lon": -117.75228}}, {"facility": "Med Partners, Inc. dba Premiere Medical Center of Burbank, Inc.", "status": null, "city": "Toluca Lake", "state": "California", "zip": "91602", "country": "United States", "geoPoint": {"lat": 34.15206, "lon": -118.35719}}, {"facility": "CMR of Greater New Haven, LLC", "status": null, "city": "Hamden", "state": "Connecticut", "zip": "06517", "country": "United States", "geoPoint": {"lat": 41.39593, "lon": -72.89677}}, {"facility": "Care Access - Brandon", "status": null, "city": "Brandon", "state": "Florida", "zip": "33510", "country": "United States", "geoPoint": {"lat": 27.9378, "lon": -82.28592}}, {"facility": "Encore Medical Research", "status": null, "city": "Hollywood", "state": "Florida", "zip": "33024", "country": "United States", "geoPoint": {"lat": 26.0112, "lon": -80.14949}}, {"facility": "Encore Medical Research - Weston", "status": null, "city": "Weston", "state": "Florida", "zip": "33331", "country": "United States", "geoPoint": {"lat": 26.10037, "lon": -80.39977}}, {"facility": "Orita Clinical Research", "status": null, "city": "Decatur", "state": "Georgia", "zip": "30034", "country": "United States", "geoPoint": {"lat": 33.77483, "lon": -84.29631}}, {"facility": "Bingham Memorial Hospital", "status": null, "city": "Blackfoot", "state": "Idaho", "zip": "83221", "country": "United States", "geoPoint": {"lat": 43.19047, "lon": -112.34498}}, {"facility": "St. Luke's Humphreys Diabetes Center: Boise", "status": null, "city": "Boise", "state": "Idaho", "zip": "83702", "country": "United States", "geoPoint": {"lat": 43.6135, "lon": -116.20345}}, {"facility": "Cotton O'Neil Diabetes & Endocrinology", "status": null, "city": "Topeka", "state": "Kansas", "zip": "66606", "country": "United States", "geoPoint": {"lat": 39.04833, "lon": -95.67804}}, {"facility": "The Research Group of Lexington", "status": null, "city": "Lexington", "state": "Kentucky", "zip": "40503", "country": "United States", "geoPoint": {"lat": 37.98869, "lon": -84.47772}}, {"facility": "Clinvest Headlands Llc", "status": null, "city": "Springfield", "state": "Missouri", "zip": "65807", "country": "United States", "geoPoint": {"lat": 37.21533, "lon": -93.29824}}, {"facility": "Richmond University Medical Center", "status": null, "city": "Staten Island", "state": "New York", "zip": "10310", "country": "United States", "geoPoint": {"lat": 40.56233, "lon": -74.13986}}, {"facility": "Velocity Clinical Research, Mt. Auburn", "status": null, "city": "Cincinnati", "state": "Ohio", "zip": "45219", "country": "United States", "geoPoint": {"lat": 39.12711, "lon": -84.51439}}, {"facility": "Velocity Clinical Research, Medford", "status": null, "city": "Medford", "state": "Oregon", "zip": "97504", "country": "United States", "geoPoint": {"lat": 42.32652, "lon": -122.87559}}, {"facility": "Tristar Clinical Investigations", "status": null, "city": "Philadelphia", "state": "Pennsylvania", "zip": "19114", "country": "United States", "geoPoint": {"lat": 39.95238, "lon": -75.16362}}, {"facility": "Frontier Clinical Research, LLC", "status": null, "city": "Scottdale", "state": "Pennsylvania", "zip": "15683", "country": "United States", "geoPoint": {"lat": 40.10035, "lon": -79.58698}}, {"facility": "Lifedoc Research - Lenox Park Drive", "status": null, "city": "Memphis", "state": "Tennessee", "zip": "38115", "country": "United States", "geoPoint": {"lat": 35.14953, "lon": -90.04898}}, {"facility": "Consano Clinical Research, LLC", "status": null, "city": "Shavano Park", "state": "Texas", "zip": "78231", "country": "United States", "geoPoint": {"lat": 29.58495, "lon": -98.55252}}, {"facility": "Texas Valley Clinical Research", "status": null, "city": "Weslaco", "state": "Texas", "zip": "78596", "country": "United States", "geoPoint": {"lat": 26.15952, "lon": -97.99084}}, {"facility": "CEDOES", "status": null, "city": "Vitória", "state": "Espírito Santo", "zip": "29055450", "country": "Brazil", "geoPoint": {"lat": -20.31944, "lon": -40.33778}}, {"facility": "L2IP - Instituto de Pesquisas Clínicas", "status": null, "city": "Brasília", "state": "Federal District", "zip": "70200730", "country": "Brazil", "geoPoint": {"lat": -15.77972, "lon": -47.92972}}, {"facility": "Quanta Diagnóstico e Terapia", "status": null, "city": "Curitiba", "state": "Paraná", "zip": "80040-110", "country": "Brazil", "geoPoint": {"lat": -25.42778, "lon": -49.27306}}, {"facility": "Insight Centro de Pesquisas", "status": null, "city": "Porto Alegre", "state": "Rio Grande do Sul", "zip": "90560-003", "country": "Brazil", "geoPoint": {"lat": -30.03283, "lon": -51.23019}}, {"facility": "Centro de Pesquisa Sao Lucas", "status": null, "city": "Campinas", "state": "São Paulo", "zip": "13060-803", "country": "Brazil", "geoPoint": {"lat": -22.90556, "lon": -47.06083}}, {"facility": "Centro Multidisciplinar de Estudos Clinicos", "status": null, "city": "São Bernardo do Campo", "state": "São Paulo", "zip": "09715-090", "country": "Brazil", "geoPoint": {"lat": -23.69389, "lon": -46.565}}, {"facility": "ISPEM - Instituto São José dos Campos em Pesquisas Médicas", "status": null, "city": "São José dos Campos", "state": "São Paulo", "zip": "12243-280", "country": "Brazil", "geoPoint": {"lat": -23.17944, "lon": -45.88694}}, {"facility": "IBPClin - Instituto Brasil de Pesquisa Clínica", "status": null, "city": "Rio de Janeiro", "state": null, "zip": "20241-180", "country": "Brazil", "geoPoint": {"lat": -22.90642, "lon": -43.18223}}, {"facility": "CPQuali Pesquisa Clínica", "status": null, "city": "São Paulo", "state": null, "zip": "01228-000", "country": "Brazil", "geoPoint": {"lat": -23.5475, "lon": -46.63611}}, {"facility": "The Second People's Hospital of Hefei", "status": null, "city": "Hefei", "state": "Anhui", "zip": "230011", "country": "China", "geoPoint": {"lat": 31.86389, "lon": 117.28083}}, {"facility": "Wannan Medical College Yijishan Hospital", "status": null, "city": "Wuhu", "state": "Anhui", "zip": "241001", "country": "China", "geoPoint": {"lat": 31.35259, "lon": 118.42947}}, {"facility": "Beijing Hospital", "status": null, "city": "Beijing", "state": "Beijing Municipality", "zip": "100051", "country": "China", "geoPoint": {"lat": 39.9075, "lon": 116.39723}}, {"facility": "Chongqing General Hospital", "status": null, "city": "Chongqing", "state": "Chongqing Municipality", "zip": "401147", "country": "China", "geoPoint": {"lat": 29.56026, "lon": 106.55771}}, {"facility": "The First Affiliated Hospital of Henan University of Science &Technology", "status": null, "city": "Luoyang Shi", "state": "Henan", "zip": "471003", "country": "China", "geoPoint": null}, {"facility": "The Second Affiliated Hospital of Zhengzhou University", "status": null, "city": "Zhengzhou", "state": "Henan", "zip": "450014", "country": "China", "geoPoint": {"lat": 34.75778, "lon": 113.64861}}, {"facility": "The Second Affiliated Hospital of Nanjing Medical University", "status": null, "city": "Nanjing", "state": "Jiangsu", "zip": "210011", "country": "China", "geoPoint": {"lat": 32.06167, "lon": 118.77778}}, {"facility": "Nanjing First Hospital", "status": null, "city": "Nanjing", "state": "Jiangsu", "zip": "210012", "country": "China", "geoPoint": {"lat": 32.06167, "lon": 118.77778}}, {"facility": "Affiliated Hospital of Jiangsu University", "status": null, "city": "Zhenjiang", "state": "Jiangsu", "zip": "212000", "country": "China", "geoPoint": {"lat": 32.21086, "lon": 119.45508}}, {"facility": "Jinan Central Hospital", "status": null, "city": "Jinan", "state": "Shandong", "zip": "250013", "country": "China", "geoPoint": {"lat": 36.66833, "lon": 116.99722}}, {"facility": "Tokuyama Clinic", "status": null, "city": "Mihama-ku,Chiba City", "state": "Chiba", "zip": "261-0004", "country": "Japan", "geoPoint": {"lat": 35.6, "lon": 140.11667}}, {"facility": "Hasegawa Medical Clinic", "status": null, "city": "Chitose", "state": "Hokkaido", "zip": "066-0032", "country": "Japan", "geoPoint": {"lat": 42.81944, "lon": 141.65222}}, {"facility": "MinamiAkatsukaClinic", "status": null, "city": "Mito", "state": "Ibaraki", "zip": "311-4153", "country": "Japan", "geoPoint": {"lat": 36.35, "lon": 140.45}}, {"facility": "Matoba Internal Medicine Clinic", "status": null, "city": "Ebina", "state": "Kanagawa", "zip": "243-0432", "country": "Japan", "geoPoint": {"lat": 35.38121, "lon": 139.39651}}, {"facility": "Takai Internal Medicine Clinic", "status": null, "city": "Kamakura-shi", "state": "Kanagawa", "zip": "247-0056", "country": "Japan", "geoPoint": null}, {"facility": "Shiraiwa Medical Clinic", "status": null, "city": "Kashihara", "state": "Osaka", "zip": "582-0005", "country": "Japan", "geoPoint": {"lat": 34.58333, "lon": 135.61667}}, {"facility": "The Institute of Medical Science, Asahi Life Foundation", "status": null, "city": "Chuo-ku", "state": "Tokyo", "zip": "103-0002", "country": "Japan", "geoPoint": null}, {"facility": "Tokyo-Eki Center-building Clinic", "status": null, "city": "Chuo-ku", "state": "Tokyo", "zip": "103-0027", "country": "Japan", "geoPoint": null}, {"facility": "Fukuwa Clinic", "status": null, "city": "Chuo-ku", "state": "Tokyo", "zip": "104-0031", "country": "Japan", "geoPoint": null}, {"facility": "Medical Corporation Sato Medical clinic", "status": null, "city": "Ootaku", "state": "Tokyo", "zip": "143-0015", "country": "Japan", "geoPoint": null}, {"facility": "Tama Center Clinic Mirai", "status": null, "city": "Tama", "state": "Tokyo", "zip": "206-0633", "country": "Japan", "geoPoint": {"lat": 35.6436, "lon": 139.46844}}, {"facility": "Jinnouchi Hospital", "status": null, "city": "Kumamoto", "state": null, "zip": "862-0976", "country": "Japan", "geoPoint": {"lat": 32.80589, "lon": 130.69181}}, {"facility": "Kansai Electric Power Hospital", "status": null, "city": "Osaka", "state": null, "zip": "553-0003", "country": "Japan", "geoPoint": {"lat": 34.69379, "lon": 135.50107}}, {"facility": "Abe Clinic", "status": null, "city": "Ōita", "state": null, "zip": "870-0039", "country": "Japan", "geoPoint": {"lat": 33.23333, "lon": 131.6}}, {"facility": "Centro de Endocrinologia y Nutricion", "status": null, "city": "Caguas", "state": null, "zip": "00725", "country": "Puerto Rico", "geoPoint": {"lat": 18.23412, "lon": -66.0485}}, {"facility": "FDI Clinical Research", "status": null, "city": "San Juan", "state": null, "zip": "00927", "country": "Puerto Rico", "geoPoint": {"lat": 18.46633, "lon": -66.10572}}, {"facility": "Diabdana", "status": null, "city": "Oradea", "state": "Bihor County", "zip": "410147", "country": "Romania", "geoPoint": {"lat": 47.0458, "lon": 21.91833}}, {"facility": "C.M.D.T.A. Neomed", "status": null, "city": "Brasov", "state": "Brașov County", "zip": "500283", "country": "Romania", "geoPoint": {"lat": 45.64861, "lon": 25.60613}}, {"facility": "Geea Medical Easy Diet", "status": null, "city": "Bucharest", "state": "Bucharest", "zip": "010627", "country": "Romania", "geoPoint": {"lat": 44.43225, "lon": 26.10626}}, {"facility": "Centrul Medical NutriLife", "status": null, "city": "Bucharest", "state": "Bucharest", "zip": "013764", "country": "Romania", "geoPoint": {"lat": 44.43225, "lon": 26.10626}}, {"facility": "Centrul Medical Endocrinologie si Diabet Dr. Paveliu", "status": null, "city": "Bucharest", "state": "Bucharest", "zip": "50538", "country": "Romania", "geoPoint": {"lat": 44.43225, "lon": 26.10626}}, {"facility": "CMI DNBM Dr. Pop Lavinia", "status": null, "city": "Baia Mare", "state": "Maramureş", "zip": "430222", "country": "Romania", "geoPoint": {"lat": 47.65729, "lon": 23.56808}}, {"facility": "SC Dentosim Queen SRL - Centrul Medical Diamed", "status": null, "city": "Târgu Mureş", "state": "Mureș County", "zip": "540098", "country": "Romania", "geoPoint": {"lat": 46.54245, "lon": 24.55747}}, {"facility": "Milena Sante", "status": null, "city": "Galați", "state": null, "zip": "800001", "country": "Romania", "geoPoint": {"lat": 45.52281, "lon": 23.06836}}, {"facility": "Diamed Obesity", "status": null, "city": "Galați", "state": null, "zip": "800291", "country": "Romania", "geoPoint": {"lat": 45.52281, "lon": 23.06836}}, {"facility": "Clinica Korall", "status": null, "city": "Satu Mare", "state": null, "zip": "440055", "country": "Romania", "geoPoint": {"lat": 47.79926, "lon": 22.86255}}]` |
| `primaryOutcomes` | array | `[{"measure": "Change From Baseline in Hemoglobin A1c (HbA1c)", "description": "Hemoglobin A1c (HbA1c) is the glycosylated fraction of hemoglobin A, measured to reflect average plasma glucose concentration over prolonged periods of time.\n\nValues represented under \"Least Squares (LS) Mean\" are model-based estimates (MBE) of the unconditional average treatment effect. MBE was calculated using a mixed-model repeated measures (MMRM) with analysis country, treatment by time, baseline by time by treatment, and strata by time by treatment in the model. Strata was defined by joint levels of baseline HbA1c (≤ \\[less than or equal to\\] 8.0%, \\> \\[greater than\\] 8.0%) and SGLT-2 inhibitor use at randomization \\[Yes or No\\]. Variance-covariance structure for change from baseline was unstructured.", "timeFrame": "Baseline, Week 40"}]` |
| `secondaryOutcomes` | array | `[{"measure": "Percentage of Participants With an HbA1c Target Value of < 7.0% (53 mmol/Mol)", "description": "Percentage of participants with an HbA1c target value of less than (\\<) 7.0% (53 millimoles per mole \\[mmol/mol\\]) was analysed by Logistic regression with analysis country, treatment by baseline and treatment by strata in the model. Strata were defined by joint levels of baseline HbA1c (≤8.0%, \\>8.0%) and SGLT-2 inhibitor use at randomization \\[Yes or No\\].", "timeFrame": "Week 40"}, {"measure": "Percentage of Participants With an HbA1c Target Value of < 6.5% (48 mmol/Mol)", "description": "Percentage of Participants with an HbA1c target value of less than or equal to (≤) 6.5% (48 mmol/mol) was analysed by Logistic regression with analysis country, treatment by baseline and treatment by strata in the model. Strata were defined by joint levels of baseline HbA1c (≤8.0%, \\>8.0%) and SGLT-2 inhibitor use at randomization \\[Yes or No\\].", "timeFrame": "Week 40"}, {"measure": "Change From Baseline in Fasting Serum Glucose (FSG)", "description": "Values represented under \"Least Squares (LS) Mean\" are model-based estimates (MBE) of the unconditional average treatment effect. MBE was calculated using a mixed-model repeated measures (MMRM) with analysis country, treatment by time, baseline by time by treatment, and strata by time by treatment in the model. Strata was defined by joint levels of baseline HbA1c (≤ \\[less than or equal to\\] 8.0%, \\> \\[greater than\\] 8.0%) and SGLT-2 inhibitor use at randomization \\[Yes or No\\]. Variance-covariance structure for change from baseline was unstructured.", "timeFrame": "Baseline, Week 40"}, {"measure": "Percent Change From Baseline in Body Weight", "description": "Values represented under \"LS Mean\" are model-based estimates (MBE) of the unconditional average treatment effect. MBE was calculated using a MMRM with analysis country, treatment by time, baseline by time by treatment, and strata by time by treatment in the model. Strata was defined by joint levels of baseline HbA1c (≤8.0%, \\>8.0%) and SGLT-2 inhibitor use at randomization \\[Yes or No\\]. Variance-covariance structure for change from baseline was unstructured.", "timeFrame": "Baseline, Week 40"}, {"measure": "Change From Baseline in Body Weight (kg)", "description": "Values represented under \"LS Mean\" are model-based estimates (MBE) of the unconditional average treatment effect. MBE was calculated using a MMRM with analysis country, treatment by time, baseline by time by treatment, and strata by time by treatment in the model. Strata was defined by joint levels of baseline HbA1c (≤8.0%, \\>8.0%) and SGLT-2 inhibitor use at randomization \\[Yes or No\\]. Variance-covariance structure for change from baseline was unstructured.", "timeFrame": "Baseline, Week 40"}, {"measure": "Percent Change From Baseline in Non-HDL (Non-high-density Lipoprotein) Cholesterol", "description": "Values represented under \"LS Mean\" are model-based estimates (MBE) of the unconditional average treatment effect. MBE was calculated using a mixed-model repeated measures (MMRM) with analysis country, treatment by time, baseline by time by treatment, and strata by time by treatment in the model. Strata were defined by joint levels of baseline HbA1c (≤8.0%, \\>8.0%) and SGLT-2 inhibitor use at randomization \\[Yes or No\\]. Variance-covariance structure for change from baseline was unstructured.", "timeFrame": "Baseline, Week 40"}, {"measure": "Percent Change From Baseline in Triglycerides", "description": "Values represented under \"LS Mean\" are model-based estimates (MBE) of the unconditional average treatment effect. MBE was calculated using a mixed-model repeated measures (MMRM) with analysis country, treatment by time, baseline by time by treatment, and strata by time by treatment in the model. Strata were defined by joint levels of baseline HbA1c (≤8.0%, \\>8.0%) and SGLT-2 inhibitor use at randomization \\[Yes or No\\]. Variance-covariance structure for change from baseline was unstructured.", "timeFrame": "Baseline, Week 40"}, {"measure": "Change From Baseline in Systolic Blood Pressure (mmHg)", "description": "Values represented under \"LS Mean\" are model-based estimates (MBE) of the unconditional average treatment effect. MBE was calculated using a MMRM with analysis country, treatment by time, baseline by time by treatment, and strata by time by treatment in the model. Strata was defined by joint levels of baseline HbA1c (≤8.0%, \\>8.0%) and SGLT-2 inhibitor use at randomization \\[Yes or No\\]. Variance-covariance structure for change from baseline was unstructured.", "timeFrame": "Baseline, Week 40"}, {"measure": "Change From Baseline in Daily Insulin Glargine Dose (IU/Day)", "description": "Values represented under \"LS Mean\" are model-based estimates (MBE) of the unconditional average treatment effect. MBE was calculated using a mixed-model repeated measures (MMRM) with analysis country, treatment by time, baseline by time by treatment, and strata by time by treatment in the model. Strata were defined by joint levels of baseline HbA1c (≤8.0%, \\>8.0%) and SGLT-2 inhibitor use at randomization \\[Yes or No\\]. Variance-covariance structure for change from baseline was unstructured.", "timeFrame": "Baseline, Week 40"}, {"measure": "Percentage of Participants With Greater Than or Equal to (≥) 5% Body Weight Reduction", "description": "Percentage of participants with ≥5% body weight reduction was analysed by Logistic regression with analysis country, treatment by baseline and treatment by strata in the model. Strata were defined by joint levels of baseline HbA1c (≤8.0%, \\>8.0%) and SGLT-2 inhibitor use at randomization \\[Yes or No\\].", "timeFrame": "Week 40"}, {"measure": "Percentage of Participants With Greater Than or Equal to (≥) 10% Body Weight Reduction", "description": "Percentage of participants with ≥10% body weight reduction was analysed by Logistic regression with analysis country, treatment by baseline and treatment by strata in the model. Strata were defined by joint levels of baseline HbA1c (≤8.0%, \\>8.0%) and SGLT-2 inhibitor use at randomization \\[Yes or No\\].", "timeFrame": "Week 40"}, {"measure": "Percentage of Participants With Greater Than or Equal to (≥) 15% Body Weight Reduction", "description": "Percentage of participants with ≥15% body weight reduction was analysed by Logistic regression with analysis country, treatment by baseline and treatment by strata in the model. Strata were defined by joint levels of baseline HbA1c (≤8.0%, \\>8.0%) and SGLT-2 inhibitor use at randomization \\[Yes or No\\].", "timeFrame": "Week 40"}, {"measure": "Change From Baseline in Short Form-36 Health Survey Version 2 (SF-36v2) Acute Form (Physical-Component and Mental-Component) Scores", "description": "The SF-36v2 is a participant-reported measure designed to assess health status using 36 items across 8 domains: Physical Functioning, Role-Physical, Bodily Pain, General Health, Vitality, Social Functioning, Role-Emotional, and Mental Health. The physical functioning domain assesses limitations due to health \"now,\" whereas the remaining domains assess functioning \"in the past week.\" Each domain is scored individually, and information from these 8 domains is aggregated into 2 health component summary scores, the Physical Component Summary and Mental Component Summary. Items are answered on Likert scales of varying lengths (3-point, 5-point, or 6-point scales). Scoring of each domain and both summary scores are norm based and presented in the form of T-scores, with a mean of 50 and a standard deviation of 10. Higher scores indicate better levels of function and/or better health. Range cannot be specified in norm-based scores.", "timeFrame": "Baseline, Week 40"}]` |
| `studyUrl` | string | `"https://clinicaltrials.gov/study/NCT06109311"` |
| `retrievedAt` | string | `"2026-10-05T12:05:36.818640+00:00"` |
| `errors` | array | `[]` |
| `startDate` | string | `"2023-11-10"` |
| `startDateType` | string | `"ACTUAL"` |
| `primaryCompletionDate` | string | `"2025-09-15"` |
| `primaryCompletionDateType` | string | `"ACTUAL"` |
| `completionDate` | string | `"2025-09-15"` |
| `completionDateType` | string | `"ACTUAL"` |
| `firstPostDate` | string | `"2023-10-31"` |
| `firstPostDateType` | string | `"ACTUAL"` |
| `lastUpdatePostDate` | string | `"2026-10-01"` |
| `lastUpdatePostDateType` | string | `"ACTUAL"` |

Error rows contain `rowType`, `nctId` when known, `studyUrl` when valid, `retrievedAt` and `errors`. They do not trigger the custom `study` event. A `SUMMARY` key-value record reports counts, duration, budget exhaustion and whether a search was incomplete.

### Input example

```json
{
  "condition": "diabetes",
  "maxItems": 10
}
```

Use the input schema for the remaining filters and defaults.

### Output example

This is a selected-field excerpt of the first object in [sample_output.json](sample_output.json).

```json
{
  "rowType": "study",
  "nctId": "NCT06109311",
  "acronym": "ACHIEVE-5",
  "overallStatus": "COMPLETED",
  "lastKnownStatus": null,
  "studyType": "INTERVENTIONAL",
  "phases": [
    "PHASE3"
  ],
  "conditions": [
    "Type 2 Diabetes"
  ],
  "leadSponsor": "Eli Lilly and Company",
  "leadSponsorClass": "INDUSTRY",
  "collaborators": [],
  "enrollmentCount": 546,
  "enrollmentType": "ACTUAL",
  "hasResults": true
}
```

### Pricing

Proposed custom price: **$0.002 per successful `study` event**, or **$2.00 for 1,000 successful studies**. No custom study charge for errors, duplicates or items excluded by `maxItems`. This is below the saved result-event prices of the most-used comparable returned in the 2026-10-05 Store search, [parseforge/clinicaltrials-scraper](https://apify.com/parseforge/clinicaltrials-scraper): $0.008–$0.012 by subscription tier. See `PRICING.md` for receipts, synthetic-event settings and possible separate platform costs. The owner configures final pricing in Apify Console before publication.

### Limits and reliability

- `maxItems` defaults to 100, accepts 1–100,000 and caps all dataset rows, including errors. Empty search filters browse the latest updated studies within that cap.
- `pageSize` defaults to 100, accepts 1–1,000 and is reduced to the remaining cap. Search pages are fetched sequentially using official continuation tokens.
- `concurrency` defaults to 4 and accepts 1–10 for direct ID requests. Search pagination makes one request at a time.
- Each request has a 30-second timeout. Transport failures, HTTP 429 and HTTP 5xx get bounded retries with backoff and a bounded `Retry-After` wait. Permanent HTTP errors produce diagnostics rather than repeated requests.
- An exhausted search-page request retains a diagnostic row and marks the run failed/incomplete so partial data is visible. Individual lookup or malformed-record errors do not discard other results.
- Source records may be outdated or incomplete. Location text is a registry search, not a geographic-radius filter. Registry pagination is not a guaranteed immutable snapshot.

### FAQ

**What limits the output?** The maxItems input caps output rows; its schema maximum is 100,000. Source availability and errors may yield fewer rows.

**Does it need a proxy, login, or API key?** The actor calls the public ClinicalTrials.gov API without an upstream key or proxy input.

**How is it priced?** The study-event proposal in PRICING.md applies to successfully saved study rows. Check the published Store configuration and platform charges for the active cost.

**What happens on rate limits?** The client retries throttling and transient server failures with backoff and Retry-After. Exhausted requests are reported.

**How fresh is the data?** Rows reflect the registry response at run time. Registry update dates and retrievedAt serve different purposes.

**Does it decide patient eligibility?** No. It exports registry eligibility text and status for review, without a patient-specific decision.

### Use with AI agents / MCP

An AI agent can call a published actor through the Apify MCP server or Apify API, pass the JSON input, then read the run’s default dataset. Check the actor’s published identifier and permissions in your Apify account.

After the owner publishes the actor, expose its published actor ID through the [Apify MCP server](https://docs.apify.com/integrations/mcp). An authorized agent can run it with the input above, read the dataset link from the output schema, and compare studies by condition, sponsor, phase or update date. Include a small `maxItems` and a run budget. Use `nctId`, `studyUrl`, `retrievedAt`, `errors` and `SUMMARY.incomplete` when grounding agent answers. The MCP integration itself has not been exercised in this local build.

### Local development

The delivered build uses `apify` and `httpx` from the existing shared venv; no package was installed into it. Put input at `storage/key_value_stores/default/INPUT.json`, then run from this actor directory without the Apify CLI:

```powershell
$env:APIFY_LOCAL_STORAGE_DIR = "$PWD/storage"
& C:/GritWork/earn/.venv/Scripts/python -m src
```

Use fresh storage for an independent run; retained dataset rows otherwise remain on disk. The proof harness creates fresh probe directories and preserves earlier sample storage.

```powershell
& C:/GritWork/earn/.venv/Scripts/python -m pytest -q tests/test_config.py tests/test_normalize.py tests/test_client.py tests/test_runtime.py -p no:cacheprovider
& C:/GritWork/earn/.venv/Scripts/python -m pytest -q -m live -p no:cacheprovider
apify validate-schema
& C:/GritWork/earn/.venv/Scripts/python tools/prove.py
```

The Dockerfile uses `apify/actor-python:3.12`. Docker execution and Apify cloud billing/publication are separate owner-side checks; Docker is unavailable in the local verification environment. Official API reference: [ClinicalTrials.gov REST API](https://clinicaltrials.gov/data-api/api).

# Actor input Schema

## `condition` (type: `string`):

ClinicalTrials.gov condition search, for example diabetes or lung cancer. Search syntax is passed through to the official API.

## `intervention` (type: `string`):

Drug, device or treatment, for example insulin. Combined with other search filters.

## `location` (type: `string`):

Facility, city, state or country, for example United States. Text search across study locations, not a distance filter.

## `query` (type: `string`):

Official other-terms search expression. Supports ClinicalTrials.gov query syntax such as AREA\[NCTId]NCT01766362.

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

Match any selected overall study status. Empty means any status.

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

Match any selected phase. A combined PHASE1/PHASE2 trial matches either phase. NA means not applicable; empty means any phase.

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

Inclusive lower bound, YYYY-MM-DD. Leave blank for no lower bound.

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

Inclusive upper bound, YYYY-MM-DD. Leave blank for no upper bound.

## `updatedFrom` (type: `string`):

Inclusive last-update-posted lower bound, YYYY-MM-DD. Applies to the public posting date, not the submission date.

## `updatedTo` (type: `string`):

Inclusive last-update-posted upper bound, YYYY-MM-DD.

## `studyIds` (type: `array`):

Optional NCT IDs, for example NCT01766362. Cannot be combined with search filters. Trimmed, uppercased and deduplicated; missing or malformed IDs produce uncharged error rows.

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

Hard cap on dataset rows, including errors. Successful rows trigger one study event each. Default 100.

## `pageSize` (type: `integer`):

Studies requested per API page, also bounded by remaining maxItems. Search pages are fetched sequentially.

## `concurrency` (type: `integer`):

Maximum simultaneous API requests in studyIds mode. Search pagination uses one request at a time.

## Actor input object example

```json
{
  "condition": "diabetes",
  "statuses": [],
  "phases": [],
  "studyIds": [],
  "maxItems": 100,
  "pageSize": 100,
  "concurrency": 4
}
```

# Actor output Schema

## `dataset` (type: `string`):

Download the study rows from the default dataset.

# 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 = {
    "condition": "diabetes"
};

// Run the Actor and wait for it to finish
const run = await client.actor("grit-77/clinicaltrials-studies-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 = { "condition": "diabetes" }

# Run the Actor and wait for it to finish
run = client.actor("grit-77/clinicaltrials-studies-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "condition": "diabetes"
}' |
apify call grit-77/clinicaltrials-studies-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,grit-77/clinicaltrials-studies-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/aExVvKIfuVEUiKeKd/builds/fZ8GtdagfuyIcQict/openapi.json
