ClinicalTrials.gov · Search
clinicaltrials-gov/clinical-trials/searchGet health and medical data with ClinicalTrials.gov · Search from Alexandria through one Spiral API key. Discover NCT numbers for a topic before calling study or study_dates; list trials by sponsor, status or location. It runs in the background and returns structured JSON. Pay as you go, with no subscription.
Pricing
$0.00873 per call.
Limits
- Runs
- In the background
- Returns
- json
- Longest queue wait
- 1 hour
- Run deadline
- 5 minutes
- Longest run, end to end
- 225 minutes
- Largest inline input
- 1 MB
- Largest input file
- 2 GB
- Largest output
- 5 GB
Input
| Field | Kind | Default | Description |
|---|---|---|---|
near | JSON | — | Only studies with a site within the radius of the coordinate (filter.geo=distance(lat,lon,radius)). |
sort | text | — | Sort by a field piece with optional direction, e.g. "LastUpdatePostDate:desc", or "@relevance" (default when a query is given). Pattern: ^(@relevance|[A-Za-z][A-Za-z0-9]*(:(asc|desc))?)$. |
term | text | — | Other terms searched across the record (query.term). Accepts Essie expressions such as AREA[StartDate]RANGE[2025-01-01,MAX]. |
title | text | — | Words in the brief or official title, or acronym (query.titles). |
status | list | — | Overall status filter (filter.overallStatus); any of the listed values matches. |
sponsor | text | — | Sponsor or collaborator name (query.spons), e.g. "Merck". |
location | text | — | Location terms: city, state, country or facility (query.locn), e.g. "Boston". |
condition | text | — | Condition or disease (query.cond), e.g. "Breast Cancer". Essie syntax allowed. |
page_size | number 1 to 100 | 10 | Studies per page (the API accepts up to 1000; capped at 100 here). |
page_token | text | — | next_page_token from the previous page. Send the same query parameters again. Pattern: ^[A-Za-z0-9_-]+$. |
agg_filters | text | — | Facet filters as the site encodes them (aggFilters), e.g. "phase:3,status:rec". Pattern: ^[a-zA-Z]+:[a-zA-Z0-9_ ]+(,[a-zA-Z]+:[a-zA-Z0-9_ ]+)*$. |
intervention | text | — | Intervention or treatment (query.intr), e.g. "Pembrolizumab". |
advanced_filter | text | — | Essie filter expression applied after the query (filter.advanced), e.g. AREA[StartDateType]ESTIMATED. |
Same request in code
curl https://api.spiral.ai/v1/runs \
-H "Authorization: Bearer $SPIRAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"provider": "alexandria",
"model": "clinicaltrials-gov/clinical-trials/search",
"input": {
"near": {}
}
}'Frequently asked questions
How much does ClinicalTrials.gov · Search cost?
$0.00873 per call. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.
How do I use ClinicalTrials.gov · Search through an API?
Send `POST /v1/runs` with `"provider": "alexandria"`, `"model": "clinicaltrials-gov/clinical-trials/search"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.
Do I need an account with Alexandria to use ClinicalTrials.gov · Search?
No. Spiral runs it on its own Alexandria account and charges your Spiral balance.
Can my AI agent use ClinicalTrials.gov · Search?
Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.