OpenTrials API
Connect to OpenTrials API with 1 MCP tools for AI-powered API automation.
COMMUNITYNO AUTH0 INSTALLS
OpenAPI Specificationv3.0
{
"swagger": "2.0",
"host": "opentrials.local",
"basePath": "/v1",
"info": {
"title": "OpenTrials API",
"version": "0.0.1",
"x-apisguru-categories": [
"open_data"
],
"x-logo": {
"backgroundColor": "#FFFFFF",
"url": "https://api.apis.guru/v2/cache/logo/https_avatars1.githubusercontent.com_u_13900836.png"
},
"x-origin": [
{
"format": "swagger",
"url": "https://raw.githubusercontent.com/opentrials/api/master/api/swagger/swagger.yaml",
"version": "2.0"
}
],
"x-providerName": "opentrials.local"
},
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/conditions/{id}": {
"get": {
"description": "Returns condition details",
"operationId": "getCondition",
"parameters": [
{
"description": "ID of the condition",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Condition"
}
},
"404": {
"description": "Condition not found"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"conditions"
]
},
"x-swagger-router-controller": "conditions"
},
"/document_categories": {
"get": {
"description": "Returns document categories",
"operationId": "listDocumentCategories",
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/DocumentCategoryList"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"document_categories"
]
},
"x-swagger-router-controller": "document_categories"
},
"/documents": {
"get": {
"description": "Returns documents",
"operationId": "listDocuments",
"parameters": [
{
"default": 1,
"description": "The page number",
"in": "query",
"minimum": 1,
"name": "page",
"type": "integer"
},
{
"default": 20,
"description": "Number of items per page",
"in": "query",
"maximum": 100,
"minimum": 10,
"name": "per_page",
"type": "integer"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/DocumentList"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"documents"
]
},
"x-swagger-router-controller": "documents"
},
"/documents/{id}": {
"get": {
"description": "Returns details of a document",
"operationId": "getDocument",
"parameters": [
{
"description": "ID of the document",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Document"
}
},
"404": {
"description": "Document not found"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"documents"
]
},
"x-swagger-router-controller": "documents"
},
"/fda_applications": {
"get": {
"description": "Returns FDA applications",
"operationId": "listFDAApplications",
"parameters": [
{
"default": 1,
"description": "The page number",
"in": "query",
"minimum": 1,
"name": "page",
"type": "integer"
},
{
"default": 20,
"description": "Number of items per page",
"in": "query",
"maximum": 100,
"minimum": 10,
"name": "per_page",
"type": "integer"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/FDAApplicationList"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"fda_applications"
]
},
"x-swagger-router-controller": "fda_applications"
},
"/fda_applications/{id}": {
"get": {
"description": "Returns an FDA application details",
"operationId": "getFDAApplication",
"parameters": [
{
"description": "ID of the FDA application",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/FDAApplication"
}
},
"404": {
"description": "FDA application not found"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"fda_applications"
]
},
"x-swagger-router-controller": "fda_applications"
},
"/interventions/{id}": {
"get": {
"description": "Returns intervention details",
"operationId": "getIntervention",
"parameters": [
{
"description": "ID of the intervention",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Intervention"
}
},
"404": {
"description": "Intervention not found"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"interventions"
]
},
"x-swagger-router-controller": "interventions"
},
"/organisations/{id}": {
"get": {
"description": "Returns organisation details",
"operationId": "getOrganisation",
"parameters": [
{
"description": "ID of the organisation",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Organisation"
}
},
"404": {
"description": "Organisation not found"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"organisations"
]
},
"x-swagger-router-controller": "organisations"
},
"/persons/{id}": {
"get": {
"description": "Returns person details",
"operationId": "getPerson",
"parameters": [
{
"description": "ID of the person",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Person"
}
},
"404": {
"description": "Person not found"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"persons"
]
},
"x-swagger-router-controller": "persons"
},
"/publications/{id}": {
"get": {
"description": "Returns publication details",
"operationId": "getPublication",
"parameters": [
{
"description": "ID of the publication",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Publication"
}
},
"404": {
"description": "Publication not found"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"publications"
]
},
"x-swagger-router-controller": "publications"
},
"/search": {
"get": {
"description": "Returns trials based on a search query. By default, it'll search in all of a trial's attributes.\n- `q` is a [ElasticSearch query string](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/query-dsl-query-string-query.html#query-string-syntax) (e.g. `public_title:(depressive OR depression)`)\n- `page` can take a value between `1` and `100`\n- `per_page` can take a value between `10` and `100`",
"operationId": "searchTrials",
"parameters": [
{
"description": "The search query (follows the [ElasticSearch Query String](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/query-dsl-query-string-query.html#query-string-syntax) syntax)",
"in": "query",
"name": "q",
"type": "string"
},
{
"default": 1,
"description": "The page number",
"in": "query",
"maximum": 100,
"minimum": 1,
"name": "page",
"type": "integer"
},
{
"default": 20,
"description": "Number of items per page",
"in": "query",
"maximum": 100,
"minimum": 10,
"name": "per_page",
"type": "integer"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/TrialSearchResults"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"trials"
]
},
"x-swagger-router-controller": "search"
},
"/search/autocomplete/{in}": {
"get": {
"description": "Autocomplete search feature for supported database entities (`location`). It has the same options as a regular `search` operation, with an extra **required** `in` parameter indicating the entity type to search.",
"operationId": "autocomplete",
"parameters": [
{
"description": "The entity to search for",
"enum": [
"location"
],
"in": "path",
"name": "in",
"required": true,
"type": "string"
},
{
"description": "The search query",
"in": "query",
"name": "q",
"type": "string"
},
{
"default": 1,
"description": "The page number",
"in": "query",
"maximum": 100,
"minimum": 1,
"name": "page",
"type": "integer"
},
{
"default": 20,
"description": "Number of items per page",
"in": "query",
"maximum": 100,
"minimum": 10,
"name": "per_page",
"type": "integer"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/AutocompleteResults"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"search"
]
},
"x-swagger-router-controller": "search"
},
"/search/fda_documents": {
"get": {
"description": "Search the FDA documents",
"operationId": "searchFDADocuments",
"parameters": [
{
"description": "The search query (follows the [ElasticSearch Query String](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/query-dsl-query-string-query.html#query-string-syntax) syntax)",
"in": "query",
"name": "q",
"type": "string"
},
{
"description": "Search query on the documents file's text (follows the [ElasticSearch Simple Query String](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/query-dsl-simple-query-string-query.html#_simple_query_string_syntax) syntax)",
"in": "query",
"name": "text",
"type": "string"
},
{
"default": 1,
"description": "The page number",
"in": "query",
"maximum": 100,
"minimum": 1,
"name": "page",
"type": "integer"
},
{
"default": 20,
"description": "Number of items per page",
"in": "query",
"maximum": 100,
"minimum": 10,
"name": "per_page",
"type": "integer"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/FDADocumentSearchResults"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"search"
]
},
"x-swagger-router-controller": "search"
},
"/sources": {
"get": {
"description": "Returns list of sources",
"operationId": "list",
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/SourceList"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"sources"
]
},
"x-swagger-router-controller": "sources"
},
"/swagger.yaml": {
"x-swagger-pipe": "swagger_raw"
},
"/trials/{id}": {
"get": {
"description": "Returns a trial's details and related entities (e.g. `conditions`).",
"operationId": "getTrial",
"parameters": [
{
"description": "ID of the trial",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Trial"
}
},
"404": {
"description": "Trial not found"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"trials"
]
},
"x-swagger-router-controller": "trials"
},
"/trials/{id}/records": {
"get": {
"description": "Returns a trial's raw records from its sources",
"operationId": "getRecords",
"parameters": [
{
"description": "ID of the trial",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/RecordList"
}
},
"404": {
"description": "Trial not found"
}
},
"tags": [
"trials"
]
},
"x-swagger-router-controller": "trials"
},
"/trials/{trialId}/records/{id}": {
"get": {
"description": "Returns a trial's raw record from its sources",
"operationId": "getRecord",
"parameters": [
{
"description": "ID of the trial",
"in": "path",
"name": "trialId",
"required": true,
"type": "string"
},
{
"description": "ID of the trial's record",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Record"
}
},
"404": {
"description": "Trial not found"
}
},
"tags": [
"trials"
]
},
"x-swagger-router-controller": "trials"
}
},
"definitions": {
"AutocompleteResult": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"AutocompleteResults": {
"properties": {
"items": {
"items": {
"$ref": "#/definitions/AutocompleteResult"
},
"type": "array"
},
"total_count": {
"type": "integer"
}
},
"required": [
"total_count",
"items"
],
"type": "object"
},
"Condition": {
"properties": {
"id": {
"description": "ID of the condition",
"type": "string"
},
"name": {
"description": "Name of the condition",
"type": "string"
},
"url": {
"description": "OpenTrials API URL of the condition",
"type": "string"
}
},
"required": [
"id",
"name",
"url"
],
"type": "object"
},
"Discrepancies": {
"description": "Object listing the Trial's discrepant fields",
"properties": {
"gender": {
"items": {
"$ref": "#/definitions/DiscrepantFieldString"
},
"type": "array"
},
"has_published_results": {
"items": {
"$ref": "#/definitions/DiscrepantFieldBoolean"
},
"type": "array"
},
"recruitment_status": {
"items": {
"$ref": "#/definitions/DiscrepantFieldString"
},
"type": "array"
},
"status": {
"items": {
"$ref": "#/definitions/DiscrepantFieldString"
},
"type": "array"
},
"target_sample_size": {
"items": {
"$ref": "#/definitions/DiscrepantFieldInteger"
},
"type": "array"
}
},
"type": "object"
},
"DiscrepancyFieldBase": {
"properties": {
"record_id": {
"type": "string"
},
"source_name": {
"type": "string"
}
},
"required": [
"record_id",
"source_name"
],
"type": "object"
},
"DiscrepantFieldBoolean": {
"allOf": [
{
"$ref": "#/definitions/DiscrepancyFieldBase"
},
{
"properties": {
"value": {
"type": "boolean"
}
},
"type": "object"
}
],
"type": "object"
},
"DiscrepantFieldInteger": {
"allOf": [
{
"$ref": "#/definitions/DiscrepancyFieldBase"
},
{
"properties": {
"value": {
"type": "integer"
}
},
"type": "object"
}
],
"type": "object"
},
"DiscrepantFieldString": {
"allOf": [
{
"$ref": "#/definitions/DiscrepancyFieldBase"
},
{
"properties": {
"value": {
"type": "string"
}
},
"type": "object"
}
],
"type": "object"
},
"Document": {
"properties": {
"document_category": {
"$ref": "#/definitions/DocumentCategory",
"type": "object"
},
"fda_application": {
"$ref": "#/definitions/FDAApplication"
},
"file": {
"$ref": "#/definitions/File",
"type": "object"
},
"id": {
"description": "ID of the document",
"type": "string"
},
"name": {
"type": "string"
},
"source": {
"$ref": "#/definitions/Source",
"type": "object"
},
"source_url": {
"description": "URL of origin for this document",
"type": "string"
},
"trials": {
"items": {
"$ref": "#/definitions/TrialSummary"
},
"type": "array"
},
"url": {
"description": "OpenTrials API URL of the document",
"type": "string"
}
},
"required": [
"id",
"name",
"url",
"document_category"
],
"type": "object"
},
"DocumentCategory": {
"properties": {
"group": {
"description": "Name of document category",
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"description": "Name of document sub-category",
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"DocumentCategoryList": {
"properties": {
"items": {
"items": {
"$ref": "#/definitions/DocumentCategory"
},
"type": "array"
},
"total_count": {
"type": "integer"
}
},
"required": [
"total_count",
"items"
],
"type": "object"
},
"DocumentList": {
"properties": {
"items": {
"items": {
"$ref": "#/definitions/DocumentSummary"
},
"type": "array"
},
"total_count": {
"type": "integer"
}
},
"required": [
"total_count",
"items"
],
"type": "object"
},
"DocumentSummary": {
"properties": {
"document_category": {
"$ref": "#/definitions/DocumentCategory",
"type": "object"
},
"fda_application": {
"$ref": "#/definitions/FDAApplication"
},
"file": {
"$ref": "#/definitions/FileSummary",
"type": "object"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"source_id": {
"description": "ID of the document's source",
"type": "string"
},
"source_url": {
"description": "URL of origin for this document",
"type": "string"
},
"trials": {
"items": {
"$ref": "#/definitions/TrialSummary"
},
"type": "array"
},
"url": {
"description": "OpenTrials API URL of the document",
"type": "string"
}
},
"required": [
"id",
"name",
"url",
"document_category"
],
"type": "object"
},
"ErrorResponse": {
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
],
"type": "object"
},
"FDAApplication": {
"properties": {
"active_ingredients": {
"description": "Active ingredients contained in the drug",
"type": "string"
},
"drug_name": {
"description": "Name of the drug",
"type": "string"
},
"fda_approvals": {
"description": "Associated FDA approvals",
"items": {
"$ref": "#/definitions/FDAApproval"
},
"type": "array"
},
"id": {
"description": "FDA application ID",
"type": "string"
},
"organisation": {
"$ref": "#/definitions/Organisation",
"description": "Associated organisation",
"type": "object"
},
"type": {
"description": "The FDA application type (e.g. \"NDA\", \"ANDA\", etc.)",
"type": "string"
},
"url": {
"description": "OpenTrials API URL for this FDA application",
"type": "string"
}
},
"required": [
"id",
"url"
],
"type": "object"
},
"FDAApplicationList": {
"properties": {
"items": {
"items": {
"$ref": "#/definitions/FDAApplication"
},
"type": "array"
},
"total_count": {
"type": "integer"
}
},
"required": [
"total_count",
"items"
],
"type": "object"
},
"FDAApproval": {
"properties": {
"action_date": {
"format": "date-time",
"type": "string"
},
"fda_application": {
"$ref": "#/definitions/FDAApplication"
},
"id": {
"description": "FDA approval ID",
"type": "string"
},
"notes": {
"description": "Additional information about the FDA approval",
"type": "string"
},
"supplement_number": {
"type": "integer"
},
"type": {
"description": "Type of FDA approval",
"type": "string"
}
},
"required": [
"id",
"action_date",
"supplement_number",
"type"
],
"type": "object"
},
"FDADocumentSearchResult": {
"allOf": [
{
"$ref": "#/definitions/DocumentSummary"
},
{
"properties": {
"file": {
"$ref": "#/definitions/File"
}
},
"type": "object"
}
]
},
"FDADocumentSearchResults": {
"properties": {
"items": {
"items": {
"$ref": "#/definitions/FDADocumentSearchResult"
},
"type": "array"
},
"total_count": {
"type": "integer"
}
},
"required": [
"total_count",
"items"
],
"type": "object"
},
"File": {
"allOf": [
{
"$ref": "#/definitions/FileSummary"
},
{
"properties": {
"pages": {
"description": "Array with text of each of the file's pages",
"items": {
"properties": {
"num": {
"description": "Page number",
"minimum": 1,
"type": "integer"
},
"text": {
"type": "string"
}
},
"required": [
"num",
"text"
],
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
],
"type": "object"
},
"FileSummary": {
"properties": {
"documentcloud_id": {
"type": "string"
},
"id": {
"description": "ID of the file",
"type": "string"
},
"sha1": {
"type": "string"
},
"source_url": {
"description": "URL of origin for this file",
"type": "string"
}
},
"type": "object"
},
"Intervention": {
"properties": {
"id": {
"description": "ID of the intervention",
"type": "string"
},
"name": {
"description": "Name of the intervention",
"type": "string"
},
"type": {
"description": "Type of the intervention (drug / other)",
"enum": [
"drug",
"procedure",
"other"
],
"type": "string"
},
"url": {
"description": "OpenTrials API URL of the intervention",
"type": "string"
}
},
"required": [
"id",
"name",
"url"
],
"type": "object"
},
"Location": {
"properties": {
"id": {
"description": "ID of the location",
"type": "string"
},
"name": {
"description": "Name of the location",
"type": "string"
},
"type": {
"description": "Type of the location (country / city / other)",
"enum": [
"country",
"city",
"other"
],
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"Organisation": {
"properties": {
"id": {
"description": "ID of the organisation",
"type": "string"
},
"name": {
"description": "Name of the organisation",
"type": "string"
},
"url": {
"description": "OpenTrials API URL of the organisation",
"type": "string"
}
},
"required": [
"id",
"name",
"url"
],
"type": "object"
},
"Person": {
"properties": {
"id": {
"description": "ID of the person",
"type": "string"
},
"name": {
"description": "Name of the person",
"type": "string"
},
"url": {
"description": "OpenTrials API URL of the person",
"type": "string"
}
},
"required": [
"id",
"name",
"url"
],
"type": "object"
},
"Publication": {
"properties": {
"abstract": {
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"type": "array"
},
"created_at": {
"format": "date-time",
"type": "string"
},
"date": {
"format": "date-time",
"type": "string"
},
"id": {
"description": "ID of the publication",
"type": "string"
},
"journal": {
"type": "string"
},
"slug": {
"type": "string"
},
"source": {
"$ref": "#/definitions/Source"
},
"source_url": {
"type": "string"
},
"title": {
"type": "string"
},
"updated_at": {
"format": "date-time",
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"url",
"source",
"source_url",
"title",
"abstract"
],
"type": "object"
},
"PublicationSummary": {
"properties": {
"id": {
"type": "string"
},
"source_id": {
"type": "string"
},
"source_url": {
"type": "string"
},
"title": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"url",
"title",
"source_id",
"source_url"
],
"type": "object"
},
"Record": {
"properties": {
"created_at": {
"description": "Date when the record was created",
"format": "date-time",
"type": "string"
},
"id": {
"description": "ID of the record",
"type": "string"
},
"identifiers": {
"description": "Object that maps the trial's sources ids with its identifiers.",
"type": "object"
},
"is_primary": {
"description": "Is this record the primary source of data for its trial",
"type": "boolean"
},
"last_verification_date": {
"description": "Date when the record's data was last verified by provider",
"format": "date-time",
"type": "string"
},
"public_title": {
"description": "Title of the record",
"type": "string"
},
"recruitment_status": {
"description": "Trial's recruitment status (e.g. recruiting, unknown etc.)",
"enum": [
"recruiting",
"not_recruiting",
"unknown",
"other"
],
"type": "string"
},
"source": {
"$ref": "#/definitions/Source"
},
"source_id": {
"description": "ID of the record's source",
"type": "string"
},
"source_url": {
"description": "URL of the record's source (where it was collected from)",
"type": "string"
},
"status": {
"description": "Trial's status (e.g. ongoing, withdrawn, complete etc.)",
"enum": [
"ongoing",
"withdrawn",
"suspended",
"terminated",
"complete",
"unknown",
"other"
],
"type": "string"
},
"trial_id": {
"description": "ID of the trial referenced in the record",
"type": "string"
},
"trial_url": {
"description": "OpenTrials API URL of the trial referenced in the record",
"type": "string"
},
"updated_at": {
"description": "Date when the record was updated",
"format": "date-time",
"type": "string"
},
"url": {
"description": "OpenTrials API URL of the record",
"type": "string"
}
},
"required": [
"id",
"url",
"trial_id",
"trial_url",
"source",
"source_url",
"public_title",
"created_at",
"updated_at"
],
"type": "object"
},
"RecordList": {
"items": {
"$ref": "#/definitions/Record"
},
"type": "array"
},
"RecordSummary": {
"properties": {
"id": {
"type": "string"
},
"is_primary": {
"type": "boolean"
},
"last_verification_date": {
"format": "date-time",
"type": "string"
},
"source_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"url",
"source_id"
],
"type": "object"
},
"RiskOfBias": {
"properties": {
"id": {
"type": "string"
},
"risk_of_bias_criteria": {
"items": {
"$ref": "#/definitions/RiskOfBiasCriteria"
},
"type": "array"
},
"source_id": {
"type": "string"
},
"source_url": {
"type": "string"
},
"study_id": {
"type": "string"
}
},
"required": [
"id",
"source_id",
"source_url",
"study_id"
],
"type": "object"
},
"RiskOfBiasCriteria": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"value": {
"enum": [
"yes",
"no",
"unknown"
],
"type": "string"
}
},
"required": [
"id",
"name",
"value"
],
"type": "object"
},
"Source": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"source_url": {
"description": "URL to source's website",
"type": "string"
},
"terms_and_conditions_url": {
"type": "string"
},
"type": {
"enum": [
"register",
"journal",
"other"
],
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"SourceList": {
"items": {
"$ref": "#/definitions/Source"
},
"type": "array"
},
"Trial": {
"properties": {
"age_range": {
"properties": {
"max_age": {
"description": "Maximum participant age (e.g. \"12 Years\", \"1 Month\", \"15 Days\"). If unknown, it's `undefined`. If no limit, it's \"any\". If not applicable, it's \"N/A\".",
"type": "string"
},
"min_age": {
"description": "Minimum participant age (e.g. \"12 Years\", \"1 Month\", \"15 Days\"). If unknown, it's `undefined`. If no limit, it's \"any\". If not applicable, it's \"N/A\".",
"type": "string"
}
},
"type": "object"
},
"brief_summary": {
"description": "Summary of the trial",
"type": "string"
},
"completion_date": {
"description": "Date the trial was completed",
"format": "date-time",
"type": "string"
},
"conditions": {
"description": "Conditions the trial refers to",
"items": {
"$ref": "#/definitions/Condition"
},
"type": "array"
},
"discrepancies": {
"description": "Discrepancies in trial's details between different sources",
"items": {
"$ref": "#/definitions/Discrepancies"
},
"type": "object"
},
"documents": {
"description": "Documents related to the trial",
"items": {
"$ref": "#/definitions/DocumentSummary"
},
"type": "array"
},
"gender": {
"description": "Gender of the subjects of the trial",
"enum": [
"both",
"male",
"female"
],
"type": "string"
},
"has_published_results": {
"description": "Trial has its results published (true/false)",
"type": "boolean"
},
"id": {
"description": "ID of the trial",
"type": "string"
},
"identifiers": {
"description": "Object that maps the trial's sources ids with its identifiers.",
"type": "object"
},
"interventions": {
"description": "Interventions related to the trial",
"items": {
"$ref": "#/definitions/Intervention"
},
"type": "array"
},
"locations": {
"description": "Locations related to the trial",
"items": {
"$ref": "#/definitions/TrialLocation"
},
"type": "array"
},
"organisations": {
"description": "Organisations related to the trial",
"items": {
"$ref": "#/definitions/TrialOrganisation"
},
"type": "array"
},
"persons": {
"description": "People related to the trial",
"items": {
"$ref": "#/definitions/TrialPerson"
},
"type": "array"
},
"public_title": {
"description": "Title of the trial",
"type": "string"
},
"publications": {
"description": "Publications referring the trial",
"items": {
"$ref": "#/definitions/PublicationSummary"
},
"type": "array"
},
"records": {
"description": "(published) records of the trial",
"items": {
"$ref": "#/definitions/RecordSummary"
},
"type": "array"
},
"recruitment_status": {
"description": "Recruitment status of the trial",
"enum": [
"recruiting",
"not_recruiting",
"unknown",
"other"
],
"type": "string"
},
"registration_date": {
"description": "Date the trial was registered",
"format": "date-time",
"type": "string"
},
"results_exemption_date": {
"description": "Date when a certification of exemption has been filed for the trial",
"format": "date-time",
"type": "string"
},
"risks_of_bias": {
"items": {
"$ref": "#/definitions/RiskOfBias"
},
"type": "array"
},
"source_id": {
"description": "ID of the trial's source",
"type": "string"
},
"sources": {
"items": {
"$ref": "#/definitions/Source"
},
"type": "object"
},
"status": {
"description": "Completion status of the trial",
"enum": [
"ongoing",
"withdrawn",
"suspended",
"terminated",
"complete",
"unknown",
"other"
],
"type": "string"
},
"study_phase": {
"description": "Phases of the study (e.g. `[\"Phase 2\"]` or `[\"Phase 1\", \"Phase 2\"]`)",
"items": {
"type": "string"
},
"type": "array"
},
"target_sample_size": {
"description": "Target sample size for the trial",
"minimum": 0,
"type": "integer"
},
"url": {
"description": "Source URL (where the trial was collected from)",
"type": "string"
}
},
"required": [
"id",
"url",
"public_title",
"locations",
"interventions",
"persons",
"organisations",
"records",
"publications",
"sources",
"risks_of_bias"
],
"type": "object"
},
"TrialLocation": {
"allOf": [
{
"$ref": "#/definitions/Location"
},
{
"properties": {
"role": {
"enum": [
"recruitment_countries",
"other"
],
"type": "string"
}
},
"type": "object"
}
],
"description": "Location of a trial",
"type": "object"
},
"TrialOrganisation": {
"allOf": [
{
"$ref": "#/definitions/Organisation"
},
{
"properties": {
"role": {
"enum": [
"primary_sponsor",
"sponsor",
"funder",
"other"
],
"type": "string"
}
},
"type": "object"
}
],
"type": "object"
},
"TrialPerson": {
"allOf": [
{
"$ref": "#/definitions/Person"
},
{
"properties": {
"role": {
"enum": [
"principal_investigator",
"public_queries",
"scientific_queries",
"other"
],
"type": "string"
}
},
"type": "object"
}
],
"description": "People related to a trial",
"type": "object"
},
"TrialSearchResults": {
"properties": {
"items": {
"items": {
"$ref": "#/definitions/Trial"
},
"type": "array"
},
"total_count": {
"type": "integer"
}
},
"required": [
"total_count",
"items"
],
"type": "object"
},
"TrialSummary": {
"properties": {
"id": {
"description": "ID of the trial",
"type": "string"
},
"public_title": {
"description": "Title of the record",
"type": "string"
},
"url": {
"description": "OpenTrials API URL for this trial",
"type": "string"
}
},
"required": [
"id",
"url",
"public_title"
],
"type": "object"
}
}
}