ClinicalTrials Study Fields¶
Retrieves study field information from the ClinicalTrials.gov API, returning the raw results and lightweight metadata as JSON strings. You can optionally filter by field type and specify a comma-separated list of fields to include. Useful for discovering available fields and their values to inform downstream queries or UI options.

Usage¶
Use this node when you need to explore or enumerate study fields from ClinicalTrials.gov before building more targeted queries. Typically placed early in a workflow to fetch the list of fields (optionally filtered) and pass the results to parsers, selectors, or query-construction nodes.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| type | False | STRING | Optional filter for field types (as defined by the ClinicalTrials.gov API). Leave empty to return all applicable field information. | Study |
| fields | False | STRING | Comma-separated list of field names to include in the results. If omitted, the API may return broader field information. | Condition, InterventionName |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| results | STRING | JSON string containing the API response with study fields information based on the provided filters. | { "fields": [{ "name": "Condition", "values": [...] }, ... ] } |
| metadata | STRING | JSON string with basic metadata about the response. Includes result_count indicating the number of top-level items returned. | { "result_count": 2 } |
Important Notes¶
- This node performs an external HTTP request to the ClinicalTrials.gov API; network connectivity is required.
- Inputs are optional and should be plain text. The 'fields' input must be a comma-separated list without special formatting.
- On errors, both outputs return JSON strings with an 'error' field (for example, {"error": "Network error"}).
- Response size and structure depend on the ClinicalTrials.gov API; downstream nodes should parse the 'results' JSON string accordingly.
- Default 'fields' is "Condition, InterventionName" if not overridden.
Troubleshooting¶
- Network error: Ensure internet access and that the ClinicalTrials.gov API is reachable. Retry or reduce request frequency.
- JSON decode error: The upstream API response may be malformed or unexpected. Try again later or adjust inputs.
- Empty or unexpected results: Verify 'type' and 'fields' values match valid API field names; try removing filters to test.
- Slow responses or timeouts: The node uses a 30-second timeout. Narrow filters or try at a different time if the API is slow.
- Downstream parsing failures: Confirm you are parsing the 'results' output as JSON text before accessing fields.