Skip to content

ClinicalTrials Study Count

Queries the ClinicalTrials.gov v2 API to retrieve the number of studies matching a condition or disease term. Returns parsed JSON with total study counts and related metadata when format is JSON, or raw CSV content when format is CSV.
Preview

Usage

Use this node when you need the total number of clinical studies for a given condition, as a quick filter or to drive downstream logic (e.g., deciding whether to fetch detailed study data). Typical workflow: provide a search term (condition or disease), select the output format (JSON recommended for structured count values), optionally specify fields to include, and pass the results to reporting or further processing nodes.

Inputs

FieldRequiredTypeDescriptionExample
condition_or_diseaseTrueSTRINGPrimary search query for the ClinicalTrials.gov API. Commonly a disease or condition name.lung cancer
formatTrueSTRINGOutput format for the API response. JSON returns structured data (including counts); CSV returns raw text.json
fieldsFalseSTRINGComma-separated list of fields to include in the response. Leave empty to use API defaults.nctId,briefTitle,overallStatus

Outputs

FieldTypeDescriptionExample
resultsSTRINGThe API response. For JSON format, a JSON string containing the full response plus extracted keys such as total_studies. For CSV format, the raw CSV text.{ "data": {"studies": [...]}, "query": "lung cancer", "total_studies": 1245, "min_rank": 1, "max_rank": 10, "api_version": "2.0" }
metadataSTRINGMetadata about the query and response. For JSON format, includes query, format, and api_version. For CSV, includes format, content_length, and query.{ "query": "lung cancer", "format": "json", "api_version": "2.0" }

Important Notes

  • JSON is recommended: Only the JSON format includes parsed fields like total_studies, min_rank, and max_rank in the structured output.
  • CSV returns raw text: When using CSV format, the node returns the raw CSV content for results and a minimal JSON metadata string.
  • Query sensitivity: The condition_or_disease string directly affects results; ensure accurate and specific terms for better counts.
  • Optional fields: Providing a fields list can change response size and content; leave it empty if you only need counts.
  • Timeouts and errors: Network calls use a 30-second timeout and return JSON strings with error messages on failures.

Troubleshooting

  • Received an error JSON string (e.g., Network error): Check network connectivity, try again later, or reduce query complexity.
  • Unexpected empty or very low count: Refine the condition_or_disease term, try synonyms, or confirm spelling and phrasing.
  • CSV output is hard to parse: Switch format to json to get structured data with total_studies and related keys.
  • Large responses or slow performance: Limit fields or use a more specific search term to reduce response size.
  • Invalid fields specified: Remove or correct field names; invalid fields can lead to incomplete or confusing output.