Skip to content

ClinicalTrials Study Detail

Retrieves detailed information about a single clinical study from ClinicalTrials.gov using its NCT ID. Supports JSON or CSV response formats and lets you choose how markup-type fields are returned (markdown or legacy). Returns both the study data and a small metadata summary.
Preview

Usage

Use this node when you need the full record for a known clinical study (for example, to display a study page, analyze study attributes, or enrich downstream processing). Provide the NCT ID and select the response and markup formats. Optionally restrict the payload to specific fields to reduce size.

Inputs

FieldRequiredTypeDescriptionExample
nct_idTrueSTRINGThe NCT identifier of the target study to retrieve. Must be a valid ClinicalTrials.gov NCT ID.NCT04000165
formatTrueSTRINGResponse format of the study detail. Choose 'json' for structured JSON or 'csv' for comma-separated output.json
markupFormatTrueSTRINGPresentation format for markup-type fields in the response. 'markdown' returns modern Markdown; 'legacy' returns legacy formatting.markdown
fieldsFalseSTRINGOptional comma-separated list of fields to include in the response. Leave blank to return the full record.BriefTitle,StudyType,Condition,InterventionName,Eligibility

Outputs

FieldTypeDescriptionExample
resultsSTRINGThe study detail payload from ClinicalTrials.gov in the chosen format. For 'json', this is a JSON string; for 'csv', this is CSV text.{ "studies": [ { "protocolSection": { } } ], "apiVersion": "2.0" }
metadataSTRINGA small JSON string summarizing the request and response, for example NCT ID, format, and either API version (for JSON) or content length (for CSV).{ "nct_id": "NCT04000165", "format": "json", "api_version": "2.0" }

Important Notes

  • API endpoint: Queries ClinicalTrials.gov API v2 at /studies/{nct_id}.
  • Formats: 'json' returns structured JSON; 'csv' returns plain-text CSV. The 'markupFormat' option affects how rich-text fields are delivered.
  • Field filtering: Use 'fields' to limit the response to specific fields and reduce payload size. Leave empty for the full record.
  • Timeout and errors: Network errors or JSON parsing failures return error strings in both outputs (for example, {"error":"Network error"}).
  • Metadata differences: For JSON responses, metadata includes api_version; for CSV responses, metadata includes content_length.
  • Case sensitivity: Provide the NCT ID exactly as issued (for example, uppercase prefix 'NCT').

Troubleshooting

  • Empty or invalid NCT ID: Ensure 'nct_id' is a valid ClinicalTrials.gov NCT identifier (for example, NCT followed by digits).
  • Unexpected empty results: Verify the study exists and is accessible; confirm there are no typos in the NCT ID.
  • Error: Network error: Check network connectivity and retry. If the API is rate-limiting or down, wait and try again.
  • Error: JSON decode error: Use 'format' = 'json' only if you expect JSON. If you requested 'csv', do not attempt to parse as JSON downstream.
  • Missing fields in response: If you specified 'fields', make sure the field names match ClinicalTrials.gov field names exactly or remove 'fields' to return the full record.
  • Markup rendering issues: Switch 'markupFormat' between 'markdown' and 'legacy' to align with your downstream renderer.