{
  "openapi": "3.0.1",
  "info": {
    "title": "Clinical Trials & FDA Drug Data",
    "description": "Search ClinicalTrials.gov studies and FDA drug labels, recalls or adverse-event reaction counts. Get structured records from public government APIs.",
    "version": "1.0",
    "x-build-id": "HE5tESwCJDEjMeJH4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/miacx~clinical-trials-fda/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-miacx-clinical-trials-fda",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/miacx~clinical-trials-fda/runs": {
      "post": {
        "operationId": "runs-sync-miacx-clinical-trials-fda",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/miacx~clinical-trials-fda/run-sync": {
      "post": {
        "operationId": "run-sync-miacx-clinical-trials-fda",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "trials",
              "drug-labels",
              "recalls",
              "adverse-events"
            ],
            "type": "string",
            "description": "trials, drug-labels, recalls or adverse-events; default trials. Each successful study, label, recall or aggregate reaction-count row incurs one Record event. Adverse-events returns counts, not individual reports.",
            "default": "trials"
          },
          "query": {
            "title": "Query",
            "maxLength": 500,
            "type": "string",
            "description": "Text up to 500 characters; default \"lung cancer\". Searches trial free text, label generic name, recall product description or adverse-event medicinal product. Empty removes this filter. Set a drug name for FDA modes. Trial filters use AND; nonempty nctIds overrides them.",
            "default": "lung cancer"
          },
          "condition": {
            "title": "Condition",
            "maxLength": 500,
            "type": "string",
            "description": "Trial condition text up to 500 characters, such as \"type 2 diabetes\". Default empty applies no condition filter. Combined with other trial filters using AND; ignored in FDA modes or when nctIds is nonempty.",
            "default": ""
          },
          "intervention": {
            "title": "Intervention",
            "maxLength": 500,
            "type": "string",
            "description": "Trial intervention text up to 500 characters, such as \"pembrolizumab\". Default empty applies no intervention filter. Combined with other trial filters using AND; ignored in FDA modes or when nctIds is nonempty.",
            "default": ""
          },
          "sponsor": {
            "title": "Sponsor",
            "maxLength": 500,
            "type": "string",
            "description": "Trial sponsor text up to 500 characters, such as \"National Cancer Institute\". Default empty applies no sponsor filter. Combined with other trial filters using AND; ignored in FDA modes or when nctIds is nonempty.",
            "default": ""
          },
          "trialStatus": {
            "title": "Trial status",
            "maxLength": 500,
            "type": "string",
            "description": "RECRUITING, NOT_YET_RECRUITING, ACTIVE_NOT_RECRUITING, COMPLETED, TERMINATED, WITHDRAWN, SUSPENDED, ENROLLING_BY_INVITATION or UNKNOWN. Default empty accepts all statuses. Combined with other trial filters using AND. Validated in every mode, but only filters trials without nctIds.",
            "default": ""
          },
          "phase": {
            "title": "Phase",
            "maxLength": 500,
            "type": "string",
            "description": "EARLY_PHASE1, PHASE1, PHASE2, PHASE3, PHASE4 or NA. Default empty accepts all phases. Combined with other trial filters using AND. Validated in every mode, but only filters trials without nctIds.",
            "default": ""
          },
          "country": {
            "title": "Trial country",
            "maxLength": 500,
            "type": "string",
            "description": "Exact ClinicalTrials.gov location country, such as \"United States\", up to 500 characters. Default empty accepts all countries. Combined with other trial filters using AND; ignored in FDA modes or when nctIds is nonempty.",
            "default": ""
          },
          "dateFrom": {
            "title": "From date",
            "maxLength": 500,
            "type": "string",
            "description": "Inclusive calendar date YYYY-MM-DD; default empty leaves the lower bound open (FDA uses 1900-01-01). Filters study start, label effective date, recall initiation or adverse-event received date. Must not exceed dateTo. Validated but ignored for trial NCT-ID lookup.",
            "default": ""
          },
          "dateTo": {
            "title": "To date",
            "maxLength": 500,
            "type": "string",
            "description": "Inclusive calendar date YYYY-MM-DD; default empty leaves the upper bound open (FDA uses 2999-12-31). Filters study start, label effective date, recall initiation or adverse-event received date. Must not precede dateFrom. Validated but ignored for trial NCT-ID lookup.",
            "default": ""
          },
          "nctIds": {
            "title": "NCT IDs",
            "maxItems": 100,
            "type": "array",
            "description": "Up to 100 strings, each at most 500 characters, such as \"NCT04280705\". Trimmed, uppercased and deduplicated within the run. Default [] uses search filters. In trials mode a nonempty list overrides filters and limit; invalid or missing IDs return rows without Record charges. Ignored in FDA modes.",
            "items": {
              "type": "string",
              "maxLength": 500
            },
            "default": []
          },
          "limit": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Integer from 1 to 100; default 10. Caps the first page of studies, labels or recalls, or the top adverse-event reaction terms by count. No automatic pagination. Nonempty nctIds overrides this cap in trials mode. The spending limit can reduce delivered successful rows.",
            "default": 10
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}