{
  "openapi": "3.0.1",
  "info": {
    "title": "Biomedical Trial & Literature Evidence Report",
    "description": "Search PubMed through official NCBI E-utilities, monitor new publications, and generate citation-metadata literature reports and exports.",
    "version": "0.1",
    "x-build-id": "dIkcnumQCORrf22hf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/taroyamada~biomedical-trial-literature-evidence-report/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-taroyamada-biomedical-trial-literature-evidence-report",
        "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/taroyamada~biomedical-trial-literature-evidence-report/runs": {
      "post": {
        "operationId": "runs-sync-taroyamada-biomedical-trial-literature-evidence-report",
        "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/taroyamada~biomedical-trial-literature-evidence-report/run-sync": {
      "post": {
        "operationId": "run-sync-taroyamada-biomedical-trial-literature-evidence-report",
        "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": {
          "searchTerms": {
            "title": "PubMed search terms",
            "type": "array",
            "description": "PubMed query strings passed to NCBI ESearch.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "pmids": {
            "title": "PMIDs",
            "type": "array",
            "description": "Known PubMed IDs to summarize directly.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "fromDate": {
            "title": "From publication date",
            "type": "string",
            "description": "Optional publication date lower bound accepted by PubMed.",
            "default": ""
          },
          "toDate": {
            "title": "To publication date",
            "type": "string",
            "description": "Optional publication date upper bound accepted by PubMed.",
            "default": ""
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "pub_date",
              "most_recent"
            ],
            "type": "string",
            "description": "PubMed result order for query searches.",
            "default": "most_recent"
          },
          "maxResultsPerQuery": {
            "title": "Results per query",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum PMIDs fetched from each query.",
            "default": 25
          },
          "maxArticles": {
            "title": "Maximum unique articles",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum deduplicated PubMed records processed in one run.",
            "default": 100
          },
          "maxStudiesPerWatchlist": {
            "title": "Studies per watchlist",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum ClinicalTrials.gov studies returned for each watchlist.",
            "default": 25
          },
          "maxPagesPerWatchlist": {
            "title": "Pages per watchlist",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum ClinicalTrials.gov pages fetched for each watchlist.",
            "default": 1
          },
          "runMode": {
            "title": "Run mode",
            "enum": [
              "extract",
              "audit",
              "monitor"
            ],
            "type": "string",
            "description": "Extract returns metadata, audit generates a current report, and monitor emits new PMIDs.",
            "default": "monitor"
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Stable private state namespace for a scheduled PubMed query.",
            "default": ""
          },
          "initialRunMode": {
            "title": "Initial run mode",
            "enum": [
              "baseline_only",
              "emit_backfill"
            ],
            "type": "string",
            "description": "Initial run mode for this run.",
            "default": "baseline_only"
          },
          "emitRawRows": {
            "title": "Emit raw rows",
            "type": "boolean",
            "description": "Emit citation, author, and journal metadata rows.",
            "default": false
          },
          "generateReport": {
            "title": "Generate report",
            "type": "boolean",
            "description": "Generate one query-level literature update report when matches are emitted.",
            "default": true
          },
          "generateExport": {
            "title": "Generate systematic-review export",
            "type": "boolean",
            "description": "Generate one citation metadata export for screening workflows.",
            "default": false
          },
          "tool": {
            "title": "NCBI tool name",
            "type": "string",
            "description": "Tool identifier sent to NCBI E-utilities.",
            "default": "biomedical-trial-literature-evidence-report"
          },
          "apiKey": {
            "title": "NCBI API key",
            "type": "string",
            "description": "Optional NCBI API key. NCBI_API_KEY is used when this is empty."
          },
          "timeoutMs": {
            "title": "Request timeout",
            "minimum": 1000,
            "maximum": 60000,
            "type": "integer",
            "description": "Maximum time for each NCBI request.",
            "default": 20000
          },
          "delivery": {
            "title": "Additional delivery",
            "enum": [
              "dataset",
              "webhook"
            ],
            "type": "string",
            "description": "Keep dataset only or also POST the billed row payload to an HTTPS webhook.",
            "default": "dataset"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional public HTTPS destination when delivery is webhook."
          },
          "maxChargeUsd": {
            "title": "Maximum charge (USD)",
            "minimum": 0,
            "maximum": 1000,
            "type": "number",
            "description": "Optional Actor-side spending cap; zero uses only the Apify run limit.",
            "default": 0
          },
          "dryRun": {
            "title": "Dry run",
            "type": "boolean",
            "description": "Return illustrative rows without NCBI requests or billing.",
            "default": true
          },
          "watchlists": {
            "title": "Portfolio watchlists",
            "type": "array",
            "description": "Named portfolio watch definitions.",
            "default": []
          },
          "emitUnchanged": {
            "title": "Emit unchanged",
            "type": "boolean",
            "description": "Emit unchanged for this run.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}