curl --request POST \
--url https://api.aisa.one/apis/v1/clinicaltrials-gov/clinical-trials/field-values \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fields": [
"OverallStatus",
"Phase",
"StudyType"
]
}
'import requests
url = "https://api.aisa.one/apis/v1/clinicaltrials-gov/clinical-trials/field-values"
payload = { "fields": ["OverallStatus", "Phase", "StudyType"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({fields: ['OverallStatus', 'Phase', 'StudyType']})
};
fetch('https://api.aisa.one/apis/v1/clinicaltrials-gov/clinical-trials/field-values', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/clinicaltrials-gov/clinical-trials/field-values",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fields' => [
'OverallStatus',
'Phase',
'StudyType'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/clinicaltrials-gov/clinical-trials/field-values"
payload := strings.NewReader("{\n \"fields\": [\n \"OverallStatus\",\n \"Phase\",\n \"StudyType\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/clinicaltrials-gov/clinical-trials/field-values")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fields\": [\n \"OverallStatus\",\n \"Phase\",\n \"StudyType\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/clinicaltrials-gov/clinical-trials/field-values")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fields\": [\n \"OverallStatus\",\n \"Phase\",\n \"StudyType\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"api_url": "https://clinicaltrials.gov/api/v2/stats/field/values?fields=OverallStatus,Phase,StudyType",
"fields": [
{
"field": "protocolSection.statusModule.overallStatus",
"missing_studies_count": 0,
"piece": "OverallStatus",
"stats": {},
"top_values": [
{
"studies_count": 330531,
"value": "COMPLETED"
},
{
"studies_count": 96809,
"value": "UNKNOWN"
},
{
"studies_count": 65114,
"value": "RECRUITING"
},
{
"studies_count": 34392,
"value": "TERMINATED"
},
{
"studies_count": 30030,
"value": "NOT_YET_RECRUITING"
},
{
"studies_count": 22152,
"value": "ACTIVE_NOT_RECRUITING"
},
{
"studies_count": 16820,
"value": "WITHDRAWN"
},
{
"studies_count": 5270,
"value": "ENROLLING_BY_INVITATION"
},
{
"studies_count": 1781,
"value": "SUSPENDED"
},
{
"studies_count": 983,
"value": "WITHHELD"
},
{
"studies_count": 536,
"value": "NO_LONGER_AVAILABLE"
},
{
"studies_count": 253,
"value": "AVAILABLE"
},
{
"studies_count": 243,
"value": "APPROVED_FOR_MARKETING"
},
{
"studies_count": 36,
"value": "TEMPORARILY_NOT_AVAILABLE"
}
],
"type": "ENUM",
"unique_values_count": 14
},
{
"field": "protocolSection.designModule.phases",
"missing_studies_count": 143397,
"piece": "Phase",
"stats": {},
"top_values": [
{
"studies_count": 237711,
"value": "NA"
},
{
"studies_count": 90396,
"value": "PHASE2"
},
{
"studies_count": 65846,
"value": "PHASE1"
},
{
"studies_count": 49946,
"value": "PHASE3"
},
{
"studies_count": 35871,
"value": "PHASE4"
},
{
"studies_count": 6493,
"value": "EARLY_PHASE1"
}
],
"type": "ENUM",
"unique_values_count": 6
},
{
"field": "protocolSection.designModule.studyType",
"missing_studies_count": 983,
"piece": "StudyType",
"stats": {},
"top_values": [
{
"studies_count": 461679,
"value": "INTERVENTIONAL"
},
{
"studies_count": 141220,
"value": "OBSERVATIONAL"
},
{
"studies_count": 1068,
"value": "EXPANDED_ACCESS"
}
],
"type": "ENUM",
"unique_values_count": 3
}
],
"observed_at_ms": 1790705156544
}Field values
You need the valid values of a registry field or the distribution of a field across all studies.
curl --request POST \
--url https://api.aisa.one/apis/v1/clinicaltrials-gov/clinical-trials/field-values \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fields": [
"OverallStatus",
"Phase",
"StudyType"
]
}
'import requests
url = "https://api.aisa.one/apis/v1/clinicaltrials-gov/clinical-trials/field-values"
payload = { "fields": ["OverallStatus", "Phase", "StudyType"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({fields: ['OverallStatus', 'Phase', 'StudyType']})
};
fetch('https://api.aisa.one/apis/v1/clinicaltrials-gov/clinical-trials/field-values', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/clinicaltrials-gov/clinical-trials/field-values",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fields' => [
'OverallStatus',
'Phase',
'StudyType'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/clinicaltrials-gov/clinical-trials/field-values"
payload := strings.NewReader("{\n \"fields\": [\n \"OverallStatus\",\n \"Phase\",\n \"StudyType\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/clinicaltrials-gov/clinical-trials/field-values")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fields\": [\n \"OverallStatus\",\n \"Phase\",\n \"StudyType\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/clinicaltrials-gov/clinical-trials/field-values")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fields\": [\n \"OverallStatus\",\n \"Phase\",\n \"StudyType\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"api_url": "https://clinicaltrials.gov/api/v2/stats/field/values?fields=OverallStatus,Phase,StudyType",
"fields": [
{
"field": "protocolSection.statusModule.overallStatus",
"missing_studies_count": 0,
"piece": "OverallStatus",
"stats": {},
"top_values": [
{
"studies_count": 330531,
"value": "COMPLETED"
},
{
"studies_count": 96809,
"value": "UNKNOWN"
},
{
"studies_count": 65114,
"value": "RECRUITING"
},
{
"studies_count": 34392,
"value": "TERMINATED"
},
{
"studies_count": 30030,
"value": "NOT_YET_RECRUITING"
},
{
"studies_count": 22152,
"value": "ACTIVE_NOT_RECRUITING"
},
{
"studies_count": 16820,
"value": "WITHDRAWN"
},
{
"studies_count": 5270,
"value": "ENROLLING_BY_INVITATION"
},
{
"studies_count": 1781,
"value": "SUSPENDED"
},
{
"studies_count": 983,
"value": "WITHHELD"
},
{
"studies_count": 536,
"value": "NO_LONGER_AVAILABLE"
},
{
"studies_count": 253,
"value": "AVAILABLE"
},
{
"studies_count": 243,
"value": "APPROVED_FOR_MARKETING"
},
{
"studies_count": 36,
"value": "TEMPORARILY_NOT_AVAILABLE"
}
],
"type": "ENUM",
"unique_values_count": 14
},
{
"field": "protocolSection.designModule.phases",
"missing_studies_count": 143397,
"piece": "Phase",
"stats": {},
"top_values": [
{
"studies_count": 237711,
"value": "NA"
},
{
"studies_count": 90396,
"value": "PHASE2"
},
{
"studies_count": 65846,
"value": "PHASE1"
},
{
"studies_count": 49946,
"value": "PHASE3"
},
{
"studies_count": 35871,
"value": "PHASE4"
},
{
"studies_count": 6493,
"value": "EARLY_PHASE1"
}
],
"type": "ENUM",
"unique_values_count": 6
},
{
"field": "protocolSection.designModule.studyType",
"missing_studies_count": 983,
"piece": "StudyType",
"stats": {},
"top_values": [
{
"studies_count": 461679,
"value": "INTERVENTIONAL"
},
{
"studies_count": 141220,
"value": "OBSERVATIONAL"
},
{
"studies_count": 1068,
"value": "EXPANDED_ACCESS"
}
],
"type": "ENUM",
"unique_values_count": 3
}
],
"observed_at_ms": 1790705156544
}Request contract
- Method and path: POST /apis/v1/clinicaltrials-gov/clinical-trials/field-values
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/clinicaltrials-gov/clinical-trials/field-values
{
"operationId": "clinicaltrials-gov.clinical-trials.field-values",
"method": "POST",
"path": "/apis/v1/clinicaltrials-gov/clinical-trials/field-values",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"examples": {
"provider": {
"summary": "Official provider example; checked against AIsa request constraints",
"value": {
"fields": [
"OverallStatus",
"Phase",
"StudyType"
]
}
}
},
"schema": {
"additionalProperties": true,
"properties": {
"fields": {
"description": "Field pieces, e.g. [\"OverallStatus\", \"Phase\"]. Unknown names fail with invalid_input.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"fields"
],
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Usage-based pricing. Default request estimate: $0.0005 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.Authorizations
Body
Response
Registry-wide value statistics for up to 20 field pieces (GET /api/v2/stats/field/values): for enums and strings the distinct values with study counts, for dates and integers min/max, for booleans true/false counts, plus how many studies lack the field. Use it to learn the exact enum values (OverallStatus, Phase, StudyType, DateType, ...) accepted by search filters and Essie expressions.
The response contains the tool result directly.
The provider identifies fields as the primary payload key.
| Documented field | Provider type | Description |
|---|---|---|
field | string | Dotted path of the field in the study record. |
missing_studies_count | number | |
piece | string | |
stats | object | Type-specific statistics as returned: min/max/formats for DATE, min/max/avg for INTEGER and NUMBER, longest for STRING, trueCount/falseCount for BOOLEAN. Empty for ENUM. |
top_values | object[] | ENUM and STRING fields only; the registry returns up to 250 values, most frequent first. |
type | string | ENUM, STRING, DATE, INTEGER, NUMBER or BOOLEAN. |
unique_values_count | number | ENUM and STRING fields only. |
These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.