{
  "openapi": "3.0.1",
  "info": {
    "title": "PubMed Evidence Triage — Grade, Dedupe & Decide",
    "description": "Turn a PubMed search into a decision-ready evidence map. Grades every result on the clinical evidence hierarchy, flags retractions, groups papers from the same trial into evidence units, ranks what to read first, and detects guidelines. Deterministic, free NCBI API, no key needed.",
    "version": "2.0",
    "x-build-id": "ZTGGg41IH9xhV6KtI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~pubmed-research-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-pubmed-research-search",
        "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/ryanclinton~pubmed-research-search/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-pubmed-research-search",
        "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/ryanclinton~pubmed-research-search/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-pubmed-research-search",
        "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": {
          "query": {
            "title": "Search Query",
            "type": "string",
            "description": "PubMed search query. Supports boolean operators (AND, OR, NOT) and field tags like [Title], [Author], [MeSH Terms]",
            "default": "CRISPR gene therapy"
          },
          "author": {
            "title": "Author",
            "type": "string",
            "description": "Filter by author name (e.g. 'Doudna JA', 'Zhang F')"
          },
          "journal": {
            "title": "Journal",
            "type": "string",
            "description": "Filter by journal name (e.g. 'Nature', 'NEJM', 'Lancet')"
          },
          "dateFrom": {
            "title": "Date From",
            "type": "string",
            "description": "Publication date from (YYYY/MM/DD or YYYY)"
          },
          "dateTo": {
            "title": "Date To",
            "type": "string",
            "description": "Publication date to (YYYY/MM/DD or YYYY)"
          },
          "articleType": {
            "title": "Article Type",
            "enum": [
              "Review",
              "Clinical Trial",
              "Randomized Controlled Trial",
              "Meta-Analysis",
              "Systematic Review",
              "Case Reports"
            ],
            "type": "string",
            "description": "Filter by publication type"
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "relevance",
              "pub_date"
            ],
            "type": "string",
            "description": "How to sort results",
            "default": "relevance"
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of articles to return (max 500)",
            "default": 50
          },
          "analysisMode": {
            "title": "Analysis mode",
            "enum": [
              "general",
              "clinical",
              "systematic-review",
              "medical-affairs",
              "research-landscape",
              "rag"
            ],
            "type": "string",
            "description": "Tunes the read-first priority scoring and emphasis to your workflow. 'clinical' favours guidelines and recent practice-changing trials; 'systematic-review' favours design strength for screening; 'medical-affairs' favours guidelines and recent trials; 'research-landscape' favours relevance and breadth; 'rag' favours RAG-safe, abstract-bearing primary evidence.",
            "default": "general"
          },
          "includeMeshAndAbstract": {
            "title": "Include MeSH terms & abstracts",
            "type": "boolean",
            "description": "Fetch MeSH terms, abstracts, chemicals/drugs, and clinical-trial IDs (one extra batched request per 200 results). Powers the human-study signal and topic mapping.",
            "default": true
          },
          "minEvidenceLevel": {
            "title": "Minimum evidence level",
            "enum": [
              "any",
              "observational",
              "controlled",
              "rct",
              "systematic"
            ],
            "type": "string",
            "description": "Keep only studies at or above this strength. 'rct' = RCTs, systematic reviews, meta-analyses & guidelines; 'systematic' = systematic reviews/meta-analyses/guidelines only. Excluded counts are reported in the evidence summary.",
            "default": "any"
          },
          "excludeRetracted": {
            "title": "Exclude retracted articles",
            "type": "boolean",
            "description": "Drop retracted articles and expressions of concern. Off by default — retracted papers are kept and flagged with integrityStatus + a 'do-not-rely' recommendation so you can see them.",
            "default": false
          },
          "humanOnly": {
            "title": "Human studies only",
            "type": "boolean",
            "description": "Drop studies MeSH confirms are non-human (animal/in-vitro). Requires MeSH enrichment. Articles with no human/animal MeSH signal are kept.",
            "default": false
          },
          "includeTrendAnalysis": {
            "title": "Include publication trend",
            "type": "boolean",
            "description": "Add a publication-velocity trend for the topic (last N years vs the prior N years) via two count queries. Answers 'is research on this accelerating?'.",
            "default": false
          },
          "trendWindowYears": {
            "title": "Trend window (years)",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Window size for the publication trend comparison.",
            "default": 5
          },
          "outputProfile": {
            "title": "Output profile",
            "enum": [
              "minimal",
              "standard",
              "full"
            ],
            "type": "string",
            "description": "How many fields per article record. 'minimal' = decision fields only; 'standard' = + authorship, scores, major MeSH; 'full' = everything incl. abstract, all MeSH, chemicals, scoring factors.",
            "default": "standard"
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "articles",
              "dashboard"
            ],
            "type": "string",
            "description": "'articles' = one record per article plus an evidence summary. 'dashboard' = only the evidence-summary digest (one record), charged once.",
            "default": "articles"
          },
          "emitResearchBrief": {
            "title": "Emit research brief",
            "type": "boolean",
            "description": "Emit a single 'research-brief' synthesis record (headline, key takeaways, a role-tagged 'what to read' list, and a plain-English confidence read) summarising the whole result set.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitor mode (track changes across runs)",
            "type": "boolean",
            "description": "Store a baseline for this query and, on later runs, report what is new since last time: new RCTs, new syntheses, new guidelines, and the change in evidence maturity. Use a stable 'watchlist name' and schedule the run. First run captures the baseline.",
            "default": false
          },
          "watchlistName": {
            "title": "Watchlist name",
            "type": "string",
            "description": "Stable identifier for the monitored baseline (used only when monitor mode is on). Use one name per topic you track so runs do not overwrite each other.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}