clinicaltrials.gov APIclinicaltrials.gov ↗
Access clinical trial data from ClinicalTrials.gov: search studies by condition or intervention, retrieve full protocols, results, eligibility, metadata, and stats.
curl -X GET 'https://api.parse.bot/scraper/5119bcad-b856-44f8-8ee6-bfe31e079b44/search_studies?pageSize=2&query_cond=cancer&query_term=diabetes' \ -H 'X-API-Key: $PARSE_API_KEY'
Search for clinical trials with extensive filtering and pagination. Supports condition, intervention, status, and more. Returns paginated results with a nextPageToken for cursor-based pagination.
| Param | Type | Description |
|---|---|---|
| sort | string | Sort order (e.g. '@relevance' or field name with :asc/:desc such as 'LastUpdatePostDate:desc') |
| fields | string | Comma-separated list of fields to return (e.g. 'NCTId,BriefTitle') |
| format | string | Response format: 'json' or 'csv' |
| pageSize | integer | Number of results per page (max 1000) |
| pageToken | string | Token for next page of results, obtained from a previous response's nextPageToken |
| query_cond | string | Search by condition or disease (e.g. 'diabetes', 'cancer') |
| query_intr | string | Search by intervention or treatment (e.g. 'aspirin') |
| query_term | string | General search terms |
| filter_advanced | string | Advanced filter expression using Essie expression syntax |
| filter_overallstatus | string | Filter by study status (e.g. 'RECRUITING', 'COMPLETED', 'ACTIVE_NOT_RECRUITING') |
{
"type": "object",
"fields": {
"studies": "array of study objects containing protocolSection, derivedSection, and hasResults",
"totalCount": "integer total number of matching studies",
"nextPageToken": "string pagination token for next page, absent on last page"
},
"sample": {
"data": {
"studies": [
{
"hasResults": false,
"derivedSection": {
"miscInfoModule": {
"versionHolder": "2026-05-13"
}
},
"protocolSection": {
"identificationModule": {
"nctId": "NCT05421780",
"briefTitle": "Post-prandial Glycaemic Controlling Effects of BSG in Singapore Adults With Metabolic Syndrome"
}
}
}
],
"totalCount": 25000,
"nextPageToken": "ZVJj7o2Elu8o3lp1D828oarumpOQJJxuZ_Gp"
},
"status": "success"
}
}About the clinicaltrials.gov API
This API exposes 8 endpoints covering the full ClinicalTrials.gov study registry, from searching trials by condition or intervention to retrieving complete protocol and results data for a single NCT ID. The search_studies endpoint supports filtering by condition, intervention, and trial status with cursor-based pagination, while get_study returns the complete protocol section, eligibility criteria, outcome measures, adverse events, and participant flow for any registered trial.
Study Search and Retrieval
The search_studies endpoint accepts parameters including query_cond (condition or disease), query_intr (intervention or treatment), query_term (general terms), sort, and pageSize (up to 1000 per page). Results include an array of study objects — each with a protocolSection, derivedSection, and hasResults flag — plus a totalCount and a nextPageToken for cursor-based pagination. For a complete single-study record, get_study takes an NCT ID and returns the full protocolSection (identification, status, sponsor, description, design, outcomes, eligibility, contacts) and, when available, a resultsSection containing participant flow, baseline characteristics, outcome measures, and adverse events.
Bulk Retrieval and Metadata
The list_all_studies endpoint handles multi-page bulk retrieval automatically, accepting a limit and optional fields list, and returning the studies array alongside a total_returned count. For schema exploration, get_studies_metadata returns the full hierarchical field model — every field name, type, source type, title, and nested children — so you can identify exactly which fields to request. get_search_areas maps query parameters to underlying data fields and their weights, useful for understanding how query_cond or query_intr translate to indexed fields.
Enumerations and Database Statistics
get_enums returns all valid values for categorical fields (e.g. trial status, phase, sponsor type), each entry listing the enum type name, accepted values array, and the field names that use it — essential for building validated filter UIs. get_stats_size gives aggregate database statistics: total study count, average record size in bytes, percentile distribution, size ranges with per-range study counts, and the largest studies by NCT ID. get_api_version returns the current API version string and a dataTimestamp ISO timestamp indicating when the underlying data was last refreshed.
- Search open clinical trials for a specific disease using
query_condto surface recruiting studies for patient-matching applications - Pull full eligibility criteria and outcome measures from
get_studyto build structured trial-matching pipelines - Enumerate valid trial phase and status values via
get_enumsto populate validated filter dropdowns in research tools - Bulk export trial records with
list_all_studiesand specifiedfieldsfor offline analysis or database seeding - Monitor database freshness by polling
get_api_versionfordataTimestampchanges before triggering downstream sync jobs - Analyze study size distribution using
get_stats_sizepercentiles andlargestStudiesfor database capacity planning - Explore the data model with
get_studies_metadatato map available fields before constructing targeted field-subset queries
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does ClinicalTrials.gov have an official developer API?+
list_all_studies for automatic pagination.What does `get_study` return for a trial that has posted results?+
hasResults is true, the response includes a resultsSection alongside the standard protocolSection and derivedSection. The resultsSection contains participant flow, baseline characteristics, outcome measures with their data tables, and adverse event summaries. When hasResults is false, resultsSection is absent.How does pagination work across `search_studies` and `list_all_studies`?+
search_studies uses cursor-based pagination: each response includes a nextPageToken string that you pass as the pageToken parameter on the next request. The token is absent on the final page. list_all_studies handles this cursor loop automatically up to the limit you specify, returning a flat studies array and a total_returned count.Can I filter search results by geographic location or trial site country?+
search_studies endpoint exposes query_cond, query_intr, and query_term as text search parameters, along with sort and field selection. Location-based filtering is not a dedicated parameter in the current endpoint set. You can fork the API on Parse and revise it to add location-specific query parameters if your use case requires geographic filtering.