canonical: https://jentic.com/apis/clinicaltrials.gov/clinicaltrials

# ClinicalTrials.gov API

Search, filter, and retrieve clinical study records from the ClinicalTrials.gov database - the world's largest registry of clinical trials with over 500,000 studies across 220 countries. The v2 API provides 6 endpoints for full-text study search with field-level filtering, individual study retrieval by NCT ID, metadata inspection, and statistical queries. No authentication is required for public access.

## For AI agents

Search clinical trials by condition, intervention, or sponsor, retrieve individual study records by NCT ID, and query trial statistics from the ClinicalTrials.gov registry without authentication.

## Scope

Does not handle patient health records, trial enrollment submissions, or regulatory filings - use for clinical trial search, metadata retrieval, and statistical queries only.

## Capabilities

- Search clinical studies with full-text queries filtered by condition, intervention, sponsor, status, and location
- Retrieve complete study records by NCT identifier including protocol, eligibility criteria, and outcome measures
- Query available study field metadata to understand the data model and construct precise filters
- Get aggregate statistics on study counts by status, phase, or other field values
- Access field-level value distributions for analytical and reporting purposes
- Monitor API version and availability for integration health checks

## Use cases

### AI Agent Clinical Trial Discovery

AI agents search ClinicalTrials.gov through Jentic to match patients with eligible studies or generate research intelligence. An agent searches by intent, loads the studies endpoint schema, and executes queries with condition and location filters. Results return structured study records with eligibility criteria, contact information, and enrollment status - enabling automated patient-trial matching workflows.

Example prompt: Search for recruiting Phase 3 trials for 'non-small cell lung cancer' in the United States, then retrieve eligibility criteria for the top 3 results by enrollment count

### Clinical Trial Search and Filtering

Query the ClinicalTrials.gov database with full-text search combined with structured filters for study status (recruiting, completed, not yet recruiting), phase (1-4), intervention type, condition, sponsor, and geographic location. The GET /studies endpoint returns paginated results with customizable field selection, enabling precise research queries across over 500,000 registered studies.

Example prompt: Search for all recruiting studies with intervention type 'Drug' for condition 'Alzheimer Disease' in Phase 2 or Phase 3, limited to the first 20 results

### Individual Study Record Retrieval

Fetch complete study records by NCT identifier to access protocol details, eligibility criteria, primary and secondary outcome measures, study arms, intervention descriptions, and responsible party information. The GET /studies/{nctId} endpoint returns the full structured record for compliance review, patient eligibility assessment, or research portfolio tracking.

Example prompt: Retrieve the full study record for NCT04280705, extract the inclusion and exclusion criteria, and list the primary outcome measures with their time frames

### Research Analytics and Statistics

Generate aggregate statistics on clinical trial activity by querying study counts, field value distributions, and registration trends. The /stats/size endpoint provides total counts with filters applied, while /stats/fieldValues/{fieldName} returns value frequency distributions for any study field. Useful for market research, competitive intelligence, and regulatory landscape analysis.

Example prompt: Get the total count of studies with status 'Recruiting' and condition containing 'breast cancer', then retrieve the distribution of study phases for those results

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /studies | Search and filter clinical studies |
| GET | /studies/{nctId} | Get a study by NCT ID |
| GET | /studies/metadata | Get study field metadata |
| GET | /stats/size | Get study count statistics |
| GET | /stats/fieldValues/{fieldName} | Get field value distributions |
| GET | /version | Get API version information |

## Key resources

- **Studies** — Search, filter, and retrieve clinical study records with full protocol details
- **Metadata** — Inspect available study fields and data model for query construction
- **Statistics** — Aggregate counts and field value distributions for analytics

## Why Jentic

- **Setup:** Wiring the ClinicalTrials.gov API by hand means learning its study and stats endpoints, respecting its request-pacing guidance, and building your own query construction against clinicaltrials.gov/api/v2. Through Jentic you install once, import the ClinicalTrials.gov API from the API Directory, and your agent calls it, with no credential to configure since the service is public.
- **Permission scoping:** The ClinicalTrials.gov API is read-only and needs no credentials, so scope the agent to the operations it needs, such as searching studies or fetching study metadata. You choose that set, so it stays limited to the read operations you allow.
- **Credential handling:** The ClinicalTrials.gov API needs no credential, so there is nothing to store, and Jentic routes the call through the same execution flow as authenticated tools. No secret enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'find recruiting cancer trials' or 'get a study by NCT id', and Jentic returns the matching ClinicalTrials.gov operation with its filter parameter schema, so the agent constructs precise queries without browsing the reference docs.

## Related APIs

- **NLM Clinical Tables** — NLM lookup tables for medical conditions, drugs, and coding systems used in trial data
- **1upHealth API** — Patient health data aggregation for matching real patient records against trial eligibility
- **Healthcare.gov API** — Health insurance marketplace data for understanding coverage implications of trial participation

## FAQ

### Does the ClinicalTrials.gov API require authentication?

No. The ClinicalTrials.gov API v2 is publicly accessible without authentication. No API key, OAuth token, or registration is required. Through Jentic, agents can discover and call these endpoints immediately without any credential setup.

### Can I search for clinical trials by medical condition?

Yes. The GET /studies endpoint accepts a query.cond parameter for condition-based filtering. You can combine it with other filters like query.term for full-text search, filter.overallStatus for enrollment status, and filter.phase for trial phase. For example, query.cond=diabetes&filter.overallStatus=RECRUITING returns actively recruiting diabetes trials.

### What are the rate limits for the ClinicalTrials.gov API?

ClinicalTrials.gov does not enforce strict per-key rate limits since no authentication is required. However, the API documentation recommends limiting requests to 3 per second to avoid being blocked. Excessive automated queries may result in IP-based throttling.

### How do I retrieve a specific trial's eligibility criteria through Jentic?

Search Jentic for 'get clinical trial eligibility criteria' to discover the GET /studies/{nctId} endpoint. Provide the NCT identifier (e.g., NCT04280705) and the response includes eligibilityModule with inclusion/exclusion criteria, age limits, and gender restrictions. Install via pip install jentic and use the search-load-execute flow.

### Can I get statistics on how many trials exist for a condition?

Yes. The GET /stats/size endpoint returns the total count of studies matching your filters. For example, adding filter.condition=breast+cancer returns the count of breast cancer trials. The GET /stats/fieldValues/{fieldName} endpoint breaks down results by any field, such as phase distribution or sponsor frequency.

### What data fields are available in study records?

The GET /studies/metadata endpoint returns the complete data model with all available fields. Study records include identification (NCT ID, title, acronym), status, sponsor, conditions, interventions, outcome measures, eligibility criteria, study design, arms/groups, references, and results when available.

### Can I limit what my agent is allowed to do with the ClinicalTrials.gov API?

Yes. Because you run Jentic One yourself, your own rules decide which ClinicalTrials.gov operations your agent may call. The API is read-only and needs no credentials, so you can allow only the operations you need, such as searching studies with GET /studies or fetching study metadata with GET /studies/metadata, while withholding others like the /stats endpoints. That set stays limited to exactly the read operations you permit.
