{
  "openapi": "3.0.1",
  "info": {
    "title": "PubMed Scraper – Articles, Abstracts, Authors & Emails",
    "description": "Search PubMed with full query syntax or look up PMIDs: title, abstract, authors with affiliations, ORCID and emails, journal, DOI, PMC link, MeSH terms, keywords, grants. Only-new monitoring mode, beats the 9,999-result cap. Official NCBI API. $1 per 1,000 articles.",
    "version": "0.1",
    "x-build-id": "UQW7VjsBa9agT9jfN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~pubmed-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-pubmed-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/gazidev~pubmed-search/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-pubmed-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/gazidev~pubmed-search/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-pubmed-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": {
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "One PubMed search per line. Full PubMed syntax works: \"semaglutide obesity\", \"Smith J[Author]\", \"Nature[Journal] AND 2025[dp]\", \"cancer[MeSH] AND review[pt]\", \"Harvard[Affiliation]\".",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerQuery": {
            "title": "Max articles per query",
            "minimum": 0,
            "type": "integer",
            "description": "0 = all results (PubMed allows 9,999 per search; with year-splitting on, more).",
            "default": 100
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "newest",
              "oldest",
              "firstAuthor",
              "journal"
            ],
            "type": "string",
            "description": "Order of results (same options as pubmed.ncbi.nlm.nih.gov).",
            "default": "relevance"
          },
          "dateFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Optional publication date filter: YYYY, YYYY/MM or YYYY/MM/DD."
          },
          "dateTo": {
            "title": "Published to",
            "type": "string",
            "description": "Optional: YYYY, YYYY/MM or YYYY/MM/DD."
          },
          "onlyFreeFullText": {
            "title": "Only free full text",
            "type": "boolean",
            "description": "Adds the PubMed 'free full text' filter.",
            "default": false
          },
          "onlyWithAbstract": {
            "title": "Only articles with an abstract",
            "type": "boolean",
            "description": "Articles without an abstract are skipped and not charged.",
            "default": false
          },
          "pmids": {
            "title": "PMIDs (lookup)",
            "type": "array",
            "description": "PubMed IDs to fetch directly, e.g. 41000000. Not-found PMIDs are free.",
            "items": {
              "type": "string"
            }
          },
          "bulkPmids": {
            "title": "Paste many PMIDs",
            "type": "string",
            "description": "PMIDs separated by new lines, commas or spaces."
          },
          "includeAbstract": {
            "title": "Include abstracts",
            "type": "boolean",
            "description": "Structured abstracts keep their section labels (BACKGROUND: ..., METHODS: ...).",
            "default": true
          },
          "onlyNew": {
            "title": "Only new articles since the last run (monitoring)",
            "type": "boolean",
            "description": "Remembers PMIDs already returned (named key-value store 'pubmed-search-state') and outputs only new ones. Schedule the Actor daily or weekly for literature alerts.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Use different names to keep separate 'already seen' lists for different monitors.",
            "default": "default"
          },
          "autoSplitByYear": {
            "title": "Get past the 9,999-results limit (split by year)",
            "type": "boolean",
            "description": "When a search has more than 9,999 results and you want more, continue year by year.",
            "default": true
          },
          "ncbiApiKey": {
            "title": "NCBI API key (optional)",
            "type": "string",
            "description": "Optional free key from your NCBI account: raises the rate limit from 3 to 10 requests per second. Not required."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}