Skip to content

ClinicalTrials Study Search

Queries the ClinicalTrials.gov v2 /studies endpoint to find clinical studies matching a condition or disease and optional filters. Returns either a JSON-formatted list of studies with summary metadata or raw CSV content depending on the selected format. Supports fine-grained query parameters such as location, interventions, sponsors, status filters, and sorting.
Preview

Usage

Use this node to search for clinical trials by condition (e.g., "lung cancer") and refine results with additional terms, location filters, sponsors, and study status. Choose JSON when you need a structured list of studies for downstream processing, or CSV for spreadsheet-like output. Typically used early in a workflow to collect study candidates before fetching details or performing analytics.

Inputs

FieldRequiredTypeDescriptionExample
condition_or_diseaseTrueSTRINGPrimary search term for the condition or disease. Sets query.cond.lung cancer
formatTrueSTRINGOutput format. JSON returns a structured studies list; CSV returns raw text content.json
fieldsFalseSTRINGComma-separated list of fields to include in the response (when supported by the API).protocolSection.identificationModule.briefTitle,hasResults
sortFalseSTRINGSort order for results. Passed as sort (e.g., @relevance).@relevance
count_totalFalseBOOLEANIf true, includes countTotal=true to request total count metadata.true
other_termsFalseSTRINGAdditional free-text terms. Sets query.term.phase 3 randomized
location_termsFalseSTRINGLocation-related search terms (country, city, etc.). Sets query.locn.United States; California
title_acronymFalseSTRINGSearch in study titles/acronyms. Sets query.titles.KEYNOTE
intervention_treatmentFalseSTRINGFilter by intervention or treatment. Sets query.incr.Pembrolizumab
outcome_measuresFalseSTRINGFilter by outcome measures. Sets query.outc.overall survival
sponsor_collaboratorFalseSTRINGSponsor or collaborator name search. Sets query.spons.National Cancer Institute (NCI)
lead_sponsor_nameFalseSTRINGLead sponsor name. Sets query.lead.Merck Sharp & Dohme LLC
study_idsFalseSTRINGSearch by one or more study IDs (e.g., NCT IDs). Sets query.id.NCT04000165,NCT05012345
patient_search_areaFalseSTRINGPatient-centric search area terms. Sets query.patient.Boston, MA
filter_overallStatusFalseSTRINGComma-separated overall status filters. Sets filter.overallStatus.RECRUITING,ACTIVE,NOT RECRUITING
filter_idsFalseSTRINGComma-separated list of IDs to filter. Sets filter.ids.NCT04000165,NCT05012345

Outputs

FieldTypeDescriptionExample
resultsSTRINGSearch results. For JSON format, a prettified JSON array of study objects; for CSV, the raw CSV text.[{ "protocolSection": { "identificationModule": { "nctId": "NCT04000165" } } }]
metadataSTRINGMetadata about the request/response. For JSON format, includes totalStudies, query, apiVersion; for CSV, includes format, content_length, and query.{ "total_studies": 1234, "query": "lung cancer", "api_version": "2.0" }

Important Notes

  • Format behavior: With format=json, the node parses and returns the 'studies' array and constructs summary metadata; with CSV, it returns raw text content and basic metadata only.
  • Core query: condition_or_disease maps to query.cond; many other inputs map to query. or filter. parameters supported by ClinicalTrials.gov v2.
  • Sorting: Default sort is '@relevance'. Override by setting the sort input.
  • Counts: Enabling count_total sets countTotal=true; total_studies is populated in JSON mode when the API returns it.
  • Fields selection: The fields input is a comma-separated list passed through to the API; ensure requested fields exist in the v2 API.
  • Timeouts and errors: The node uses a 30-second timeout and returns error strings on network or JSON parsing failures.
  • Status filters: filter_overallStatus accepts comma-separated status values recognized by ClinicalTrials.gov (e.g., RECRUITING, COMPLETED).

Troubleshooting

  • Empty results: Broaden condition_or_disease or remove restrictive filters (e.g., intervention_treatment, filter_overallStatus).
  • Network error: Verify internet connectivity and ClinicalTrials.gov availability; retry. The node returns '{"error": "Network error"}' in both outputs on failure.
  • JSON decode error: Ensure format is set to 'json' when expecting parsed JSON. If the API returns malformed JSON, try again later or switch to CSV.
  • Unexpected fields missing: Check that your fields list matches valid v2 field paths; remove invalid fields.
  • Large responses slow or truncated downstream: Prefer JSON with specific fields to reduce payload size, or add additional filters to narrow results.
  • Sort not applied: Confirm sort value syntax (e.g., '@relevance') and that it is supported by the API.