{
  "openapi": "3.0.1",
  "info": {
    "title": "PubMed Evidence Finder",
    "description": "Search PubMed and get abstracts, MeSH terms, study-design evidence tiers and NIH iCite citation metrics. Official NCBI APIs.",
    "version": "0.1",
    "x-build-id": "JotrjudaAwhsbvBLV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/a.jonzy~pubmed-evidence-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-a.jonzy-pubmed-evidence-finder",
        "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/a.jonzy~pubmed-evidence-finder/runs": {
      "post": {
        "operationId": "runs-sync-a.jonzy-pubmed-evidence-finder",
        "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/a.jonzy~pubmed-evidence-finder/run-sync": {
      "post": {
        "operationId": "run-sync-a.jonzy-pubmed-evidence-finder",
        "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",
        "required": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "PubMed queries",
            "type": "array",
            "description": "One or more PubMed searches. Any PubMed syntax works, for example: sglt2 inhibitors heart failure, or \"metformin\"[MeSH Terms] AND cancer.",
            "items": {
              "type": "string"
            }
          },
          "studyType": {
            "title": "Study type",
            "enum": [
              "any",
              "meta-analysis",
              "rct",
              "clinical-trial",
              "guideline",
              "review",
              "case-report"
            ],
            "type": "string",
            "description": "Restrict results to one PubMed publication type.",
            "default": "any"
          },
          "minYear": {
            "title": "Published from year",
            "minimum": 1800,
            "maximum": 2100,
            "type": "integer",
            "description": "Earliest publication year to include. Leave empty for no limit."
          },
          "maxYear": {
            "title": "Published up to year",
            "minimum": 1800,
            "maximum": 2100,
            "type": "integer",
            "description": "Latest publication year to include. Leave empty for no limit."
          },
          "humansOnly": {
            "title": "Humans only",
            "type": "boolean",
            "description": "Only studies indexed with the Humans MeSH term.",
            "default": false
          },
          "freeFullTextOnly": {
            "title": "Free full text only",
            "type": "boolean",
            "description": "Only articles with a free full text link.",
            "default": false
          },
          "requireAbstract": {
            "title": "Require an abstract",
            "type": "boolean",
            "description": "Drop records that have no abstract.",
            "default": false
          },
          "minEvidenceTier": {
            "title": "Best evidence tiers only",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Keep articles at this tier or better (a PubMed publication-type label, not a quality grade): 1 systematic review or meta-analysis, 2 randomized trial, 3 clinical trial, guideline or observational study, 4 review or case report, 5 opinion or letter. Articles with no recognised type are dropped when this is set."
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "relevance",
              "date",
              "rcr",
              "evidence"
            ],
            "type": "string",
            "description": "Order of results within each query. Relative citation ratio and evidence tier sort the fetched window, so raise the results per query for a wider pool.",
            "default": "relevance"
          },
          "includeCitationMetrics": {
            "title": "Add NIH iCite citation metrics",
            "type": "boolean",
            "description": "Adds citation count, relative citation ratio, NIH percentile and clinical flag from NIH iCite.",
            "default": true
          },
          "maxResultsPerQuery": {
            "title": "Results per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many PubMed records to fetch for each query.",
            "default": 25
          },
          "maxItems": {
            "title": "Maximum results per run",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety cap on the total number of articles returned (and billed) in one run.",
            "default": 500
          },
          "ncbiApiKey": {
            "title": "NCBI API key (optional)",
            "type": "string",
            "description": "Your own free NCBI key raises the rate limit from 3 to 10 requests per second. Get one in your NCBI account settings."
          },
          "contactEmail": {
            "title": "Contact email (optional)",
            "type": "string",
            "description": "Sent to NCBI so they can reach you about heavy use, as their usage policy asks. If empty, the actor sends its publisher's support address."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}