From e9f011e6e921467a20dc01f6d88ac9849a4b5b5b Mon Sep 17 00:00:00 2001
From: Paul Schmiedmayer For information on NCI's efforts to improve how patients and oncologists find information and learn about cancer clinical trials please visit: Updates to the API are made daily (the refresh occurs each morning by 7:30 AM ET). The API does not do a As an example, to see which clinical trials have been verified by an auditor since 2016-08-25... Example: trials?record_verification_date_gte=2016-08-25 To use API, an API key is required. Request API key Please ask questions or report issues to ctrp_support@mail.nih.gov. In other words, for a trial to be considered "OPEN", current_trial_status must be one of:
https://www.cancer.gov/syndication/apiFetching Daily Updates
diff
to track changes, and there is no one field in the underlying database (that the API taps into) which captures when a trial has been modified. The best field to use to see which trials have possibly been changed in the past 24 hours is the record_verification_date
field. This field is updated whenever a human auditor verifies a clinical trial record. It is important to note that verification does not necessarily imply that a change was made to the clinical trial record, simply that an auditor took another look at it - but this is inclusive of any instances where the auditor made modifications to the trial.Authorization
Issues
current_trial_status=active¤t_trial_status=approved
¤t_trial_status=enrolling by invitation
¤t_trial_status=in review
¤t_trial_status=temporarily closed to accrual
¤t_trial_status=temporarily closed to accrual and intervention
&sites.recruitment_status=active&sites.recruitment_status=approved
&sites.recruitment_status=enrolling_by_invitation
&sites.recruitment_status=in_review
&sites.recruitment_status=temporarily_closed_to_accrual
&record_verification_date_gte=<date reflecting 2 years ago> )\n
and sites.recruitment_status must be one of:
and record_verification_date must be a date within the past two years
Currently does not work in combination with:\n embed_and_ and outer_or_ prepends.", - "required":false, - "schema":{ - "type":"string" + "openapi":"3.0.0", + "info":{ + "version":"2.1.0", + "title":"NCI Clinical Trials Search API", + "description":"For information on NCI's efforts to improve how patients and oncologists find information and learn about cancer clinical trials please visit:
https://www.cancer.gov/syndication/api
Updates to the API are made daily (the refresh occurs each morning by 7:30 AM ET). The API does not do a diff
to track changes, and there is no one field in the underlying database (that the API taps into) which captures when a trial has been modified. The best field to use to see which trials have possibly been changed in the past 24 hours is the record_verification_date
field. This field is updated whenever a human auditor verifies a clinical trial record. It is important to note that verification does not necessarily imply that a change was made to the clinical trial record, simply that an auditor took another look at it - but this is inclusive of any instances where the auditor made modifications to the trial.
As an example, to see which clinical trials have been verified by an auditor since 2016-08-25...
Example: trials?record_verification_date_gte=2016-08-25
To use API, an API key is required. Request API key
Please ask questions or report issues to ctrp_support@mail.nih.gov.
", + "termsOfService":"https://www.cancer.gov/syndication/api", + "license":{ + "name":"", + "url":"" + } + }, + "x-amazon-apigateway-integration-cors-headers":{ + "method.response.header.Access-Control-Allow-Methods":"'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'", + "method.response.header.Access-Control-Allow-Headers":"'Content-Type,Authorization,X-Amz-Date,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin":"'*'" + }, + "tags":[ + { + "name":"Trials", + "description":"" + }, + { + "name":"Organizations", + "description":"" + }, + { + "name":"Interventions", + "description":"" + }, + { + "name":"Diseases", + "description":"" + }, + { + "name":"Biomarkers", + "description":"" + } + ], + "components":{ + "securitySchemes":{ + "ApiKeyAuth":{ + "type":"apiKey", + "in":"header", + "name":"X-API-KEY" + } + }, + "schemas":{ + "integer_1_to_999":{ + "type":"integer", + "minimum":1, + "maximum":999 + }, + "TrialResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer" }, - "examples":{ - "":{ - "value":"" - }, - "OPEN ":{ - "value":"OPEN" - }, - "Invalid value (search will result in 500 response code)":{ - "value":"SOMETHING" - } - } - }, - "size_small":{ - "in":"query", - "name":"size", - "description":"Limit the amount of results a supplied amount (default is 10, max is 50). Note that this parameter will be ignored whenexport
parameter is passed.",
- "required":false,
- "schema":{
- "type":"integer",
- "minimum":1,
- "maximum":50
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/TrialDetail"
+ }
}
- },
- "size":{
- "in":"query",
- "name":"size",
- "description":"Not using the size parameter, by default, will give you ALL the results AND, in addition, will give you the 'total' field in the results, with the total count of the results. Once you do use the size parameter however, the number of results will be according to the size specified, AND, in addition, the 'total' field will not exist in your results.",
- "required":false,
- "schema":{
- "type":"integer",
- "minimum":1,
- "maximum":100
- }
- },
- "order":{
- "in":"query",
- "name":"order",
- "description":"Asc or Desc. Required when using sort
.",
- "required":false,
- "schema":{
- "type":"string"
+ }
+ },
+ "TrialDetail": {
+ "type": "object",
+ "properties": {
+ "other_ids": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Identifier"
+ }
},
- "examples":{
- "":{
- "value":""
- },
- "ascending order":{
- "value":"asc"
- },
- "descending order":{
- "value":"desc"
- }
- }
- },
- "from":{
- "in":"query",
- "name":"from",
- "description":"Starting from nth position of results lineup. Start the results from a supplied starting point (default is 0).",
- "required":false,
- "schema":{
- "type":"integer",
- "minimum":1
- }
- },
- "current_trial_status":{
- "in":"query",
- "name":"current_trial_status",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
+ "amendment_date": {
+ "type": "string",
+ "format": "date"
},
- "examples":{
- "":{
- "value":""
- },
- "Active":{
- "value":"Active"
- },
- "Administratively Complete":{
- "value":"Administratively Complete"
- },
- "Approved":{
- "value":"Approved"
- },
- "Closed to Accrual":{
- "value":"Closed to Accrual"
- },
- "Closed to Accrual and Intervention":{
- "value":"Closed to Accrual and Intervention"
- },
- "Complete":{
- "value":"Complete"
- },
- "INACTIVE":{
- "value":"INACTIVE"
- },
- "Enrolling by Invitation":{
- "value":"Enrolling by Invitation"
- },
- "Temporarily Closed to Accrual and Intervention":{
- "value":"Temporarily Closed to Accrual and Intervention"
- },
- "Temporarily Closed to Accrual":{
- "value":"Temporarily Closed to Accrual"
- },
- "In Review":{
- "value":"In Review"
- },
- "Withdrawn":{
- "value":"Withdrawn"
- }
- }
- },
- "export":{
- "in":"query",
- "name":"export",
- "description":"Export all query results into a file. The data will be available to download using a link that will arrive by email.email
parameter. See also optional filename
parameter. Note that size
parameter will be ignored during exports.",
- "required":false,
- "schema":{
- "type":"string"
+ "keywords": {
+ "type": ["string", "null"]
},
- "examples":{
- "":{
- "value":""
- },
- "Export in JSON format":{
- "value":"json"
- },
- "excel (xls)":{
- "value":"xls"
- },
- "Invalid value (search will result in 400 response code)":{
- "value":"SOMETHING"
- }
- }
- },
- "filename":{
- "in":"query",
- "name":"filename",
- "description":"To be used with export
to indicate the beginning of the file name for exported data.export
to indicate the email address for exported data.",
- "required":false,
- "schema":{
- "type":"string"
- }
- },
- "generic_contact":{
- "in":"query",
- "name":"generic_contact",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
+ "dcp_id": {
+ "type": ["string", "null"]
+ },
+ "interventional_model": {
+ "type": "string"
+ },
+ "lead_org": {
+ "type": "string"
+ },
+ "eligibility": {
+ "$ref": "#/components/schemas/Eligibility"
+ },
+ "sites": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Site"
+ }
+ },
+ "completion_date_type_code": {
+ "type": "string"
+ },
+ "detail_description": {
+ "type": "string"
+ },
+ "official_title": {
+ "type": "string"
+ },
+ "_phase_sort_order": {
+ "type": "integer"
+ },
+ "collaborators": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Collaborators"
+ }
+ },
+ "associated_studies": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "outcome_measures": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/OutcomeMeasure"
+ }
+ },
+ "phase": {
+ "type": "string"
+ },
+ "central_contact": {
+ "$ref": "#/components/schemas/CentralContact"
+ },
+ "primary_purpose": {
+ "type": "string"
+ },
+ "number_of_arms": {
+ "type": "integer"
+ },
+ "_study_protocol_type_sort_order": {
+ "type": "integer"
+ },
+ "nct_id": {
+ "type": "string"
+ },
+ "biomarkers": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "classification_code": {
+ "type": ["string", "null"]
+ },
+ "current_trial_status_date": {
+ "type": "string",
+ "format": "date"
+ },
+ "diseases": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Disease"
+ }
+ },
+ "_primary_purpose_sort_order": {
+ "type": "integer"
+ },
+ "protocol_id": {
+ "type": "string"
+ },
+ "active_sites_count": {
+ "type": "integer"
+ },
+ "lead_org_cancer_center": {
+ "type": ["string", "null"]
+ },
+ "arms": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Arm"
+ }
+ },
+ "study_model_code": {
+ "type": ["string", "null"]
+ },
+ "nci_id": {
+ "type": "string"
+ },
+ "why_study_stopped": {
+ "type": ["string", "null"]
+ },
+ "brief_summary": {
+ "type": "string"
+ },
+ "brief_title": {
+ "type": "string"
+ },
+ "status_history": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/StatusHistory"
+ }
+ },
+ "study_population_description": {
+ "type": ["string", "null"]
+ },
+ "sampling_method_code": {
+ "type": ["string", "null"]
+ },
+ "minimum_target_accrual_number": {
+ "type": "integer"
+ },
+ "prior_therapy": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "_current_trial_status_sort_order": {
+ "type": "integer"
+ },
+ "start_date": {
+ "type": "string",
+ "format": "date"
+ },
+ "record_verification_date": {
+ "type": "string",
+ "format": "date"
+ },
+ "ctep_id": {
+ "type": "string"
+ },
+ "current_trial_status": {
+ "type": "string"
+ },
+ "study_model_other_text": {
+ "type": ["string", "null"]
+ },
+ "masking": {
+ "$ref": "#/components/schemas/Masking"
+ },
+ "acronym": {
+ "type": ["string", "null"]
+ },
+ "nci_programs": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "nci_funded": {
+ "type": "string"
+ },
+ "anatomic_sites": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "ccr_id": {
+ "type": ["string", "null"]
+ },
+ "start_date_type_code": {
+ "type": "string"
+ },
+ "principal_investigator": {
+ "type": "string"
+ },
+ "study_source": {
+ "type": "string"
+ },
+ "completion_date": {
+ "type": "string",
+ "format": "date"
+ },
+ "study_subtype_code": {
+ "type": ["string", "null"]
+ },
+ "study_protocol_type": {
+ "type": "string"
}
- },
- "sites.generic_contact":{
- "in":"query",
- "name":"sites.generic_contact",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
+ }
+ },
+ "Identifier": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
}
- },
- "lead_org_cancer_center":{
- "in":"query",
- "name":"lead_org_cancer_center",
- "description":"Search by Lead Org Cancer Center",
- "required":false,
- "schema":{
- "type":"string"
+ }
+ },
+ "Site": {
+ "type": "object",
+ "properties": {
+ "org_state_or_province": {
+ "type": "string"
+ },
+ "contact_name": {
+ "type": "string"
+ },
+ "contact_phone": {
+ "type": "string"
+ },
+ "recruitment_status_date": {
+ "type": "string",
+ "format": "date"
+ },
+ "org_address_line_2": {
+ "type": ["string", "null"]
+ },
+ "org_va": {
+ "type": "boolean"
+ },
+ "org_address_line_1": {
+ "type": "string"
+ },
+ "org_tty": {
+ "type": ["string", "null"]
+ },
+ "org_family": {
+ "type": ["string", "null"]
},
- "examples":{
- "":{
- "value":""
- },
- "Mayo Clinic Cancer Center":{
- "value":"Mayo Clinic Cancer Center"
- },
- "Alvin J. Siteman Cancer Center":{
- "value":"Alvin J. Siteman Cancer Center"
- },
- "University of Chicago Comprehensive Cancer Center":{
- "value":"University of Chicago Comprehensive Cancer Center"
- },
- "MD Anderson Cancer Center":{
- "value":"MD Anderson Cancer Center"
- },
- "Roswell Park Cancer Institute":{
- "value":"Roswell Park Cancer Institute"
- },
- "Stanford Cancer Institute":{
- "value":"Stanford Cancer Institute"
- }
+ "org_postal_code": {
+ "type": "string"
+ },
+ "contact_email": {
+ "type": "string"
+ },
+ "recruitment_status": {
+ "type": "string"
+ },
+ "org_city": {
+ "type": "string"
+ },
+ "org_email": {
+ "type": ["string", "null"]
+ },
+ "org_country": {
+ "type": "string"
+ },
+ "org_fax": {
+ "type": "string"
+ },
+ "org_phone": {
+ "type": "string"
+ },
+ "org_name": {
+ "type": "string"
+ },
+ "org_coordinates": {
+ "$ref": "#/components/schemas/Coordinates"
}
- },
- "nci_funded":{
- "in":"query",
- "name":"nci_funded",
- "description":"Search by NCI funded",
- "required":false,
- "schema":{
- "type":"string"
+ }
+ },
+ "Coordinates": {
+ "type": "object",
+ "properties": {
+ "lon": {
+ "type": "number"
},
- "examples":{
- "":{
- "value":""
- },
- "Indirect":{
- "value":"Indirect"
- },
- "Direct":{
- "value":"Direct"
- },
- "No":{
- "value":"No"
- }
+ "lat": {
+ "type": "number"
}
- }
- },
- "responses":{
- "badReq":{
- "description":"Error Bad Request",
- "headers":{
- "Access-Control-Allow-Origin":{
- "allowEmptyValue":true,
- "example":"http://127.0.0.1",
- "schema":{
- "type":"string"
- }
- }
+ }
+ },
+ "Collaborators": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "example": "National Cancer Institute"
+ },
+ "functional_role": {
+ "type": "string",
+ "example": "FUNDING_SOURCE"
+ }
+ }
+ },
+ "Eligibility": {
+ "type": "object",
+ "properties": {
+ "unstructured": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/UnstructuredEligibility"
+ }
},
- "content":{
- "application/json":{
- "schema":{
- "type":"object",
- "properties":{
- "code":{
- "description":"HTTP status code 400 - Bad Request",
- "type":"integer",
- "format":"int64",
- "x-go-name":"Code"
- }
- }
- }
- }
+ "structured": {
+ "$ref": "#/components/schemas/StructuredEligibility"
}
- },
- "forbiddenReq":{
- "description":"Error Forbidden",
- "content":{
- "application/json":{
- "schema":{
- "type":"object",
- "properties":{
- "code":{
- "description":"HTTP status code 403 - Forbidden",
- "type":"integer",
- "format":"int64",
- "x-go-name":"Code"
- }
- }
- }
- }
+ }
+ },
+ "UnstructuredEligibility": {
+ "type": "object",
+ "properties": {
+ "inclusion_indicator": {
+ "type": "boolean"
+ },
+ "display_order": {
+ "type": "integer"
+ },
+ "description": {
+ "type": "string"
}
- },
- "notFoundReq":{
- "description":"Error Not Found",
- "content":{
- "application/json":{
- "schema":{
- "type":"object",
- "properties":{
- "code":{
- "description":"HTTP status code 404 - Not Found",
- "type":"integer",
- "format":"int64",
- "x-go-name":"Code"
- }
- }
- }
- }
+ }
+ },
+ "StructuredEligibility": {
+ "type": "object",
+ "properties": {
+ "max_age": {
+ "type": "string"
+ },
+ "max_age_number": {
+ "type": "integer"
+ },
+ "min_age_unit": {
+ "type": "string"
+ },
+ "max_age_unit": {
+ "type": "string"
+ },
+ "max_age_in_years": {
+ "type": "integer"
+ },
+ "gender": {
+ "type": "string"
+ },
+ "accepts_healthy_volunteers": {
+ "type": "boolean"
+ },
+ "min_age": {
+ "type": "string"
+ },
+ "min_age_number": {
+ "type": "integer"
+ },
+ "min_age_in_years": {
+ "type": "integer"
}
- },
- "okResp":{
- "description":"Success response",
- "content":{
- "application/json":{
- "schema":{
- "type":"object",
- "properties":{
- "code":{
- "description":"HTTP status code 200 - OK",
- "type":"integer",
- "format":"int64",
- "x-go-name":"Code"
- }
- }
- }
- }
+ }
+ },
+ "OutcomeMeasure": {
+ "type": "object",
+ "properties": {
+ "timeframe": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "type_code": {
+ "type": "string"
}
- }
- }
- },
- "servers":[
- {
- "url":"https://clinicaltrialsapi-int.cancer.gov/api/v2",
- "description":"INT Server"
- },
- {
- "url":"https://clinicaltrialsapi-stage.cancer.gov/api/v2",
- "description":"UAT Server"
- },
- {
- "url":"https://clinicaltrialsapi.cancer.gov/v2",
- "description":"Production Server"
- },
- {
- "url":"http://127.0.0.1:3000/v2",
- "description":"Local Test Server"
- }
- ],
- "paths":{
- "/trials/{id}":{
- "get":{
- "tags":[
- "Trials"
- ],
- "summary":"Get One Trial",
- "security":[
- {
- "ApiKeyAuth":[
-
- ]
- }
- ],
- "description":"Retrieves the clinical trial with supplied nci_id
or nct_id
. All fields (including nested ones) are returned.
This endpoint filters all clinical trials based upon supplied filter params. Filter params may be any of the fields in the schema and others for more filtering capabilities as described below.
<field_param>
: filter results by examining a field by it's default search setting. For example a boolean field will expect true/false, number fields expect numbers and text fields expect text fields. Note that most SHORT text fields are by default set to be searched by exact match except they are case insensive, while LONG text fields like descriptions are by default set to be searched by fulltext as described below. Should one need to search differently, for example by typeahead or exact match including case, the options for doing such are listed below.
<field_param>._fulltext
: (note . before _) filter results by examining a field for occurrence of a 'word' equal to the given value or a variation of it.
Example: sites.org_name._fulltext=clinic will find records with org_name: "Sanford Clinic North-Fargo" and "University of Kansas Clinical Research Center" - as the word "clinical" is a variation of the word "clinic".
If you provide a multi-word value, it breaks the given value into words and apply an \"and\" condition regardless of order.
For example: brief_title._fulltext=breast%20cancer will search for records with both "breast" and "cancer" in the brief_title field, in any order.
<field_param>._auto
: filter results by examining the beginning of each word for the given value.
Example: lead_org._auto=roches will find records with "University of Rochester NCORP Research Base".
Note: lead_org._fulltext=roches will find "Hoffmann-La Roche" (because roches appears to be plural of roche), but will not find fields containing the word "Rochester", because it's not a variation of "roches".
Multi-word values are not broken into words. The exact given value is applied to the beginning of any word in the field, to create an \"autocomplete\" feature.
<field_param>._raw
: filter results by exact, case sensitive match of the field for the given value.
When supplying an array of values for a single filter param, please use the following convention: trials?<field_param>=<field_value_a>&<field_param>=<field_value_b>
and note that string
field values are not case sensitive (must otherwise must match exactly).
Example: trials?sites.org_state_or_province=CA&sites.org_state_or_province=OR
When searching in the trials
Endpoint with multiple values for Prior Therapy, the following parameters in the API will treat the values as an OR condition and will return data that satisfies at least one of the condition being searched: inclusion_indicator, name, nci_thesaurus_concept_id, parents, synonyms, type, ancestor_ids
Example
For field params which are filtering as ranges (date
and long
types), please supply _gte
or _lte
to the end of the field param (depending on if you are filtering on greater than or equal (gte), less than or equal (lte), or both):
trials?<field_param>_gte=<field_value_from>&<field_param>_lte=<field_value_to>
Example: trials?record_verification_date_gte=2016-08-25
Appending _not
to a parameter creates a NOT condition. Unlike normally (without the _not), where an OR condition is created, for _not parameters, multiple
Example: trials?current_trial_status_not=Active¤t_trial_status_not=Complete&nci_id_not=NCI-2017-01522
This request will return trials where (the current status is NOT Active AND current status is NOT Complete) AND nci_id is not NCI-2017-01522)
Prepending embed_and_
creates a whole new search within a search to give you an embedded AND condition for all the parameters with the prepend. Up to 6 embedded searches are allowed.
Example: trials?sites.org_country=Canada&keyword=Breast Cancer&embed_and_keyword=OSU-14078&embed_and_keyword_field=ccr_id&embed_and_keyword_field=ctep_id&embed_and_keyword_field=dcp_id &embed_and_keyword_field=nci_id&embed_and_keyword_field=nct_id&embed_and_keyword_field=other_ids.value &embed_and_keyword_field=protocol_id&embed_and_embed_and_sites.org_country=Uganda
In this search we have three searches (2 of them embedded) joined with an AND condition due to this embedment:
1. ...there is a match for the keyword search for Breast Cancer using our default configuration for keyword searches, and with a site in Canada.
AND
2. ...there is a match for the keyword search for OSU-14078 using a custom configuration of the keyword fields (rather than using the default)
AND
3. ... there is a site located in Uganda
Prepending outer_or_
creates a whole new parallel search with an OR condition between the searches for all the parameters with the prepend. Up to 6 parallel searches are allowed.
Example: trials?lead_org=Breast Cancer Institute&outer_or_diseases.name._fulltext=Breast Cancer&outer_or_outer_or_sites.org_name=Dana Breast Cancer Institute
In this search we have three parallel searches joined with an OR condition:
...the lead organization is Breast Cancer Institute
OR
...the trial has a disease where the disease name is Breast Cancer
OR
...one of the sites has org name \u201cDana Breast Cancer Institute\u201d
Prepending outer_not_
creates a whole new search for all the parameters with the prepend and then negates the entire query or subquery.
Example: trials?current_trial_status=ACTIVE&primary_purpose=TREATMENT&eligibility.structured.gender=BOTH&diseases.is_lead_disease=true&diseases.nci_thesaurus_concept_id=C4872&embed_and_outer_not_diseases.nci_thesaurus_concept_id=C71732&embed_and_outer_not_diseases.is_lead_disease=true&embed_and_embed_and_outer_not_diseases.nci_thesaurus_concept_id=C53556&embed_and_embed_and_outer_not_diseases.is_lead_disease=true
In this search:
...all the active trials with treatment as the primary purpose accepting both genders where breast cancer (C4872) is a lead disease, And where Triple-Negative Breast Cancer (C71732) is NOT a lead disease, And HER2 Positive Breast Carcinoma (C53556) is NOT a lead disease.
The disease elements in the trials have been tagged by one or more of five different types: maintype, subtype, stage, grade and finding. The API allows users to search by type.
Example: trials?include=none&grade=C9137&grade=C3641&maintype=C4872&maintype=C4878
This request will return trials with (Breast Cancer [C4872] OR Lung Cancer [C4878]) AND (Combined Small Cell Lung Cancer [C9137] OR Stage 0 Breast Cancer [C3641])
Aggregations of fields is accomplished by parameter agg_field and supports progressive trials filtering
This functionality is only available at the trials end point. Trials results are given and as usual total and data always belong to the results of the trials search, and within that, Aggregations results are listed in the results under \u201caggregations\u201d field under the trials results. All fields like aggregations.doc_count, refer to the aggregations.
agg_name: If text\u2026. Auto complete for key must match given value. Note that this typeahead functionality is currently not available for the anatomic_sites field.
agg_min_count: doc_count for a given key must be a minimum of a given number amount (this filter will not lower key doc_count)
The \"size\" and \"from\" parameter enhancements for aggregations apply when: aggregations are requested for the trial endpoint, and the parameter\u00a0\"include = none\" is specified. For this request, as before, no trial data is returned and CTS API will return the entire set of the aggregations\u00a0as\u00a0bound by the \"size\" and \"from\" parameters (if included in request).
If the aggregations' request is made for the trials endpoint and the include parameter is not included and/or specified to include data fields (e.g., include=nci_id) then the \"size\" and \"from\" parameters as before apply to the data returned rather than the aggregations.
agg_field_sort Default set to 'name'. Currently works only for values name
and count
.
agg_field_order Default set to 'asc' (alphabetical order) when agg_field_sort is not specified and defaulted to name. Otherwise currently works only for values asc
and desc
.
Example: /api/v2/trials?agg_field=lead_org¤t_trial_status=Active&agg_name=Anderson&include=nci_id&size=1
{\n
\"total\": 6180, ← number of trials where the current trial status is Active\n
\"data\": [{ ← other data relating to trials from the trails filters\n
\"nci_id\": \"NCI-2015-01918\" \n
}],\n
\"aggregations\": { ← From 6180 trials we made aggregations and filtered to autocomplete lead_org of “Anderson”\n
\"doc_count\": 491, ← # of trials where the current trial status is Active that meet the criteria of “Anderson” for aggregations\n
\"lead_org\": [{ ← actual aggregations for lead org\n
\"key\": \"M D Anderson Cancer Center\", ← key that qualified for the filter\n
\"doc_count\": 484 ← actual trials count for lead org with key\n
},\n
{\n
\"key\": \"University of Texas MD Anderson Cancer Center LAO\",\n
\"doc_count\": 7\n
}\n
]\n
}\n
}
_fulltext
: DEPRECATED. Use keyword
instead which is configured with the same fields by default.
: DEPRECATED. Use
where available, as described above.
_trialids
: DEPRECATED. Use trial_ids
Below are some examples of filters for trials and configurations of results.
If you are crafting more complicated queries, it might be best to use the POST
endpoint of the same name.
include
param, and values are found in both, fields in these values will be included in the results.",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "all fields (don't exclude any)":{
- "value":""
- },
- "sites":{
- "value":"sites"
- },
- "diseases":{
- "value":"diseases"
- }
- }
- },
- {
- "$ref":"#/components/parameters/export"
- },
- {
- "$ref":"#/components/parameters/email"
- },
- {
- "$ref":"#/components/parameters/filename"
- },
- {
- "in":"query",
- "name":"_fulltext",
- "description":"DEPRECATED. Use keyword
together with keyword_field
instead.",
- "deprecated":true,
- "schema":{
- "type":"string"
- }
- },
- {
- "in":"query",
- "name":"._fulltext
where available, described above.",
- "deprecated":true,
- "schema":{
- "type":"string"
- }
- },
- {
- "in":"query",
- "name":"_trialids",
- "description":"DEPRECATED. Use trial_ids
instead.",
- "deprecated":true,
- "required":false,
- "schema":{
- "type":"string"
- }
- },
- {
- "in":"query",
- "name":"trial_ids",
- "description":"Filter results by examining trial identifiers (ccr_id, ctep_id, dcp_id, nci_id, nct_id, other_ids.value, protocol_id).\n\nExample: trials?trial_ids=nci-2011&trial_ids=NCT00",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "nci-2011":{
- "value":"nci-2011"
- },
- "NCT00":{
- "value":"NCT00"
- }
- }
- },
- {
- "in":"query",
- "name":"keyword",
- "description":"Text to be searched in multiple fields. It can be combined with keyword_field
.keyword
filter results by examining a variety of text-based fields (By default: *_id, other_ids.value, diseases.name._fulltext, diseases.synonyms._fulltext, brief_title, brief_summary, official_title, detail_description, official_title, brief_title, brief_summary, diseases.name._fulltext, detail_description, sites.org_name._fulltext, collaborators.name._fulltext, principal_investigator._fulltext, sites.contact_name._fulltext, sites.org_city._fulltext, sites.org_state_or_province._fulltext, arms.interventions.name, arms.interventions.synonyms, biomarkers.name, biomarkers.synonyms, prior_therapy.name, prior_therapy.synonyms).keyword
s (with a maximum of 10 allowed) will give you an OR condition of between values in all configured fields.",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "example search keyword: breast cancer":{
- "value":"breast cancer"
- }
- }
- },
- {
- "in":"query",
- "name":"keyword_field",
- "description":"Field(s) to be searched for the text provided in keyword
. Use multiple times; once for each field to be searched. For example:keyword_field=brief_title._fulltext&keyword_field=lead_org._auto
. Use keyword_field
to override the default fields used by keyword
. A maximum of 10 fields is currently allowed.",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "brief_title._fulltext":{
- "value":"brief_title._fulltext"
- },
- "lead_org._auto":{
- "value":"lead_org._auto"
- }
- }
- },
- {
- "in":"query",
- "name":"agg_field",
- "description":"Field to be used for aggregation. ",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "lead_org":{
- "value":"lead_org"
- },
- "current_trial_status":{
- "value":"current_trial_status"
- }
- }
- },
- {
- "in":"query",
- "name":"agg_name",
- "description":"Filter aggregation (use with agg_field). Autocomplete of this value must match the value of the field in agg_field.",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "Anderson":{
- "value":"Anderson"
- }
- }
- },
- {
- "in":"query",
- "name":"agg_min_count",
- "description":"Filter aggregation (use with agg_field). The number of documents (doc_count) for a given key (agg_field) must be a minimum of a given number amount (this filter will not lower key doc_count).",
- "required":false,
- "schema":{
- "type":"integer",
- "minimum":1
- }
- },
- {
- "in":"query",
- "name":"sites.org_name._fulltext",
- "description":"Filter results by examining words that make up organization name e.g 'Mayo'.",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "Mayo":{
- "value":"Mayo"
- },
- "Paducah":{
- "value":"Paducah"
- },
- "Green Bay Oncology":{
- "value":"Green Bay Oncology"
- },
- "Saint Vincent Hospital":{
- "value":"Saint Vincent Hospital"
- }
- }
- },
- {
- "$ref":"#/components/parameters/trial_status"
- },
- {
- "$ref":"#/components/parameters/nci_funded"
- },
- {
- "in":"query",
- "name":"nci_id",
- "description":"Search by NCI ID.",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "valid nci_id: NCI-2019-02616":{
- "value":"NCI-2019-02616"
- },
- "non-existent nci_id: NCI-2014-99999 (will find 0 results)":{
- "value":"NCI-2014-99999"
- },
- "nci_id 16-00376":{
- "value":"NCI-2016-00376"
- },
- "nci_id 15-00414":{
- "value":"NCI-2015-00414"
- }
- }
- },
- {
- "in":"query",
- "name":"nct_id",
- "description":"Search by NCT ID.",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "valid nct_id: NCT03386721":{
- "value":"NCT03386721"
- },
- "non-existent nct_id: NCT99999999 (will find 0 results)":{
- "value":"NCT99999999"
- }
- }
- },
- {
- "in":"query",
- "name":"protocol_id",
- "description":"Search by Protocol ID.",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "BNT411-01":{
- "value":"BNT411-01"
- },
- "NU 19B03":{
- "value":"NU 19B03"
- },
- "2018-0104":{
- "value":"2018-0104"
- },
- "AALL1732":{
- "value":"AALL1732"
- },
- "CCT5001":{
- "value":"CCT5001"
- },
- "ENT0065":{
- "value":"ENT0065"
- },
- "14-396":{
- "value":"14-396"
- },
- "2015-0835":{
- "value":"2015-0835"
- }
- }
- },
- {
- "in":"query",
- "name":"ccr_id",
- "description":"Search by CCR ID. (No examples available.)",
- "required":false,
- "schema":{
- "type":"string"
- }
- },
- {
- "in":"query",
- "name":"ctep_id",
- "description":"Search by CTEP ID",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "A011401":{
- "value":"A011401"
- },
- "E4512":{
- "value":"E4512"
- },
- "EAY131":{
- "value":"EAY131"
- },
- "A081105":{
- "value":"A081105"
- },
- "NRG-BR003":{
- "value":"NRG-BR003"
- },
- "EA5163":{
- "value":"EA5163"
- },
- "A011202":{
- "value":"A011202"
- },
- "A081801":{
- "value":"A081801"
- },
- "A021703":{
- "value":"A021703"
- },
- "S1609":{
- "value":"S1609"
- },
- "EA1131":{
- "value":"EA1131"
- },
- "A031501":{
- "value":"A031501"
- },
- "EA9161":{
- "value":"EA9161"
- },
- "NRG-GY009":{
- "value":"NRG-GY009"
- },
- "S1418":{
- "value":"S1418"
- },
- "A041702":{
- "value":"A041702"
- },
- "A031704":{
- "value":"A031704"
- },
- "S1801":{
- "value":"S1801"
- },
- "S1613":{
- "value":"S1613"
- },
- "NRG-GI005":{
- "value":"NRG-GI005"
- },
- "S1815":{
- "value":"S1815"
- },
- "EA6134":{
- "value":"EA6134"
- },
- "EA5181":{
- "value":"EA5181"
- },
- "A021502":{
- "value":"A021502"
- },
- "EA8153":{
- "value":"EA8153"
- },
- "NRG-GY019":{
- "value":"NRG-GY019"
- },
- "A051701":{
- "value":"A051701"
- },
- "NSABP-B-51":{
- "value":"NSABP-B-51"
- },
- "EA3161":{
- "value":"EA3161"
- },
- "EA1181":{
- "value":"EA1181"
- },
- "NRG-BR004":{
- "value":"NRG-BR004"
- },
- "S1826":{
- "value":"S1826"
- },
- "EAA173":{
- "value":"EAA173"
- },
- "A031702":{
- "value":"A031702"
- },
- "S1803":{
- "value":"S1803"
- },
- "EA2142":{
- "value":"EA2142"
- },
- "EA2186":{
- "value":"EA2186"
- },
- "EA6141":{
- "value":"EA6141"
- },
- "S1712":{
- "value":"S1712"
- },
- "NRG-LU003":{
- "value":"NRG-LU003"
- },
- "AGCT1531":{
- "value":"AGCT1531"
- },
- "EA3132":{
- "value":"EA3132"
- },
- "EA6174":{
- "value":"EA6174"
- },
- "EA5191":{
- "value":"EA5191"
- },
- "S1929":{
- "value":"S1929"
- },
- "EA2182":{
- "value":"EA2182"
- },
- "EA4181":{
- "value":"EA4181"
- },
- "GOG-0263":{
- "value":"GOG-0263"
- },
- "EA2187":{
- "value":"EA2187"
- },
- "S1608":{
- "value":"S1608"
- }
- }
- },
- {
- "in":"query",
- "name":"dcp_id",
- "description":"Search by DCP ID. (No examples available.)",
- "required":false,
- "schema":{
- "type":"string"
- }
- },
- {
- "$ref":"#/components/parameters/current_trial_status"
- },
- {
- "in":"query",
- "name":"phase",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "I":{
- "value":"I"
- },
- "II":{
- "value":"II"
- },
- "II_III":{
- "value":"II_III"
- },
- "III":{
- "value":"III"
- }
- }
- },
- {
- "in":"query",
- "name":"study_protocol_type",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "Interventional":{
- "value":"Interventional"
- }
- }
- },
- {
- "in":"query",
- "name":"nci_programs",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "NCORP (NCI Community Oncology Research Program)":{
- "value":"NCORP"
- },
- "NCTN (National Clinical Trials Network)":{
- "value":"NCTN"
- },
- "ETCTN (Experimental Therapeutics Clinical Trials Network)":{
- "value":"ETCTN"
- }
- }
- },
- {
- "in":"query",
- "name":"brief_title",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "Weight Loss Interventions":{
- "value":"Weight Loss Interventions"
- },
- "Breast Cancer Recurrence":{
- "value":"Breast Cancer Recurrence"
- },
- "Advanced Refractory Solid Tumors":{
- "value":"Advanced Refractory Solid Tumors"
- },
- "Rare Tumors":{
- "value":"Rare Tumors"
- },
- "Chronic Lymphocytic Leukemia":{
- "value":"Chronic Lymphocytic Leukemia"
- },
- "Irinotecan Hydrochloride":{
- "value":"Irinotecan Hydrochloride"
- }
- }
- },
- {
- "in":"query",
- "name":"brief_summary",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "Weight Loss Interventions":{
- "value":"Weight Loss Interventions"
- },
- "Breast Cancer Recurrence":{
- "value":"Breast Cancer Recurrence"
- },
- "Advanced Refractory Solid Tumors":{
- "value":"Advanced Refractory Solid Tumors"
- },
- "Rare Tumors":{
- "value":"Rare Tumors"
- },
- "Chronic Lymphocytic Leukemia":{
- "value":"Chronic Lymphocytic Leukemia"
- },
- "Irinotecan Hydrochloride":{
- "value":"Irinotecan Hydrochloride"
- }
- }
- },
- {
- "in":"query",
- "name":"official_title",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "Weight Loss Interventions":{
- "value":"Weight Loss Interventions"
- },
- "Breast Cancer Recurrence":{
- "value":"Breast Cancer Recurrence"
- },
- "Advanced Refractory Solid Tumors":{
- "value":"Advanced Refractory Solid Tumors"
- },
- "Rare Tumors":{
- "value":"Rare Tumors"
- },
- "Chronic Lymphocytic Leukemia":{
- "value":"Chronic Lymphocytic Leukemia"
- },
- "Irinotecan Hydrochloride":{
- "value":"Irinotecan Hydrochloride"
- }
- }
- },
- {
- "in":"query",
- "name":"primary_purpose",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "TREATMENT":{
- "value":"TREATMENT"
- }
- }
- },
- {
- "in":"query",
- "name":"accepts_healthy_volunteers_indicator",
- "description":"DEPRECATED. Use eligibility.structured.accepts_healthy_volunteers
instead.",
- "deprecated":true,
- "required":false,
- "schema":{
- "type":"string"
- }
- },
- {
- "in":"query",
- "name":"eligibility.structured.accepts_healthy_volunteers",
- "description":"",
- "required":false,
- "schema":{
- "type":"boolean"
- },
- "examples":{
- "":{
- "value":""
- },
- "true":{
- "value":"true"
- },
- "false":{
- "value":"false"
- }
- }
- },
- {
- "in":"query",
- "name":"acronym",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- }
- },
- {
- "in":"query",
- "name":"amendment_date",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "2019-07-18T00:00:00":{
- "value":"2019-07-18T00:00:00"
- },
- "2020-11-10T00:00:00":{
- "value":"2020-11-10T00:00:00"
- },
- "2020-11-18":{
- "value":"2020-11-18"
- },
- "2020-10-22":{
- "value":"2020-10-22"
- },
- "2019-08-15":{
- "value":"2019-08-15"
- },
- "2014-09-15":{
- "value":"2014-09-15"
- }
- }
- },
- {
- "in":"query",
- "name":"anatomic_sites",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "Non-Hodgkin's Lymphoma":{
- "value":"Non-Hodgkin's Lymphoma"
- },
- "Stomach":{
- "value":"Stomach"
- },
- "Esophagus":{
- "value":"Esophagus"
- },
- "Brain and Nervous System":{
- "value":"Brain and Nervous System"
- },
- "Lung":{
- "value":"Lung"
- },
- "Pancreas":{
- "value":"Pancreas"
- },
- "Kidney":{
- "value":"Kidney"
- },
- "Multiple":{
- "value":"Multiple"
- }
- }
- },
- {
- "in":"query",
- "name":"arms.description",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "Patients undergo radiation therapy once daily":{
- "value":"undergo radiation therapy once daily"
- },
- "Patients undergo observation":{
- "value":"Patients undergo observation"
- },
- "Patients receive standard of care carboplatin":{
- "value":"Patients receive standard of care carboplatin"
- },
- "Patients undergo 3D-CRT":{
- "value":"Patients undergo 3D-CRT"
- },
- "Patients receive chemoradiotherapy":{
- "value":"Patients receive chemoradiotherapy"
- }
- }
- },
- {
- "in":"query",
- "name":"arms.name",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "Arm I":{
- "value":"Arm I"
- },
- "Arm A":{
- "value":"Arm A"
- },
- "Low Risk Group":{
- "value":"Low Risk Group"
- },
- "High Risk Group":{
- "value":"High Risk Group"
- },
- "radiation therapy":{
- "value":"radiation therapy"
- }
- }
- },
- {
- "in":"query",
- "name":"arms.type",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "EXPERIMENTAL":{
- "value":"EXPERIMENTAL"
- },
- "PLACEBO_COMPARATOR":{
- "value":"PLACEBO_COMPARATOR"
- },
- "ACTIVE_COMPARATOR":{
- "value":"ACTIVE_COMPARATOR"
- }
- }
- },
- {
- "in":"query",
- "name":"arms.interventions.nci_thesaurus_concept_id",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "C81934":{
- "value":"C81934"
- },
- "C349":{
- "value":"C349"
- },
- "C491":{
- "value":"C491"
- },
- "C408":{
- "value":"C408"
- },
- "C633":{
- "value":"C633"
- }
- }
- },
- {
- "in":"query",
- "name":"arms.interventions.description",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "Patients undergo radiation therapy once daily":{
- "value":"undergo radiation therapy once daily"
- },
- "Patients undergo observation":{
- "value":"Patients undergo observation"
- },
- "Patients receive standard of care carboplatin":{
- "value":"Patients receive standard of care carboplatin"
- },
- "Patients undergo 3D-CRT":{
- "value":"Patients undergo 3D-CRT"
- },
- "Patients receive chemoradiotherapy":{
- "value":"Patients receive chemoradiotherapy"
- }
- }
- },
- {
- "in":"query",
- "name":"arms.interventions.name",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "Ibrutinib":{
- "value":"Ibrutinib"
- },
- "Carmustine":{
- "value":"Carmustine"
- },
- "Etoposide":{
- "value":"Etoposide"
- },
- "Cytarabine":{
- "value":"Cytarabine"
- },
- "Melphalan":{
- "value":"Melphalan"
- },
- "Pharmacogenomic Study":{
- "value":"Pharmacogenomic Study"
- }
- }
- },
- {
- "in":"query",
- "name":"arms.interventions.type",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "Drug":{
- "value":"Drug"
- },
- "Procedure / Surgery":{
- "value":"Procedure / Surgery"
- },
- "Other":{
- "value":"Other"
- }
- }
- },
- {
- "in":"query",
- "name":"arms.interventions.synonyms",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "Imbruvica":{
- "value":"Imbruvica"
- },
- "Lastet":{
- "value":"Lastet"
- },
- "Melphalanum":{
- "value":"Melphalanum"
- },
- "Anti-Tumor Agents":{
- "value":"Anti-Tumor Agents"
- },
- "Anti-Cancer Agents":{
- "value":"Anti-Cancer Agents"
- },
- "Enzyme Antagonist":{
- "value":"Enzyme Antagonist"
- },
- "Immunosuppressive Agents":{
- "value":"Immunosuppressive Agents"
- }
- }
- },
- {
- "in":"query",
- "name":"associated_studies.study_id",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "NCI-2015-00668":{
- "value":"NCI-2015-00668"
- },
- "NCI-2014-02057":{
- "value":"NCI-2014-02057"
- },
- "NCI-2017-01251":{
- "value":"NCI-2017-01251"
- }
- }
- },
- {
- "in":"query",
- "name":"associated_studies.study_id_type",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "NCI":{
- "value":"NCI"
- }
- }
- },
- {
- "in":"query",
- "name":"eligibility.structured.gender",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "BOTH":{
- "value":"BOTH"
- },
- "FEMALE":{
- "value":"FEMALE"
- },
- "MALE":{
- "value":"MALE"
- }
- }
- },
- {
- "in":"query",
- "name":"eligibility.structured.min_age_in_years_lte",
- "description":"",
- "required":false,
- "schema":{
- "$ref":"#/components/schemas/integer_1_to_999"
- }
- },
- {
- "in":"query",
- "name":"eligibility.structured.min_age_in_years_gte",
- "description":"",
- "required":false,
- "schema":{
- "$ref":"#/components/schemas/integer_1_to_999"
- }
- },
- {
- "in":"query",
- "name":"eligibility.structured.max_age_in_years_lte",
- "description":"",
- "required":false,
- "schema":{
- "$ref":"#/components/schemas/integer_1_to_999"
- }
- },
- {
- "in":"query",
- "name":"eligibility.structured.max_age_in_years_gte",
- "description":"",
- "required":false,
- "schema":{
- "$ref":"#/components/schemas/integer_1_to_999"
- }
- },
- {
- "in":"query",
- "name":"eligibility.structured.min_age_unit",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "Years":{
- "value":"Years"
- },
- "Months":{
- "value":"Months"
- }
- }
- },
- {
- "in":"query",
- "name":"eligibility.structured.min_age_number_lte",
- "description":"",
- "required":false,
- "schema":{
- "$ref":"#/components/schemas/integer_1_to_999"
- }
- },
- {
- "in":"query",
- "name":"eligibility.structured.min_age_number_gte",
- "description":"",
- "required":false,
- "schema":{
- "$ref":"#/components/schemas/integer_1_to_999"
- }
- },
- {
- "in":"query",
- "name":"eligibility.structured.max_age_unit",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "Years":{
- "value":"Years"
- },
- "Months":{
- "value":"Months"
- }
- }
- },
- {
- "in":"query",
- "name":"eligibility.structured.max_age_number_lte",
- "description":"",
- "required":false,
- "schema":{
- "$ref":"#/components/schemas/integer_1_to_999"
- }
- },
- {
- "in":"query",
- "name":"eligibility.structured.max_age_number_gte",
- "description":"",
- "required":false,
- "schema":{
- "$ref":"#/components/schemas/integer_1_to_999"
- }
- },
- {
- "in":"query",
- "name":"current_trial_status_date_lte",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "2020-11-18":{
- "value":"2020-11-18"
- },
- "2020-10-22":{
- "value":"2020-10-22"
- },
- "2019-08-15":{
- "value":"2019-08-15"
- },
- "2014-09-15":{
- "value":"2014-09-15"
- }
- }
- },
- {
- "in":"query",
- "name":"current_trial_status_date_gte",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "2020-11-18":{
- "value":"2020-11-18"
- },
- "2020-10-22":{
- "value":"2020-10-22"
- },
- "2019-08-15":{
- "value":"2019-08-15"
- },
- "2014-09-15":{
- "value":"2014-09-15"
- }
- }
- },
- {
- "in":"query",
- "name":"record_verification_date_lte",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "2020-11-18":{
- "value":"2020-11-18"
- },
- "2020-10-22":{
- "value":"2020-10-22"
- },
- "2019-08-15":{
- "value":"2019-08-15"
- },
- "2014-09-15":{
- "value":"2014-09-15"
- }
- }
- },
- {
- "in":"query",
- "name":"record_verification_date_gte",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "2020-11-18":{
- "value":"2020-11-18"
- },
- "2020-10-22":{
- "value":"2020-10-22"
- },
- "2019-08-15":{
- "value":"2019-08-15"
- },
- "2014-09-15":{
- "value":"2014-09-15"
- }
- }
- },
- {
- "in":"query",
- "name":"sites.org_coordinates_lat",
- "description":"Organization's Latitude - for example: 43.7029. Geolocation Search only works to find sites in the United States.",
- "required":false,
- "schema":{
- "type":"number",
- "minimum":-999,
- "maximum":999
- },
- "examples":{
- "":{
- "value":""
- },
- "43.7029":{
- "value":"43.7029"
- }
- }
- },
- {
- "in":"query",
- "name":"sites.org_coordinates_lon",
- "description":"Organization's Longitude - for example: -72.2895. Geolocation Search only works to find sites in the United States.",
- "required":false,
- "schema":{
- "type":"number",
- "minimum":-999,
- "maximum":999
- },
- "examples":{
- "":{
- "value":""
- },
- "-72.2895":{
- "value":"-72.2895"
- }
- }
- },
- {
- "in":"query",
- "name":"sites.org_coordinates_dist",
- "description":"The radius around the provided zip code. Accepts these units of measurements [NM, nmi, nauticalmiles, mi, miles, yd, yards, ft, feet, in, inch, km, kilometers, cm, centimeters, mm, milimeters, m, meters]. If not provided defaults to 25mi.Same as the GET
endpoint, but allows you to craft a JSON body as the request.
Example:
curl -XPOST 'https://clinicaltrialsapi.cancer.gov/v2/trials' -H 'Content-Type: application/json' -d '{
\"sites.org_state_or_province\": [\"CA\", \"OR\"],
\"record_verification_date_gte\": \"2016-06-01\",
\"include\": [\"nci_id\"]
}'
",
- "operationId":"searchTrialsByPost",
- "requestBody":{
- "description":"Query in JSON format",
- "required":true,
- "content":{
- "application/json":{
- "schema":{
- "type":"object"
- },
- "examples":{
- "":{
- "value":""
- },
- "Organizations in CO or OR since 2016-06-01, show only nci_id and nct_id":{
- "value":{
- "sites.org_state_or_province":[
- "CA",
- "OR"
- ],
- "record_verification_date_gte":"2016-06-01",
- "include":[
- "nci_id",
- "nct_id"
- ]
- }
- },
- "equivalent of \"_trial_ids=OSU-14078\" from v1":{
- "value":{
- "keyword":"OSU-14078",
- "keyword_field":[
- "ccr_id",
- "ctep_id",
- "dcp_id",
- "nci_id",
- "nct_id",
- "other_ids.value",
- "protocol_id"
- ],
- "include":[
- "ccr_id",
- "ctep_id",
- "dcp_id",
- "nci_id",
- "nct_id",
- "other_ids.value",
- "protocol_id"
- ]
- }
- },
- "Search for \"breast cancer\" in brief title or in lead_org":{
- "value":{
- "keyword":"breast cancer",
- "keyword_field":[
- "brief_title._fulltext",
- "lead_org._auto"
- ],
- "include":[
- "nci_id",
- "nct_id",
- "brief_title",
- "lead_org"
- ]
- }
- },
- "Export all trial information as json file":{
- "value":{
- "export":"true",
- "export_type":"json",
- "filename":"all_trials",
- "email":"user@your-email.com"
- }
- },
- "Export nci_id, brief title, and lead organization information for all trials related to breast cancer as excel file":{
- "value":{
- "export":"true",
- "export_type":"excel",
- "filename":"breast_cancer_trials",
- "email":"user@your-email.com",
- "keyword":"breast cancer",
- "include":[
- "nci_id",
- "brief_title",
- "lead_org"
- ]
- }
- }
- }
- }
- }
+ }
+ },
+ "Intervention": {
+ "type": "object",
+ "properties": {
+ "inclusion_indicator": {
+ "type": "string"
+ },
+ "synonyms": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "nci_thesaurus_concept_id": {
+ "type": "string"
},
- "responses":{
- "200":{
- "description":"The list of results matching given search criteria."
- },
- "400":{
- "description":"Bad Request."
- },
- "500":{
- "description":"Exception occurred at the backend (except EntityNotFoundException)."
- },
- "502":{
- "description":"An exception occurred at the backend."
- }
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": ["string", "null"]
+ },
+ "type": {
+ "type": "string"
+ },
+ "category": {
+ "type": "string"
+ },
+ "parents": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
- }
- },
- "/interventions":{
- "get":{
- "tags":[
- "Interventions"
- ],
- "summary":"Search Interventions by GET",
- "security":[
- {
- "ApiKeyAuth":[
-
- ]
- }
- ],
- "description":"The interventions
endpoint is intended for typeaheads and other use cases where it is necessary to search for available interventions which can later be used to filter clinical trial results. Interventions are matched partially by supplying a string to the name
field and may be filtered by other fields through parameters described below. Results are sorted by a combination of in alphabetical order by default i.e sort is set to name and order is set to asc.
Example interventions?category=agent%20category&name=Therapeutic
Progressive Filtering functionality: All trial fields parameters described at the /trials endpoint are usable here to filter the trials from which you want to aggregate. For example, if you request /interventions?maintype=C4872 this will give you all interventions that are in trials where Breast Cancer(C4872) is among the diseases in each trial. Note that maintype is a trials endpoint parameter related to diseases.nci_thesaurus_concept_id.
When searching in the interventions Endpoint with multiple values for the following parameters (codes, category, type), API will treat values as an OR condition and will return data that contains one or the other that is being searched.
Examples
codes and code parameters will be used interchangeably within CTS API V2
name
and count
.",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "use default":{
- "value":""
- },
- "name":{
- "value":"name"
- },
- "count":{
- "value":"count"
- },
- "category (Not available. Will result in 400 response code)":{
- "value":"category"
- },
- "code (Not available. Will result in 400 response code)":{
- "value":"code"
- },
- "type (Not available. Will result in 400 response code)":{
- "value":"type"
- },
- "parent_ids (Not available. Will result in 400 response code)":{
- "value":"parent_ids"
- }
- }
- },
- {
- "$ref":"#/components/parameters/order"
- },
- {
- "$ref":"#/components/parameters/size"
- }
- ],
- "responses":{
- "200":{
- "description":"The list matching given search criteria."
- },
- "400":{
- "description":"Bad Request."
- },
- "500":{
- "description":"An exception occurred at the backend."
- },
- "502":{
- "description":"An exception occurred at the backend."
- }
+ }
+ },
+ "Disease": {
+ "type": "object",
+ "properties": {
+ "inclusion_indicator": {
+ "type": "string"
+ },
+ "is_lead_disease": {
+ "type": "boolean"
+ },
+ "synonyms": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "nci_thesaurus_concept_id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "type": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "parents": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
- }
- },
- "/diseases":{
- "get":{
- "tags":[
- "Diseases"
- ],
- "summary":"Search Diseases by GET",
- "security":[
- {
- "ApiKeyAuth":[
-
- ]
- }
- ],
- "description":"The diseases
endpoint is intended for typeaheads and other use cases where it is necessary to search for available diseases which can later be used to filter clinical trial results. Diseases are matched partially by supplying a string to the name
field and may be filtered by other fields through parameters described below. Results are sorted by a combination of in alphabetical order by default i.e sort is set to name and order is set to asc.
Example: diseases?type_not=subtype&type=maintype&name=He
Progressive Filtering functionality: All trial fields parameters described at the /trials endpoint are usable here to filter the trials from which you want to aggregate. For example, if you request /diseases?maintype=C4872 this will give you all diseases that are in trials where Breast Cancer(C4872) is among the diseases in each trial. Note that maintype is a trials endpoint parameter related to diseases.nci_thesaurus_concept_id.
When searching in the Diseases Endpoint with multiple values for the following parameters (codes, ancestor_ids, parent_ids, type), API will treat values as an OR condition and will return data that satisfies at least one of the condition being searched.
Examplescodes and code parameters will be used interchangeably within CTS API V2
name
and count
.",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "use default":{
- "value":""
- },
- "name":{
- "value":"name"
- },
- "count":{
- "value":"count"
- },
- "code (Not available. Will result in 400 response code)":{
- "value":"code"
- },
- "type (Not available. Will result in 400 response code)":{
- "value":"type"
- },
- "parent_ids (Not available. Will result in 400 response code)":{
- "value":"parent_ids"
- }
- }
- },
- {
- "$ref":"#/components/parameters/order"
- },
- {
- "$ref":"#/components/parameters/size"
- }
- ],
- "responses":{
- "200":{
- "description":"The list matching given search criteria."
- },
- "400":{
- "description":"Bad Request."
- },
- "500":{
- "description":"An exception occurred at the backend."
- },
- "502":{
- "description":"An exception occurred at the backend."
- }
+ }
+ },
+ "StatusHistory": {
+ "type": "object",
+ "properties": {
+ "status_date": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "status": {
+ "type": "string"
}
- }
- },
- "/organizations":{
- "get":{
- "tags":[
- "Organizations"
- ],
- "summary":"Search Organizations by GET",
- "security":[
- {
- "ApiKeyAuth":[
-
- ]
- }
- ],
- "description":"The organizations
endpoint is intended for typeaheads and other use cases where it is necessary to search for available organizations which can later be used to filter clinical trial results. Organizations are matched partially by supplying a string to the name
field and may be filtered by other fields through parameters described below. Results are sorted by a combination of in alphabetical order by default i.e sort is set to name and order is set to asc.
Example: organizations?org_city=Las Vegas&org_country=United States&name=University
Progressive Filtering functionality: All trial fields parameters described at the /trials endpoint are usable here to filter the trials from which you want to aggregate. For example, if you request /organizations?maintype=C4872 this will give you all organizations that are in trials where Breast Cancer(C4872) is among the diseases in each trial. Note that maintype is a trials endpoint parameter related to diseases.nci_thesaurus_concept_id.
name
.",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "use default":{
- "value":""
- },
- "name":{
- "value":"name"
- },
- "count":{
- "value":"count"
- },
- "contact_name (Not available. Will result in 400 response code)":{
- "value":"contact_name"
- },
- "contact_email (Not available. Will result in 400 response code)":{
- "value":"contact_email"
- },
- "org_country (Not available. Will result in 400 response code)":{
- "value":"org_country"
- },
- "org_state_or_province (Not available. Will result in 400 response code)":{
- "value":"org_state_or_province"
- }
- }
- },
- {
- "$ref":"#/components/parameters/order"
- },
- {
- "$ref":"#/components/parameters/size"
- }
- ],
- "responses":{
- "200":{
- "description":"The list matching given search criteria."
- },
- "400":{
- "description":"Bad Request."
- },
- "500":{
- "description":"An exception occurred at the backend."
- },
- "502":{
- "description":"An exception occurred at the backend."
- }
+ }
+ },
+ "Masking": {
+ "type": "object",
+ "properties": {
+ "role_caregiver": {
+ "type": ["string", "null"]
+ },
+ "masking": {
+ "type": ["string", "null"]
+ },
+ "role_investigator": {
+ "type": ["string", "null"]
+ },
+ "role_outcome_assessor": {
+ "type": ["string", "null"]
+ },
+ "role_subject": {
+ "type": ["string", "null"]
+ },
+ "allocation_code": {
+ "type": "string"
}
- }
- },
- "/biomarkers":{
- "get":{
- "tags":[
- "Biomarkers"
- ],
- "summary":"Search Biomarkers by GET",
- "security":[
- {
- "ApiKeyAuth":[
-
- ]
- }
- ],
- "description":"The biomarkers
endpoint is intended for typeaheads and other use cases where it is necessary to search for available biomarkers which can later be used to filter clinical trial results. Biomarkers are matched partially by supplying a string to the name
field and may be filtered by other fields through parameters described below. Results are sorted by a combination of in alphabetical order by default i.e sort is set to name and order is set to asc.
Example: biomarkers?eligibility_criterion=inclusion&name=estrogen
Progressive Filtering functionality: All trial fields parameters described at the /trials endpoint are usable here to filter the trials from which you want to aggregate. For example, if you request /biomarkers?maintype=C4872 this will give you all biomarkers that are in trials where Breast Cancer(C4872) is among the diseases in each trial. Note that maintype is a trials endpoint parameter related to diseases.nci_thesaurus_concept_id.
In other words, for a trial to be considered "OPEN", current_trial_status must be one of:
and record_verification_date must be a date within the past two years
Currently does not work in combination with:\n embed_and_ and outer_or_ prepends.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "OPEN ":{ + "value":"OPEN" + }, + "Invalid value (search will result in 500 response code)":{ + "value":"SOMETHING" + } + } + }, + "size_small":{ + "in":"query", + "name":"size", + "description":"Limit the amount of results a supplied amount (default is 10, max is 50). Note that this parameter will be ignored whenexport
parameter is passed.",
+ "required":false,
+ "schema":{
+ "type":"integer",
+ "minimum":1,
+ "maximum":50
+ }
+ },
+ "size":{
+ "in":"query",
+ "name":"size",
+ "description":"Not using the size parameter, by default, will give you ALL the results AND, in addition, will give you the 'total' field in the results, with the total count of the results. Once you do use the size parameter however, the number of results will be according to the size specified, AND, in addition, the 'total' field will not exist in your results.",
+ "required":false,
+ "schema":{
+ "type":"integer",
+ "minimum":1,
+ "maximum":100
+ }
+ },
+ "order":{
+ "in":"query",
+ "name":"order",
+ "description":"Asc or Desc. Required when using sort
.",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "ascending order":{
+ "value":"asc"
+ },
+ "descending order":{
+ "value":"desc"
+ }
+ }
+ },
+ "from":{
+ "in":"query",
+ "name":"from",
+ "description":"Starting from nth position of results lineup. Start the results from a supplied starting point (default is 0).",
+ "required":false,
+ "schema":{
+ "type":"integer",
+ "minimum":1
+ }
+ },
+ "current_trial_status":{
+ "in":"query",
+ "name":"current_trial_status",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "Active":{
+ "value":"Active"
+ },
+ "Administratively Complete":{
+ "value":"Administratively Complete"
+ },
+ "Approved":{
+ "value":"Approved"
+ },
+ "Closed to Accrual":{
+ "value":"Closed to Accrual"
+ },
+ "Closed to Accrual and Intervention":{
+ "value":"Closed to Accrual and Intervention"
+ },
+ "Complete":{
+ "value":"Complete"
+ },
+ "INACTIVE":{
+ "value":"INACTIVE"
+ },
+ "Enrolling by Invitation":{
+ "value":"Enrolling by Invitation"
+ },
+ "Temporarily Closed to Accrual and Intervention":{
+ "value":"Temporarily Closed to Accrual and Intervention"
+ },
+ "Temporarily Closed to Accrual":{
+ "value":"Temporarily Closed to Accrual"
+ },
+ "In Review":{
+ "value":"In Review"
+ },
+ "Withdrawn":{
+ "value":"Withdrawn"
+ }
+ }
+ },
+ "export":{
+ "in":"query",
+ "name":"export",
+ "description":"Export all query results into a file. The data will be available to download using a link that will arrive by email.email
parameter. See also optional filename
parameter. Note that size
parameter will be ignored during exports.",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "Export in JSON format":{
+ "value":"json"
+ },
+ "excel (xls)":{
+ "value":"xls"
+ },
+ "Invalid value (search will result in 400 response code)":{
+ "value":"SOMETHING"
+ }
+ }
+ },
+ "filename":{
+ "in":"query",
+ "name":"filename",
+ "description":"To be used with export
to indicate the beginning of the file name for exported data.export
to indicate the email address for exported data.",
+ "required":false,
+ "schema":{
+ "type":"string"
+ }
+ },
+ "generic_contact":{
+ "in":"query",
+ "name":"generic_contact",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ }
+ },
+ "sites.generic_contact":{
+ "in":"query",
+ "name":"sites.generic_contact",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ }
+ },
+ "lead_org_cancer_center":{
+ "in":"query",
+ "name":"lead_org_cancer_center",
+ "description":"Search by Lead Org Cancer Center",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "Mayo Clinic Cancer Center":{
+ "value":"Mayo Clinic Cancer Center"
+ },
+ "Alvin J. Siteman Cancer Center":{
+ "value":"Alvin J. Siteman Cancer Center"
+ },
+ "University of Chicago Comprehensive Cancer Center":{
+ "value":"University of Chicago Comprehensive Cancer Center"
+ },
+ "MD Anderson Cancer Center":{
+ "value":"MD Anderson Cancer Center"
+ },
+ "Roswell Park Cancer Institute":{
+ "value":"Roswell Park Cancer Institute"
+ },
+ "Stanford Cancer Institute":{
+ "value":"Stanford Cancer Institute"
+ }
+ }
+ },
+ "nci_funded":{
+ "in":"query",
+ "name":"nci_funded",
+ "description":"Search by NCI funded",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "Indirect":{
+ "value":"Indirect"
+ },
+ "Direct":{
+ "value":"Direct"
+ },
+ "No":{
+ "value":"No"
+ }
+ }
+ }
+ },
+ "responses":{
+ "badReq":{
+ "description":"Error Bad Request",
+ "headers":{
+ "Access-Control-Allow-Origin":{
+ "allowEmptyValue":true,
+ "example":"http://127.0.0.1",
+ "schema":{
+ "type":"string"
+ }
+ }
+ },
+ "content":{
+ "application/json":{
+ "schema":{
+ "type":"object",
+ "properties":{
+ "code":{
+ "description":"HTTP status code 400 - Bad Request",
+ "type":"integer",
+ "format":"int64",
+ "x-go-name":"Code"
+ }
+ }
+ }
+ }
+ }
+ },
+ "forbiddenReq":{
+ "description":"Error Forbidden",
+ "content":{
+ "application/json":{
+ "schema":{
+ "type":"object",
+ "properties":{
+ "code":{
+ "description":"HTTP status code 403 - Forbidden",
+ "type":"integer",
+ "format":"int64",
+ "x-go-name":"Code"
+ }
+ }
+ }
+ }
+ }
+ },
+ "notFoundReq":{
+ "description":"Error Not Found",
+ "content":{
+ "application/json":{
+ "schema":{
+ "type":"object",
+ "properties":{
+ "code":{
+ "description":"HTTP status code 404 - Not Found",
+ "type":"integer",
+ "format":"int64",
+ "x-go-name":"Code"
+ }
+ }
+ }
+ }
+ }
+ },
+ "okResp":{
+ "description":"Success response",
+ "content":{
+ "application/json":{
+ "schema":{
+ "type":"object",
+ "properties":{
+ "code":{
+ "description":"HTTP status code 200 - OK",
+ "type":"integer",
+ "format":"int64",
+ "x-go-name":"Code"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "servers":[
+ {
+ "url":"https://clinicaltrialsapi.cancer.gov/api/v2",
+ "description":"Production Server"
+ }
+ ],
+ "paths":{
+ "/trials/{id}":{
+ "get":{
+ "tags":[
+ "Trials"
+ ],
+ "summary":"Get One Trial",
+ "security":[
+ {
+ "ApiKeyAuth":[
+
+ ]
+ }
+ ],
+ "description":"Retrieves the clinical trial with supplied nci_id
or nct_id
. All fields (including nested ones) are returned.
This endpoint filters all clinical trials based upon supplied filter params. Filter params may be any of the fields in the schema and others for more filtering capabilities as described below.
<field_param>
: filter results by examining a field by it's default search setting. For example a boolean field will expect true/false, number fields expect numbers and text fields expect text fields. Note that most SHORT text fields are by default set to be searched by exact match except they are case insensive, while LONG text fields like descriptions are by default set to be searched by fulltext as described below. Should one need to search differently, for example by typeahead or exact match including case, the options for doing such are listed below.
<field_param>._fulltext
: (note . before _) filter results by examining a field for occurrence of a 'word' equal to the given value or a variation of it.
Example: sites.org_name._fulltext=clinic will find records with org_name: "Sanford Clinic North-Fargo" and "University of Kansas Clinical Research Center" - as the word "clinical" is a variation of the word "clinic".
If you provide a multi-word value, it breaks the given value into words and apply an \"and\" condition regardless of order.
For example: brief_title._fulltext=breast%20cancer will search for records with both "breast" and "cancer" in the brief_title field, in any order.
<field_param>._auto
: filter results by examining the beginning of each word for the given value.
Example: lead_org._auto=roches will find records with "University of Rochester NCORP Research Base".
Note: lead_org._fulltext=roches will find "Hoffmann-La Roche" (because roches appears to be plural of roche), but will not find fields containing the word "Rochester", because it's not a variation of "roches".
Multi-word values are not broken into words. The exact given value is applied to the beginning of any word in the field, to create an \"autocomplete\" feature.
<field_param>._raw
: filter results by exact, case sensitive match of the field for the given value.
When supplying an array of values for a single filter param, please use the following convention: trials?<field_param>=<field_value_a>&<field_param>=<field_value_b>
and note that string
field values are not case sensitive (must otherwise must match exactly).
Example: trials?sites.org_state_or_province=CA&sites.org_state_or_province=OR
When searching in the trials
Endpoint with multiple values for Prior Therapy, the following parameters in the API will treat the values as an OR condition and will return data that satisfies at least one of the condition being searched: inclusion_indicator, name, nci_thesaurus_concept_id, parents, synonyms, type, ancestor_ids
Example
For field params which are filtering as ranges (date
and long
types), please supply _gte
or _lte
to the end of the field param (depending on if you are filtering on greater than or equal (gte), less than or equal (lte), or both):
trials?<field_param>_gte=<field_value_from>&<field_param>_lte=<field_value_to>
Example: trials?record_verification_date_gte=2016-08-25
Appending _not
to a parameter creates a NOT condition. Unlike normally (without the _not), where an OR condition is created, for _not parameters, multiple
Example: trials?current_trial_status_not=Active¤t_trial_status_not=Complete&nci_id_not=NCI-2017-01522
This request will return trials where (the current status is NOT Active AND current status is NOT Complete) AND nci_id is not NCI-2017-01522)
Prepending embed_and_
creates a whole new search within a search to give you an embedded AND condition for all the parameters with the prepend. Up to 6 embedded searches are allowed.
Example: trials?sites.org_country=Canada&keyword=Breast Cancer&embed_and_keyword=OSU-14078&embed_and_keyword_field=ccr_id&embed_and_keyword_field=ctep_id&embed_and_keyword_field=dcp_id &embed_and_keyword_field=nci_id&embed_and_keyword_field=nct_id&embed_and_keyword_field=other_ids.value &embed_and_keyword_field=protocol_id&embed_and_embed_and_sites.org_country=Uganda
In this search we have three searches (2 of them embedded) joined with an AND condition due to this embedment:
1. ...there is a match for the keyword search for Breast Cancer using our default configuration for keyword searches, and with a site in Canada.
AND
2. ...there is a match for the keyword search for OSU-14078 using a custom configuration of the keyword fields (rather than using the default)
AND
3. ... there is a site located in Uganda
Prepending outer_or_
creates a whole new parallel search with an OR condition between the searches for all the parameters with the prepend. Up to 6 parallel searches are allowed.
Example: trials?lead_org=Breast Cancer Institute&outer_or_diseases.name._fulltext=Breast Cancer&outer_or_outer_or_sites.org_name=Dana Breast Cancer Institute
In this search we have three parallel searches joined with an OR condition:
...the lead organization is Breast Cancer Institute
OR
...the trial has a disease where the disease name is Breast Cancer
OR
...one of the sites has org name \u201cDana Breast Cancer Institute\u201d
Prepending outer_not_
creates a whole new search for all the parameters with the prepend and then negates the entire query or subquery.
Example: trials?current_trial_status=ACTIVE&primary_purpose=TREATMENT&eligibility.structured.gender=BOTH&diseases.is_lead_disease=true&diseases.nci_thesaurus_concept_id=C4872&embed_and_outer_not_diseases.nci_thesaurus_concept_id=C71732&embed_and_outer_not_diseases.is_lead_disease=true&embed_and_embed_and_outer_not_diseases.nci_thesaurus_concept_id=C53556&embed_and_embed_and_outer_not_diseases.is_lead_disease=true
In this search:
...all the active trials with treatment as the primary purpose accepting both genders where breast cancer (C4872) is a lead disease, And where Triple-Negative Breast Cancer (C71732) is NOT a lead disease, And HER2 Positive Breast Carcinoma (C53556) is NOT a lead disease.
The disease elements in the trials have been tagged by one or more of five different types: maintype, subtype, stage, grade and finding. The API allows users to search by type.
Example: trials?include=none&grade=C9137&grade=C3641&maintype=C4872&maintype=C4878
This request will return trials with (Breast Cancer [C4872] OR Lung Cancer [C4878]) AND (Combined Small Cell Lung Cancer [C9137] OR Stage 0 Breast Cancer [C3641])
Aggregations of fields is accomplished by parameter agg_field and supports progressive trials filtering
This functionality is only available at the trials end point. Trials results are given and as usual total and data always belong to the results of the trials search, and within that, Aggregations results are listed in the results under \u201caggregations\u201d field under the trials results. All fields like aggregations.doc_count, refer to the aggregations.
agg_name: If text\u2026. Auto complete for key must match given value. Note that this typeahead functionality is currently not available for the anatomic_sites field.
agg_min_count: doc_count for a given key must be a minimum of a given number amount (this filter will not lower key doc_count)
The \"size\" and \"from\" parameter enhancements for aggregations apply when: aggregations are requested for the trial endpoint, and the parameter\u00a0\"include = none\" is specified. For this request, as before, no trial data is returned and CTS API will return the entire set of the aggregations\u00a0as\u00a0bound by the \"size\" and \"from\" parameters (if included in request).
If the aggregations' request is made for the trials endpoint and the include parameter is not included and/or specified to include data fields (e.g., include=nci_id) then the \"size\" and \"from\" parameters as before apply to the data returned rather than the aggregations.
agg_field_sort Default set to 'name'. Currently works only for values name
and count
.
agg_field_order Default set to 'asc' (alphabetical order) when agg_field_sort is not specified and defaulted to name. Otherwise currently works only for values asc
and desc
.
Example: /api/v2/trials?agg_field=lead_org¤t_trial_status=Active&agg_name=Anderson&include=nci_id&size=1
{\n
\"total\": 6180, ← number of trials where the current trial status is Active\n
\"data\": [{ ← other data relating to trials from the trails filters\n
\"nci_id\": \"NCI-2015-01918\" \n
}],\n
\"aggregations\": { ← From 6180 trials we made aggregations and filtered to autocomplete lead_org of “Anderson”\n
\"doc_count\": 491, ← # of trials where the current trial status is Active that meet the criteria of “Anderson” for aggregations\n
\"lead_org\": [{ ← actual aggregations for lead org\n
\"key\": \"M D Anderson Cancer Center\", ← key that qualified for the filter\n
\"doc_count\": 484 ← actual trials count for lead org with key\n
},\n
{\n
\"key\": \"University of Texas MD Anderson Cancer Center LAO\",\n
\"doc_count\": 7\n
}\n
]\n
}\n
}
_fulltext
: DEPRECATED. Use keyword
instead which is configured with the same fields by default.
: DEPRECATED. Use
where available, as described above.
_trialids
: DEPRECATED. Use trial_ids
Below are some examples of filters for trials and configurations of results.
If you are crafting more complicated queries, it might be best to use the POST
endpoint of the same name.
include
param, and values are found in both, fields in these values will be included in the results.",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "all fields (don't exclude any)":{
+ "value":""
+ },
+ "sites":{
+ "value":"sites"
+ },
+ "diseases":{
+ "value":"diseases"
+ }
+ }
+ },
+ {
+ "$ref":"#/components/parameters/export"
+ },
+ {
+ "$ref":"#/components/parameters/email"
+ },
+ {
+ "$ref":"#/components/parameters/filename"
+ },
+ {
+ "in":"query",
+ "name":"_fulltext",
+ "description":"DEPRECATED. Use keyword
together with keyword_field
instead.",
+ "deprecated":true,
+ "schema":{
+ "type":"string"
+ }
+ },
+ {
+ "in":"query",
+ "name":"._fulltext
where available, described above.",
+ "deprecated":true,
+ "schema":{
+ "type":"string"
+ }
+ },
+ {
+ "in":"query",
+ "name":"_trialids",
+ "description":"DEPRECATED. Use trial_ids
instead.",
+ "deprecated":true,
+ "required":false,
+ "schema":{
+ "type":"string"
+ }
+ },
+ {
+ "in":"query",
+ "name":"trial_ids",
+ "description":"Filter results by examining trial identifiers (ccr_id, ctep_id, dcp_id, nci_id, nct_id, other_ids.value, protocol_id).\n\nExample: trials?trial_ids=nci-2011&trial_ids=NCT00",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "nci-2011":{
+ "value":"nci-2011"
+ },
+ "NCT00":{
+ "value":"NCT00"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"keyword",
+ "description":"Text to be searched in multiple fields. It can be combined with keyword_field
.keyword
filter results by examining a variety of text-based fields (By default: *_id, other_ids.value, diseases.name._fulltext, diseases.synonyms._fulltext, brief_title, brief_summary, official_title, detail_description, official_title, brief_title, brief_summary, diseases.name._fulltext, detail_description, sites.org_name._fulltext, collaborators.name._fulltext, principal_investigator._fulltext, sites.contact_name._fulltext, sites.org_city._fulltext, sites.org_state_or_province._fulltext, arms.interventions.name, arms.interventions.synonyms, biomarkers.name, biomarkers.synonyms, prior_therapy.name, prior_therapy.synonyms).keyword
s (with a maximum of 10 allowed) will give you an OR condition of between values in all configured fields.",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "example search keyword: breast cancer":{
+ "value":"breast cancer"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"keyword_field",
+ "description":"Field(s) to be searched for the text provided in keyword
. Use multiple times; once for each field to be searched. For example:keyword_field=brief_title._fulltext&keyword_field=lead_org._auto
. Use keyword_field
to override the default fields used by keyword
. A maximum of 10 fields is currently allowed.",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "brief_title._fulltext":{
+ "value":"brief_title._fulltext"
+ },
+ "lead_org._auto":{
+ "value":"lead_org._auto"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"agg_field",
+ "description":"Field to be used for aggregation. ",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "lead_org":{
+ "value":"lead_org"
+ },
+ "current_trial_status":{
+ "value":"current_trial_status"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"agg_name",
+ "description":"Filter aggregation (use with agg_field). Autocomplete of this value must match the value of the field in agg_field.",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "Anderson":{
+ "value":"Anderson"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"agg_min_count",
+ "description":"Filter aggregation (use with agg_field). The number of documents (doc_count) for a given key (agg_field) must be a minimum of a given number amount (this filter will not lower key doc_count).",
+ "required":false,
+ "schema":{
+ "type":"integer",
+ "minimum":1
+ }
+ },
+ {
+ "in":"query",
+ "name":"sites.org_name._fulltext",
+ "description":"Filter results by examining words that make up organization name e.g 'Mayo'.",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "Mayo":{
+ "value":"Mayo"
+ },
+ "Paducah":{
+ "value":"Paducah"
+ },
+ "Green Bay Oncology":{
+ "value":"Green Bay Oncology"
+ },
+ "Saint Vincent Hospital":{
+ "value":"Saint Vincent Hospital"
+ }
+ }
+ },
+ {
+ "$ref":"#/components/parameters/trial_status"
+ },
+ {
+ "$ref":"#/components/parameters/nci_funded"
+ },
+ {
+ "in":"query",
+ "name":"nci_id",
+ "description":"Search by NCI ID.",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "valid nci_id: NCI-2019-02616":{
+ "value":"NCI-2019-02616"
+ },
+ "non-existent nci_id: NCI-2014-99999 (will find 0 results)":{
+ "value":"NCI-2014-99999"
+ },
+ "nci_id 16-00376":{
+ "value":"NCI-2016-00376"
+ },
+ "nci_id 15-00414":{
+ "value":"NCI-2015-00414"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"nct_id",
+ "description":"Search by NCT ID.",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "valid nct_id: NCT03386721":{
+ "value":"NCT03386721"
+ },
+ "non-existent nct_id: NCT99999999 (will find 0 results)":{
+ "value":"NCT99999999"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"protocol_id",
+ "description":"Search by Protocol ID.",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "BNT411-01":{
+ "value":"BNT411-01"
+ },
+ "NU 19B03":{
+ "value":"NU 19B03"
+ },
+ "2018-0104":{
+ "value":"2018-0104"
+ },
+ "AALL1732":{
+ "value":"AALL1732"
+ },
+ "CCT5001":{
+ "value":"CCT5001"
+ },
+ "ENT0065":{
+ "value":"ENT0065"
+ },
+ "14-396":{
+ "value":"14-396"
+ },
+ "2015-0835":{
+ "value":"2015-0835"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"ccr_id",
+ "description":"Search by CCR ID. (No examples available.)",
+ "required":false,
+ "schema":{
+ "type":"string"
+ }
+ },
+ {
+ "in":"query",
+ "name":"ctep_id",
+ "description":"Search by CTEP ID",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "A011401":{
+ "value":"A011401"
+ },
+ "E4512":{
+ "value":"E4512"
+ },
+ "EAY131":{
+ "value":"EAY131"
+ },
+ "A081105":{
+ "value":"A081105"
+ },
+ "NRG-BR003":{
+ "value":"NRG-BR003"
+ },
+ "EA5163":{
+ "value":"EA5163"
+ },
+ "A011202":{
+ "value":"A011202"
+ },
+ "A081801":{
+ "value":"A081801"
+ },
+ "A021703":{
+ "value":"A021703"
+ },
+ "S1609":{
+ "value":"S1609"
+ },
+ "EA1131":{
+ "value":"EA1131"
+ },
+ "A031501":{
+ "value":"A031501"
+ },
+ "EA9161":{
+ "value":"EA9161"
+ },
+ "NRG-GY009":{
+ "value":"NRG-GY009"
+ },
+ "S1418":{
+ "value":"S1418"
+ },
+ "A041702":{
+ "value":"A041702"
+ },
+ "A031704":{
+ "value":"A031704"
+ },
+ "S1801":{
+ "value":"S1801"
+ },
+ "S1613":{
+ "value":"S1613"
+ },
+ "NRG-GI005":{
+ "value":"NRG-GI005"
+ },
+ "S1815":{
+ "value":"S1815"
+ },
+ "EA6134":{
+ "value":"EA6134"
+ },
+ "EA5181":{
+ "value":"EA5181"
+ },
+ "A021502":{
+ "value":"A021502"
+ },
+ "EA8153":{
+ "value":"EA8153"
+ },
+ "NRG-GY019":{
+ "value":"NRG-GY019"
+ },
+ "A051701":{
+ "value":"A051701"
+ },
+ "NSABP-B-51":{
+ "value":"NSABP-B-51"
+ },
+ "EA3161":{
+ "value":"EA3161"
+ },
+ "EA1181":{
+ "value":"EA1181"
+ },
+ "NRG-BR004":{
+ "value":"NRG-BR004"
+ },
+ "S1826":{
+ "value":"S1826"
+ },
+ "EAA173":{
+ "value":"EAA173"
+ },
+ "A031702":{
+ "value":"A031702"
+ },
+ "S1803":{
+ "value":"S1803"
+ },
+ "EA2142":{
+ "value":"EA2142"
+ },
+ "EA2186":{
+ "value":"EA2186"
+ },
+ "EA6141":{
+ "value":"EA6141"
+ },
+ "S1712":{
+ "value":"S1712"
+ },
+ "NRG-LU003":{
+ "value":"NRG-LU003"
+ },
+ "AGCT1531":{
+ "value":"AGCT1531"
+ },
+ "EA3132":{
+ "value":"EA3132"
+ },
+ "EA6174":{
+ "value":"EA6174"
+ },
+ "EA5191":{
+ "value":"EA5191"
+ },
+ "S1929":{
+ "value":"S1929"
+ },
+ "EA2182":{
+ "value":"EA2182"
+ },
+ "EA4181":{
+ "value":"EA4181"
+ },
+ "GOG-0263":{
+ "value":"GOG-0263"
+ },
+ "EA2187":{
+ "value":"EA2187"
+ },
+ "S1608":{
+ "value":"S1608"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"dcp_id",
+ "description":"Search by DCP ID. (No examples available.)",
+ "required":false,
+ "schema":{
+ "type":"string"
+ }
+ },
+ {
+ "$ref":"#/components/parameters/current_trial_status"
+ },
+ {
+ "in":"query",
+ "name":"phase",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "I":{
+ "value":"I"
+ },
+ "II":{
+ "value":"II"
+ },
+ "II_III":{
+ "value":"II_III"
+ },
+ "III":{
+ "value":"III"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"study_protocol_type",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "Interventional":{
+ "value":"Interventional"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"nci_programs",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "NCORP (NCI Community Oncology Research Program)":{
+ "value":"NCORP"
+ },
+ "NCTN (National Clinical Trials Network)":{
+ "value":"NCTN"
+ },
+ "ETCTN (Experimental Therapeutics Clinical Trials Network)":{
+ "value":"ETCTN"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"brief_title",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "Weight Loss Interventions":{
+ "value":"Weight Loss Interventions"
+ },
+ "Breast Cancer Recurrence":{
+ "value":"Breast Cancer Recurrence"
+ },
+ "Advanced Refractory Solid Tumors":{
+ "value":"Advanced Refractory Solid Tumors"
+ },
+ "Rare Tumors":{
+ "value":"Rare Tumors"
+ },
+ "Chronic Lymphocytic Leukemia":{
+ "value":"Chronic Lymphocytic Leukemia"
+ },
+ "Irinotecan Hydrochloride":{
+ "value":"Irinotecan Hydrochloride"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"brief_summary",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "Weight Loss Interventions":{
+ "value":"Weight Loss Interventions"
+ },
+ "Breast Cancer Recurrence":{
+ "value":"Breast Cancer Recurrence"
+ },
+ "Advanced Refractory Solid Tumors":{
+ "value":"Advanced Refractory Solid Tumors"
+ },
+ "Rare Tumors":{
+ "value":"Rare Tumors"
+ },
+ "Chronic Lymphocytic Leukemia":{
+ "value":"Chronic Lymphocytic Leukemia"
+ },
+ "Irinotecan Hydrochloride":{
+ "value":"Irinotecan Hydrochloride"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"official_title",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "Weight Loss Interventions":{
+ "value":"Weight Loss Interventions"
+ },
+ "Breast Cancer Recurrence":{
+ "value":"Breast Cancer Recurrence"
+ },
+ "Advanced Refractory Solid Tumors":{
+ "value":"Advanced Refractory Solid Tumors"
+ },
+ "Rare Tumors":{
+ "value":"Rare Tumors"
+ },
+ "Chronic Lymphocytic Leukemia":{
+ "value":"Chronic Lymphocytic Leukemia"
+ },
+ "Irinotecan Hydrochloride":{
+ "value":"Irinotecan Hydrochloride"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"primary_purpose",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "TREATMENT":{
+ "value":"TREATMENT"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"accepts_healthy_volunteers_indicator",
+ "description":"DEPRECATED. Use eligibility.structured.accepts_healthy_volunteers
instead.",
+ "deprecated":true,
+ "required":false,
+ "schema":{
+ "type":"string"
+ }
+ },
+ {
+ "in":"query",
+ "name":"eligibility.structured.accepts_healthy_volunteers",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"boolean"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "true":{
+ "value":"true"
+ },
+ "false":{
+ "value":"false"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"acronym",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ }
+ },
+ {
+ "in":"query",
+ "name":"amendment_date",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "2019-07-18T00:00:00":{
+ "value":"2019-07-18T00:00:00"
+ },
+ "2020-11-10T00:00:00":{
+ "value":"2020-11-10T00:00:00"
+ },
+ "2020-11-18":{
+ "value":"2020-11-18"
+ },
+ "2020-10-22":{
+ "value":"2020-10-22"
+ },
+ "2019-08-15":{
+ "value":"2019-08-15"
+ },
+ "2014-09-15":{
+ "value":"2014-09-15"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"anatomic_sites",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "Non-Hodgkin's Lymphoma":{
+ "value":"Non-Hodgkin's Lymphoma"
+ },
+ "Stomach":{
+ "value":"Stomach"
+ },
+ "Esophagus":{
+ "value":"Esophagus"
+ },
+ "Brain and Nervous System":{
+ "value":"Brain and Nervous System"
+ },
+ "Lung":{
+ "value":"Lung"
+ },
+ "Pancreas":{
+ "value":"Pancreas"
+ },
+ "Kidney":{
+ "value":"Kidney"
+ },
+ "Multiple":{
+ "value":"Multiple"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"arms.description",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "Patients undergo radiation therapy once daily":{
+ "value":"undergo radiation therapy once daily"
+ },
+ "Patients undergo observation":{
+ "value":"Patients undergo observation"
+ },
+ "Patients receive standard of care carboplatin":{
+ "value":"Patients receive standard of care carboplatin"
+ },
+ "Patients undergo 3D-CRT":{
+ "value":"Patients undergo 3D-CRT"
+ },
+ "Patients receive chemoradiotherapy":{
+ "value":"Patients receive chemoradiotherapy"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"arms.name",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "Arm I":{
+ "value":"Arm I"
+ },
+ "Arm A":{
+ "value":"Arm A"
+ },
+ "Low Risk Group":{
+ "value":"Low Risk Group"
+ },
+ "High Risk Group":{
+ "value":"High Risk Group"
+ },
+ "radiation therapy":{
+ "value":"radiation therapy"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"arms.type",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "EXPERIMENTAL":{
+ "value":"EXPERIMENTAL"
+ },
+ "PLACEBO_COMPARATOR":{
+ "value":"PLACEBO_COMPARATOR"
+ },
+ "ACTIVE_COMPARATOR":{
+ "value":"ACTIVE_COMPARATOR"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"arms.interventions.nci_thesaurus_concept_id",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "C81934":{
+ "value":"C81934"
+ },
+ "C349":{
+ "value":"C349"
+ },
+ "C491":{
+ "value":"C491"
+ },
+ "C408":{
+ "value":"C408"
+ },
+ "C633":{
+ "value":"C633"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"arms.interventions.description",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "Patients undergo radiation therapy once daily":{
+ "value":"undergo radiation therapy once daily"
+ },
+ "Patients undergo observation":{
+ "value":"Patients undergo observation"
+ },
+ "Patients receive standard of care carboplatin":{
+ "value":"Patients receive standard of care carboplatin"
+ },
+ "Patients undergo 3D-CRT":{
+ "value":"Patients undergo 3D-CRT"
+ },
+ "Patients receive chemoradiotherapy":{
+ "value":"Patients receive chemoradiotherapy"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"arms.interventions.name",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "Ibrutinib":{
+ "value":"Ibrutinib"
+ },
+ "Carmustine":{
+ "value":"Carmustine"
+ },
+ "Etoposide":{
+ "value":"Etoposide"
+ },
+ "Cytarabine":{
+ "value":"Cytarabine"
+ },
+ "Melphalan":{
+ "value":"Melphalan"
+ },
+ "Pharmacogenomic Study":{
+ "value":"Pharmacogenomic Study"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"arms.interventions.type",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "Drug":{
+ "value":"Drug"
+ },
+ "Procedure / Surgery":{
+ "value":"Procedure / Surgery"
+ },
+ "Other":{
+ "value":"Other"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"arms.interventions.synonyms",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "Imbruvica":{
+ "value":"Imbruvica"
+ },
+ "Lastet":{
+ "value":"Lastet"
+ },
+ "Melphalanum":{
+ "value":"Melphalanum"
+ },
+ "Anti-Tumor Agents":{
+ "value":"Anti-Tumor Agents"
+ },
+ "Anti-Cancer Agents":{
+ "value":"Anti-Cancer Agents"
+ },
+ "Enzyme Antagonist":{
+ "value":"Enzyme Antagonist"
+ },
+ "Immunosuppressive Agents":{
+ "value":"Immunosuppressive Agents"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"associated_studies.study_id",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "NCI-2015-00668":{
+ "value":"NCI-2015-00668"
+ },
+ "NCI-2014-02057":{
+ "value":"NCI-2014-02057"
+ },
+ "NCI-2017-01251":{
+ "value":"NCI-2017-01251"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"associated_studies.study_id_type",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "NCI":{
+ "value":"NCI"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"eligibility.structured.gender",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "BOTH":{
+ "value":"BOTH"
+ },
+ "FEMALE":{
+ "value":"FEMALE"
+ },
+ "MALE":{
+ "value":"MALE"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"eligibility.structured.min_age_in_years_lte",
+ "description":"",
+ "required":false,
+ "schema":{
+ "$ref":"#/components/schemas/integer_1_to_999"
+ }
+ },
+ {
+ "in":"query",
+ "name":"eligibility.structured.min_age_in_years_gte",
+ "description":"",
+ "required":false,
+ "schema":{
+ "$ref":"#/components/schemas/integer_1_to_999"
+ }
+ },
+ {
+ "in":"query",
+ "name":"eligibility.structured.max_age_in_years_lte",
+ "description":"",
+ "required":false,
+ "schema":{
+ "$ref":"#/components/schemas/integer_1_to_999"
+ }
+ },
+ {
+ "in":"query",
+ "name":"eligibility.structured.max_age_in_years_gte",
+ "description":"",
+ "required":false,
+ "schema":{
+ "$ref":"#/components/schemas/integer_1_to_999"
+ }
+ },
+ {
+ "in":"query",
+ "name":"eligibility.structured.min_age_unit",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "Years":{
+ "value":"Years"
+ },
+ "Months":{
+ "value":"Months"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"eligibility.structured.min_age_number_lte",
+ "description":"",
+ "required":false,
+ "schema":{
+ "$ref":"#/components/schemas/integer_1_to_999"
+ }
+ },
+ {
+ "in":"query",
+ "name":"eligibility.structured.min_age_number_gte",
+ "description":"",
+ "required":false,
+ "schema":{
+ "$ref":"#/components/schemas/integer_1_to_999"
+ }
+ },
+ {
+ "in":"query",
+ "name":"eligibility.structured.max_age_unit",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "Years":{
+ "value":"Years"
+ },
+ "Months":{
+ "value":"Months"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"eligibility.structured.max_age_number_lte",
+ "description":"",
+ "required":false,
+ "schema":{
+ "$ref":"#/components/schemas/integer_1_to_999"
+ }
+ },
+ {
+ "in":"query",
+ "name":"eligibility.structured.max_age_number_gte",
+ "description":"",
+ "required":false,
+ "schema":{
+ "$ref":"#/components/schemas/integer_1_to_999"
+ }
+ },
+ {
+ "in":"query",
+ "name":"current_trial_status_date_lte",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "2020-11-18":{
+ "value":"2020-11-18"
+ },
+ "2020-10-22":{
+ "value":"2020-10-22"
+ },
+ "2019-08-15":{
+ "value":"2019-08-15"
+ },
+ "2014-09-15":{
+ "value":"2014-09-15"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"current_trial_status_date_gte",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "2020-11-18":{
+ "value":"2020-11-18"
+ },
+ "2020-10-22":{
+ "value":"2020-10-22"
+ },
+ "2019-08-15":{
+ "value":"2019-08-15"
+ },
+ "2014-09-15":{
+ "value":"2014-09-15"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"record_verification_date_lte",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "2020-11-18":{
+ "value":"2020-11-18"
+ },
+ "2020-10-22":{
+ "value":"2020-10-22"
+ },
+ "2019-08-15":{
+ "value":"2019-08-15"
+ },
+ "2014-09-15":{
+ "value":"2014-09-15"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"record_verification_date_gte",
+ "description":"",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "2020-11-18":{
+ "value":"2020-11-18"
+ },
+ "2020-10-22":{
+ "value":"2020-10-22"
+ },
+ "2019-08-15":{
+ "value":"2019-08-15"
+ },
+ "2014-09-15":{
+ "value":"2014-09-15"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"sites.org_coordinates_lat",
+ "description":"Organization's Latitude - for example: 43.7029. Geolocation Search only works to find sites in the United States.",
+ "required":false,
+ "schema":{
+ "type":"number",
+ "minimum":-999,
+ "maximum":999
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "43.7029":{
+ "value":"43.7029"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"sites.org_coordinates_lon",
+ "description":"Organization's Longitude - for example: -72.2895. Geolocation Search only works to find sites in the United States.",
+ "required":false,
+ "schema":{
+ "type":"number",
+ "minimum":-999,
+ "maximum":999
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "-72.2895":{
+ "value":"-72.2895"
+ }
+ }
+ },
+ {
+ "in":"query",
+ "name":"sites.org_coordinates_dist",
+ "description":"The radius around the provided zip code. Accepts these units of measurements [NM, nmi, nauticalmiles, mi, miles, yd, yards, ft, feet, in, inch, km, kilometers, cm, centimeters, mm, milimeters, m, meters]. If not provided defaults to 25mi.Same as the GET
endpoint, but allows you to craft a JSON body as the request.
Example:
curl -XPOST 'https://clinicaltrialsapi.cancer.gov/v2/trials' -H 'Content-Type: application/json' -d '{
\"sites.org_state_or_province\": [\"CA\", \"OR\"],
\"record_verification_date_gte\": \"2016-06-01\",
\"include\": [\"nci_id\"]
}'
",
+ "operationId":"searchTrialsByPost",
+ "requestBody":{
+ "description":"Query in JSON format",
+ "required":true,
+ "content":{
+ "application/json":{
+ "schema":{
+ "type":"object"
+ },
+ "examples":{
+ "":{
+ "value":""
+ },
+ "Organizations in CO or OR since 2016-06-01, show only nci_id and nct_id":{
+ "value":{
+ "sites.org_state_or_province":[
+ "CA",
+ "OR"
+ ],
+ "record_verification_date_gte":"2016-06-01",
+ "include":[
+ "nci_id",
+ "nct_id"
+ ]
+ }
+ },
+ "equivalent of \"_trial_ids=OSU-14078\" from v1":{
+ "value":{
+ "keyword":"OSU-14078",
+ "keyword_field":[
+ "ccr_id",
+ "ctep_id",
+ "dcp_id",
+ "nci_id",
+ "nct_id",
+ "other_ids.value",
+ "protocol_id"
+ ],
+ "include":[
+ "ccr_id",
+ "ctep_id",
+ "dcp_id",
+ "nci_id",
+ "nct_id",
+ "other_ids.value",
+ "protocol_id"
+ ]
+ }
+ },
+ "Search for \"breast cancer\" in brief title or in lead_org":{
+ "value":{
+ "keyword":"breast cancer",
+ "keyword_field":[
+ "brief_title._fulltext",
+ "lead_org._auto"
+ ],
+ "include":[
+ "nci_id",
+ "nct_id",
+ "brief_title",
+ "lead_org"
+ ]
+ }
+ },
+ "Export all trial information as json file":{
+ "value":{
+ "export":"true",
+ "export_type":"json",
+ "filename":"all_trials",
+ "email":"user@your-email.com"
+ }
+ },
+ "Export nci_id, brief title, and lead organization information for all trials related to breast cancer as excel file":{
+ "value":{
+ "export":"true",
+ "export_type":"excel",
+ "filename":"breast_cancer_trials",
+ "email":"user@your-email.com",
+ "keyword":"breast cancer",
+ "include":[
+ "nci_id",
+ "brief_title",
+ "lead_org"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses":{
+ "200":{
+ "description":"The list of results matching given search criteria.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/TrialResponse"
}
- }
- },
- {
- "in":"query",
- "name":"parent_ids",
- "description":"Setting the parent_id value will get you a direct child along a biomarker path.",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "C98357":{
- "value":"C98357"
- },
- "C25871":{
- "value":"C25871"
- },
- "C98303":{
- "value":"C98303"
- },
- "C131912":{
- "value":"C131912"
- }
- }
- },
- {
- "in":"query",
- "name":"ancestor_ids",
- "description":"Setting an ancestor_ids value will get you any of the children along a biomarker path.",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "C98357":{
- "value":"C98357"
- },
- "C25871":{
- "value":"C25871"
- },
- "C98303":{
- "value":"C98303"
- },
- "C131912":{
- "value":"C131912"
- }
- }
- },
- {
- "in":"query",
- "name":"codes",
- "description":"",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "C3367":{
- "value":"C3367"
- },
- "C7057":{
- "value":"C7057"
- },
- "C25871":{
- "value":"C25871"
- },
- "C98303":{
- "value":"C98303"
- },
- "C131912":{
- "value":"C131912"
- }
- }
- },
- {
- "in":"query",
- "name":"assay_purpose",
- "description":"Why the biomarker is being measured",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "":{
- "value":""
- },
- "Eligibility Criterion - Exclusion":{
- "value":"Eligibility Criterion - Exclusion"
- },
- "Eligibility Criterion - Inclusion":{
- "value":"Eligibility Criterion - Inclusion"
- }
- }
- },
- {
- "in":"query",
- "name":"semantic_types",
- "description":"Broad subject categories that provide a consistent categorization of all concepts represented",
- "required":false,
- "schema":{
- "type":"string"
- }
- },
- {
- "in":"query",
- "name":"include",
- "description":"Include only this field(s) in trials and exclude others. Use multiple times to include multiple fields. (Useful if you want to minimize the payload returned)",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "all fields":{
- "value":""
- },
- "no data; just get the count":{
- "value":"none"
- },
- "name":{
- "value":"name"
- },
- "eligibility_criterion":{
- "value":"eligibility_criterion"
- },
- "codes":{
- "value":"codes"
- },
- "type":{
- "value":"type"
- },
- "parent_ids":{
- "value":"parent_ids"
- },
- "ancestor_ids":{
- "value":"ancestor_ids"
- },
- "synonyms":{
- "value":"synonyms"
- },
- "count":{
- "value":"count"
- }
- }
- },
- {
- "in":"query",
- "name":"sort",
- "description":"Default set to 'name'. Currently works only for name
and count
.",
- "required":false,
- "schema":{
- "type":"string"
- },
- "examples":{
- "use default":{
- "value":""
- },
- "name":{
- "value":"name"
- },
- "count":{
- "value":"count"
- },
- "code (Not available. Will result in 400 response code)":{
- "value":"code"
- },
- "type (Not available. Will result in 400 response code)":{
- "value":"type"
- },
- "parent_ids (Not available. Will result in 400 response code)":{
- "value":"parent_ids"
- }
- }
- },
- {
- "$ref":"#/components/parameters/order"
- },
- {
- "$ref":"#/components/parameters/size"
- }
- ],
- "responses":{
- "200":{
- "description":"The list matching given search criteria."
- },
- "400":{
- "description":"Bad Request."
- },
- "500":{
- "description":"An exception occurred at the backend."
- },
- "502":{
- "description":"An exception occurred at the backend."
- }
- }
- }
- }
- }
- }
\ No newline at end of file
+ }
+ }
+ },
+ "400":{
+ "description":"Bad Request."
+ },
+ "500":{
+ "description":"Exception occurred at the backend (except EntityNotFoundException)."
+ },
+ "502":{
+ "description":"An exception occurred at the backend."
+ }
+ }
+ }
+ },
+ "/interventions":{
+ "get":{
+ "tags":[
+ "Interventions"
+ ],
+ "summary":"Search Interventions by GET",
+ "security":[
+ {
+ "ApiKeyAuth":[
+
+ ]
+ }
+ ],
+ "description":"The interventions
endpoint is intended for typeaheads and other use cases where it is necessary to search for available interventions which can later be used to filter clinical trial results. Interventions are matched partially by supplying a string to the name
field and may be filtered by other fields through parameters described below. Results are sorted by a combination of in alphabetical order by default i.e sort is set to name and order is set to asc.
Example interventions?category=agent%20category&name=Therapeutic
Progressive Filtering functionality: All trial fields parameters described at the /trials endpoint are usable here to filter the trials from which you want to aggregate. For example, if you request /interventions?maintype=C4872 this will give you all interventions that are in trials where Breast Cancer(C4872) is among the diseases in each trial. Note that maintype is a trials endpoint parameter related to diseases.nci_thesaurus_concept_id.
When searching in the interventions Endpoint with multiple values for the following parameters (codes, category, type), API will treat values as an OR condition and will return data that contains one or the other that is being searched.
Examples
codes and code parameters will be used interchangeably within CTS API V2
name
and count
.",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "use default":{
+ "value":""
+ },
+ "name":{
+ "value":"name"
+ },
+ "count":{
+ "value":"count"
+ },
+ "category (Not available. Will result in 400 response code)":{
+ "value":"category"
+ },
+ "code (Not available. Will result in 400 response code)":{
+ "value":"code"
+ },
+ "type (Not available. Will result in 400 response code)":{
+ "value":"type"
+ },
+ "parent_ids (Not available. Will result in 400 response code)":{
+ "value":"parent_ids"
+ }
+ }
+ },
+ {
+ "$ref":"#/components/parameters/order"
+ },
+ {
+ "$ref":"#/components/parameters/size"
+ }
+ ],
+ "responses":{
+ "200":{
+ "description":"The list matching given search criteria."
+ },
+ "400":{
+ "description":"Bad Request."
+ },
+ "500":{
+ "description":"An exception occurred at the backend."
+ },
+ "502":{
+ "description":"An exception occurred at the backend."
+ }
+ }
+ }
+ },
+ "/diseases":{
+ "get":{
+ "tags":[
+ "Diseases"
+ ],
+ "summary":"Search Diseases by GET",
+ "security":[
+ {
+ "ApiKeyAuth":[
+
+ ]
+ }
+ ],
+ "description":"The diseases
endpoint is intended for typeaheads and other use cases where it is necessary to search for available diseases which can later be used to filter clinical trial results. Diseases are matched partially by supplying a string to the name
field and may be filtered by other fields through parameters described below. Results are sorted by a combination of in alphabetical order by default i.e sort is set to name and order is set to asc.
Example: diseases?type_not=subtype&type=maintype&name=He
Progressive Filtering functionality: All trial fields parameters described at the /trials endpoint are usable here to filter the trials from which you want to aggregate. For example, if you request /diseases?maintype=C4872 this will give you all diseases that are in trials where Breast Cancer(C4872) is among the diseases in each trial. Note that maintype is a trials endpoint parameter related to diseases.nci_thesaurus_concept_id.
When searching in the Diseases Endpoint with multiple values for the following parameters (codes, ancestor_ids, parent_ids, type), API will treat values as an OR condition and will return data that satisfies at least one of the condition being searched.
Examplescodes and code parameters will be used interchangeably within CTS API V2
name
and count
.",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "use default":{
+ "value":""
+ },
+ "name":{
+ "value":"name"
+ },
+ "count":{
+ "value":"count"
+ },
+ "code (Not available. Will result in 400 response code)":{
+ "value":"code"
+ },
+ "type (Not available. Will result in 400 response code)":{
+ "value":"type"
+ },
+ "parent_ids (Not available. Will result in 400 response code)":{
+ "value":"parent_ids"
+ }
+ }
+ },
+ {
+ "$ref":"#/components/parameters/order"
+ },
+ {
+ "$ref":"#/components/parameters/size"
+ }
+ ],
+ "responses":{
+ "200":{
+ "description":"The list matching given search criteria."
+ },
+ "400":{
+ "description":"Bad Request."
+ },
+ "500":{
+ "description":"An exception occurred at the backend."
+ },
+ "502":{
+ "description":"An exception occurred at the backend."
+ }
+ }
+ }
+ },
+ "/organizations":{
+ "get":{
+ "tags":[
+ "Organizations"
+ ],
+ "summary":"Search Organizations by GET",
+ "security":[
+ {
+ "ApiKeyAuth":[
+
+ ]
+ }
+ ],
+ "description":"The organizations
endpoint is intended for typeaheads and other use cases where it is necessary to search for available organizations which can later be used to filter clinical trial results. Organizations are matched partially by supplying a string to the name
field and may be filtered by other fields through parameters described below. Results are sorted by a combination of in alphabetical order by default i.e sort is set to name and order is set to asc.
Example: organizations?org_city=Las Vegas&org_country=United States&name=University
Progressive Filtering functionality: All trial fields parameters described at the /trials endpoint are usable here to filter the trials from which you want to aggregate. For example, if you request /organizations?maintype=C4872 this will give you all organizations that are in trials where Breast Cancer(C4872) is among the diseases in each trial. Note that maintype is a trials endpoint parameter related to diseases.nci_thesaurus_concept_id.
name
.",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "use default":{
+ "value":""
+ },
+ "name":{
+ "value":"name"
+ },
+ "count":{
+ "value":"count"
+ },
+ "contact_name (Not available. Will result in 400 response code)":{
+ "value":"contact_name"
+ },
+ "contact_email (Not available. Will result in 400 response code)":{
+ "value":"contact_email"
+ },
+ "org_country (Not available. Will result in 400 response code)":{
+ "value":"org_country"
+ },
+ "org_state_or_province (Not available. Will result in 400 response code)":{
+ "value":"org_state_or_province"
+ }
+ }
+ },
+ {
+ "$ref":"#/components/parameters/order"
+ },
+ {
+ "$ref":"#/components/parameters/size"
+ }
+ ],
+ "responses":{
+ "200":{
+ "description":"The list matching given search criteria."
+ },
+ "400":{
+ "description":"Bad Request."
+ },
+ "500":{
+ "description":"An exception occurred at the backend."
+ },
+ "502":{
+ "description":"An exception occurred at the backend."
+ }
+ }
+ }
+ },
+ "/biomarkers":{
+ "get":{
+ "tags":[
+ "Biomarkers"
+ ],
+ "summary":"Search Biomarkers by GET",
+ "security":[
+ {
+ "ApiKeyAuth":[
+
+ ]
+ }
+ ],
+ "description":"The biomarkers
endpoint is intended for typeaheads and other use cases where it is necessary to search for available biomarkers which can later be used to filter clinical trial results. Biomarkers are matched partially by supplying a string to the name
field and may be filtered by other fields through parameters described below. Results are sorted by a combination of in alphabetical order by default i.e sort is set to name and order is set to asc.
Example: biomarkers?eligibility_criterion=inclusion&name=estrogen
Progressive Filtering functionality: All trial fields parameters described at the /trials endpoint are usable here to filter the trials from which you want to aggregate. For example, if you request /biomarkers?maintype=C4872 this will give you all biomarkers that are in trials where Breast Cancer(C4872) is among the diseases in each trial. Note that maintype is a trials endpoint parameter related to diseases.nci_thesaurus_concept_id.
name
and count
.",
+ "required":false,
+ "schema":{
+ "type":"string"
+ },
+ "examples":{
+ "use default":{
+ "value":""
+ },
+ "name":{
+ "value":"name"
+ },
+ "count":{
+ "value":"count"
+ },
+ "code (Not available. Will result in 400 response code)":{
+ "value":"code"
+ },
+ "type (Not available. Will result in 400 response code)":{
+ "value":"type"
+ },
+ "parent_ids (Not available. Will result in 400 response code)":{
+ "value":"parent_ids"
+ }
+ }
+ },
+ {
+ "$ref":"#/components/parameters/order"
+ },
+ {
+ "$ref":"#/components/parameters/size"
+ }
+ ],
+ "responses":{
+ "200":{
+ "description":"The list matching given search criteria."
+ },
+ "400":{
+ "description":"Bad Request."
+ },
+ "500":{
+ "description":"An exception occurred at the backend."
+ },
+ "502":{
+ "description":"An exception occurred at the backend."
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/NCIClinicalTrialsSearchAPI/.openapi-generator/FILES b/NCIClinicalTrialsSearchAPI/.openapi-generator/FILES
index d11b538..9a05b42 100644
--- a/NCIClinicalTrialsSearchAPI/.openapi-generator/FILES
+++ b/NCIClinicalTrialsSearchAPI/.openapi-generator/FILES
@@ -15,16 +15,48 @@ OpenAPIClient/Classes/OpenAPIs/Extensions.swift
OpenAPIClient/Classes/OpenAPIs/JSONDataEncoding.swift
OpenAPIClient/Classes/OpenAPIs/JSONEncodingHelper.swift
OpenAPIClient/Classes/OpenAPIs/Models.swift
+OpenAPIClient/Classes/OpenAPIs/Models/Arm.swift
+OpenAPIClient/Classes/OpenAPIs/Models/CentralContact.swift
+OpenAPIClient/Classes/OpenAPIs/Models/Collaborators.swift
+OpenAPIClient/Classes/OpenAPIs/Models/Coordinates.swift
+OpenAPIClient/Classes/OpenAPIs/Models/Disease.swift
+OpenAPIClient/Classes/OpenAPIs/Models/Eligibility.swift
+OpenAPIClient/Classes/OpenAPIs/Models/Identifier.swift
+OpenAPIClient/Classes/OpenAPIs/Models/Intervention.swift
+OpenAPIClient/Classes/OpenAPIs/Models/Masking.swift
+OpenAPIClient/Classes/OpenAPIs/Models/OutcomeMeasure.swift
+OpenAPIClient/Classes/OpenAPIs/Models/Site.swift
+OpenAPIClient/Classes/OpenAPIs/Models/StatusHistory.swift
+OpenAPIClient/Classes/OpenAPIs/Models/StructuredEligibility.swift
+OpenAPIClient/Classes/OpenAPIs/Models/TrialDetail.swift
+OpenAPIClient/Classes/OpenAPIs/Models/TrialResponse.swift
+OpenAPIClient/Classes/OpenAPIs/Models/UnstructuredEligibility.swift
OpenAPIClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift
OpenAPIClient/Classes/OpenAPIs/SynchronizedDictionary.swift
OpenAPIClient/Classes/OpenAPIs/URLSessionImplementations.swift
OpenAPIClient/Classes/OpenAPIs/Validation.swift
Package.swift
README.md
+docs/Arm.md
docs/BiomarkersAPI.md
+docs/CentralContact.md
+docs/Collaborators.md
+docs/Coordinates.md
+docs/Disease.md
docs/DiseasesAPI.md
+docs/Eligibility.md
+docs/Identifier.md
+docs/Intervention.md
docs/InterventionsAPI.md
+docs/Masking.md
docs/OrganizationsAPI.md
+docs/OutcomeMeasure.md
+docs/Site.md
+docs/StatusHistory.md
+docs/StructuredEligibility.md
+docs/TrialDetail.md
+docs/TrialResponse.md
docs/TrialsAPI.md
+docs/UnstructuredEligibility.md
git_push.sh
project.yml
diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/APIs.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/APIs.swift
index 716a394..f6a5fc8 100644
--- a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/APIs.swift
+++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/APIs.swift
@@ -9,7 +9,7 @@ import Foundation
import FoundationNetworking
#endif
open class OpenAPIClientAPI {
- public static var basePath = "https://clinicaltrialsapi-int.cancer.gov/api/v2"
+ public static var basePath = "https://clinicaltrialsapi.cancer.gov/api/v2"
public static var customHeaders: [String: String] = [:]
public static var credential: URLCredential?
public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory()
diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/APIs/TrialsAPI.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/APIs/TrialsAPI.swift
index b533de5..616d0f3 100644
--- a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/APIs/TrialsAPI.swift
+++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/APIs/TrialsAPI.swift
@@ -20,11 +20,11 @@ open class TrialsAPI {
- parameter completion: completion handler to receive the data and the error objects
*/
@discardableResult
- open class func getTrialById(id: String, apiResponseQueue: DispatchQueue = OpenAPIClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask {
+ open class func getTrialById(id: String, apiResponseQueue: DispatchQueue = OpenAPIClientAPI.apiResponseQueue, completion: @escaping ((_ data: TrialDetail?, _ error: Error?) -> Void)) -> RequestTask {
return getTrialByIdWithRequestBuilder(id: id).execute(apiResponseQueue) { result in
switch result {
- case .success:
- completion((), nil)
+ case let .success(response):
+ completion(response.body, nil)
case let .failure(error):
completion(nil, error)
}
@@ -40,9 +40,9 @@ open class TrialsAPI {
- name: ApiKeyAuth
- responseHeaders: [Access-Control-Allow-Origin(String)]
- parameter id: (path) NCI ID or NCT ID of Trial.
- - returns: RequestBuilder