Skip to content

ClinicalTrials Study Search

Searches ClinicalTrials.gov (API v2) for studies matching a condition/disease and optional filters. Returns either a JSON-formatted list of studies plus metadata, or raw CSV content with basic metadata. Supports additional query terms (e.g., location, title, sponsor) and filters (e.g., overall status, IDs) with sorting and an option to request total counts.
Preview

Usage

Use this node to retrieve clinical trial studies for a given condition or disease, optionally refining results by location, title/acronym, interventions, outcomes, sponsors, study IDs, or overall status. Typical workflow: provide a condition (e.g., 'diabetes'), choose output format (JSON recommended), optionally specify fields to include, add filters and sorting, then pass results to downstream nodes for parsing, display, or analysis.

Inputs

FieldRequiredTypeDescriptionExample
condition_or_diseaseTrueSTRINGPrimary search query for conditions or diseases. Mapped to query.cond.type 2 diabetes
formatTrueSTRINGResponse format. JSON returns structured results; CSV returns raw text.json
fieldsFalseSTRINGComma-separated list of fields to include in the response. Applied when supported by the API.protocolSection.identificationModule.briefTitle,protocolSection.statusModule.overallStatus
sortFalseSTRINGSort order for results. Defaults to relevance.@relevance
count_totalFalseBOOLEANIf true, requests total count of studies (API parameter countTotal=true).true
other_termsFalseSTRINGAdditional keyword terms. Mapped to query.term.pediatric OR adolescent
location_termsFalseSTRINGLocation-based query terms. Mapped to query.locn.United States, California
title_acronymFalseSTRINGMatch text in study titles or acronyms. Mapped to query.titles.metformin
intervention_treatmentFalseSTRINGIntervention/treatment terms. Mapped to query.incr.insulin
outcome_measuresFalseSTRINGOutcome measures terms. Mapped to query.outc.HbA1c
sponsor_collaboratorFalseSTRINGSponsor or collaborator terms. Mapped to query.spons.National Institutes of Health
lead_sponsor_nameFalseSTRINGLead sponsor name. Mapped to query.lead.Pfizer
study_idsFalseSTRINGStudy identifiers (e.g., NCT IDs). Mapped to query.id.NCT01234567,NCT08976543
patient_search_areaFalseSTRINGPatient-centered search area terms. Mapped to query.patient.Boston, MA
filter_overallStatusFalseSTRINGFilter by overall status (comma-separated). Mapped to filter.overallStatus.RECRUITING,ACTIVE,NOT_YET_RECRUITING
filter_idsFalseSTRINGFilter by IDs (comma-separated). Mapped to filter.ids.NCT01234567,NCT07654321

Outputs

FieldTypeDescriptionExample
resultsSTRINGIf format=json: JSON string of the 'studies' array. If format=csv: raw CSV text.[{ "protocolSection": { ... } }, { ... }]
metadataSTRINGIf format=json: JSON string containing total_studies, query, api_version. If format=csv: JSON string with format, content_length, and query.{"total_studies": 124, "query": "type 2 diabetes", "api_version": "2.0"}

Important Notes

  • Fields must be provided as a comma-separated list; unknown fields may be ignored by the API.
  • Default sort is @relevance; use API-supported sort strings for other orderings.
  • JSON format is recommended for structured downstream processing; CSV returns raw text.
  • When count_total is true, total count is included in JSON metadata where supported by the API.
  • This node queries ClinicalTrials.gov API v2 at the /studies endpoint with a 30-second timeout.
  • Error responses are returned as JSON strings in both outputs with an 'error' key.

Troubleshooting

  • Network error: Ensure internet connectivity and that ClinicalTrials.gov is reachable; try again or reduce request size.
  • JSON decode error: Use format=json only when the endpoint returns valid JSON; otherwise switch to CSV.
  • Empty results: Check the condition_or_disease and filters; broaden search terms or remove restrictive filters.
  • Invalid filters/sort: Verify values for filter_overallStatus, filter_ids, and sort match API expectations.
  • Large response/timeout: Narrow the search or specify fields to reduce payload size; try again later.