{
  "openapi": "3.0.1",
  "info": {
    "title": "PubMed Scraper: Articles, Abstracts & Citations",
    "description": "Scrape PubMed articles by keyword, PubMed syntax or PMID: title, journal, authors, DOI, abstract, MeSH terms and keywords, plus cited-by and related papers as rows. Filter by date, sort by relevance. Export CSV, Excel, JSON or XML. No login or API key needed.",
    "version": "0.1",
    "x-build-id": "W4rFFb1GZhzD8S5ui"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/recordsdata~pubmed-articles-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-recordsdata-pubmed-articles-scraper",
        "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/recordsdata~pubmed-articles-scraper/runs": {
      "post": {
        "operationId": "runs-sync-recordsdata-pubmed-articles-scraper",
        "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/recordsdata~pubmed-articles-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-recordsdata-pubmed-articles-scraper",
        "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": "Search terms",
            "type": "array",
            "description": "PubMed search queries, one search per term, with full PubMed syntax: keywords, boolean operators (AND, OR, NOT) and field tags such as [au], [ti], [mh]. Example: breast cancer AND immunotherapy. The filters below are added to every term. Leave empty to search with the filters alone, or provide PMIDs instead.",
            "items": {
              "type": "string"
            }
          },
          "pmids": {
            "title": "Specific PMIDs",
            "type": "array",
            "description": "List of exact PubMed IDs (PMIDs) to fetch, for example 31295471. Runs before the searches and in addition to them. The filters below do not apply to PMIDs (except Exclude retracted articles). Provide this or search terms.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of articles to return (cited-by, related and reference rows are extra and capped separately). Free users are limited to 10 articles per run. Paid users: up to 1,000,000; PubMed caps one query at 9,999 records (split larger topics by publication date)."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "pub_date",
              "entry_date"
            ],
            "type": "string",
            "description": "Order of PubMed search results. Newest added to PubMed first is the order to use with Only new articles.",
            "default": "relevance"
          },
          "publishedAfter": {
            "title": "Published after (YYYY/MM/DD)",
            "type": "string",
            "description": "Only articles dated on or after this date, in YYYY/MM/DD format (YYYY/MM or YYYY also work). The date used is chosen in Date to filter on, publication date by default. Leave empty for no lower limit.",
            "default": ""
          },
          "publishedBefore": {
            "title": "Published before (YYYY/MM/DD)",
            "type": "string",
            "description": "Only articles dated on or before this date, in YYYY/MM/DD format (YYYY/MM or YYYY also work). The date used is chosen in Date to filter on, publication date by default. Leave empty for no upper limit.",
            "default": ""
          },
          "dateType": {
            "title": "Date to filter on",
            "enum": [
              "pdat",
              "edat",
              "mdat"
            ],
            "type": "string",
            "description": "Which date the two fields above are compared with. Use the date added to PubMed to find what was recently indexed, regardless of the printed publication date.",
            "default": "pdat"
          },
          "articleType": {
            "title": "Article type",
            "enum": [
              "any",
              "Journal Article",
              "Review",
              "Systematic Review",
              "Scoping Review",
              "Meta-Analysis",
              "Randomized Controlled Trial",
              "Clinical Trial",
              "Clinical Trial Protocol",
              "Clinical Trial, Phase I",
              "Clinical Trial, Phase II",
              "Clinical Trial, Phase III",
              "Clinical Trial, Phase IV",
              "Controlled Clinical Trial",
              "Pragmatic Clinical Trial",
              "Adaptive Clinical Trial",
              "Equivalence Trial",
              "Clinical Study",
              "Observational Study",
              "Case Reports",
              "Comparative Study",
              "Multicenter Study",
              "Evaluation Study",
              "Validation Study",
              "Twin Study",
              "Guideline",
              "Practice Guideline",
              "Preprint",
              "Dataset",
              "Editorial",
              "Letter",
              "Comment",
              "News",
              "Interview",
              "Biography",
              "Historical Article",
              "Published Erratum",
              "Retracted Publication",
              "Expression of Concern",
              "Technical Report",
              "Introductory Journal Article",
              "Lecture",
              "Video-Audio Media",
              "Webcast",
              "Clinical Conference",
              "Duplicate Publication",
              "Patient Education Handout",
              "Legal Case",
              "Government Publication",
              "Bibliography",
              "Personal Narrative",
              "Autobiography",
              "Address",
              "Festschrift",
              "Observational Study, Veterinary",
              "Clinical Trial, Veterinary"
            ],
            "type": "string",
            "description": "Only articles of this PubMed publication type, added to every search term as a \"<type>\"[pt] tag, for example Randomized Controlled Trial or Systematic Review. Any means no restriction.",
            "default": "any"
          },
          "author": {
            "title": "Author",
            "type": "string",
            "description": "Only articles by this author, as last name plus initials, for example Doudna JA (sent as a [au] tag). Several authors separated by a semicolon match articles by any of them.",
            "default": ""
          },
          "journal": {
            "title": "Journal",
            "type": "string",
            "description": "Only articles from this journal: full name, NLM abbreviation or ISSN, for example Nature Medicine or N Engl J Med (sent as a [ta] tag). Several journals separated by a semicolon match any of them.",
            "default": ""
          },
          "meshTerm": {
            "title": "MeSH term",
            "type": "string",
            "description": "Only articles indexed with this MeSH heading, for example Breast Neoplasms, or with a subheading such as Neoplasms/drug therapy (sent as a [mh] tag). Several headings separated by a semicolon match any of them.",
            "default": ""
          },
          "humanOnly": {
            "title": "Human studies only",
            "type": "boolean",
            "description": "Only articles indexed with the MeSH heading Humans (adds humans[mh]). Articles not yet indexed are left out.",
            "default": false
          },
          "hasAbstractOnly": {
            "title": "Only articles with an abstract",
            "type": "boolean",
            "description": "Only articles that have an abstract in PubMed (adds the hasabstract filter).",
            "default": false
          },
          "freeFullTextOnly": {
            "title": "Only free full text",
            "type": "boolean",
            "description": "Only articles with a free full-text link on PubMed (adds \"free full text\"[sb]).",
            "default": false
          },
          "excludeRetracted": {
            "title": "Exclude retracted articles",
            "type": "boolean",
            "description": "Leave out retracted articles (adds NOT \"Retracted Publication\"[pt] to every search; PMID lookups skip them too). When off, retracted articles are returned with isRetracted set to true.",
            "default": false
          },
          "includeAbstract": {
            "title": "Abstract + MeSH terms",
            "type": "boolean",
            "description": "Fetch the full structured abstract, MeSH headings (and the major ones), substances, copyright line and author keywords for each article. Billed as the Abstract + MeSH event, only for articles that have an abstract.",
            "default": true
          },
          "includeCitedBy": {
            "title": "Cited-by articles",
            "type": "boolean",
            "description": "Add one row per article that cites each result (recordType cited-by), with full bibliographic data. Billed per citing article. Each result also gets citedByCount, the total number of citing articles PubMed knows.",
            "default": false
          },
          "maxCitedByPerArticle": {
            "title": "Max cited-by per article",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Cap on citing-paper rows per article.",
            "default": 20
          },
          "includeRelated": {
            "title": "Related articles",
            "type": "boolean",
            "description": "Add one row per article from PubMed similar-articles for each result (recordType related). Billed per related article.",
            "default": false
          },
          "maxRelatedPerArticle": {
            "title": "Max related per article",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Cap on related-article rows per article.",
            "default": 10
          },
          "includeReferences": {
            "title": "Reference list articles",
            "type": "boolean",
            "description": "Add one row per article in the reference list of each result (recordType reference), with full bibliographic data. Only references PubMed can identify by PMID are listed, and only for records whose reference list is deposited.",
            "default": false
          },
          "maxReferencesPerArticle": {
            "title": "Max references per article",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Cap on reference rows per article.",
            "default": 10
          },
          "onlyNew": {
            "title": "Only new articles (monitor mode)",
            "type": "boolean",
            "description": "Skip articles that an earlier run of the same search and filters already delivered, and do not charge for them. The list of seen PMIDs is kept in a named key-value store of your own account (pubmed-articles-seen). Combine with Sort by: Newest added to PubMed first and a schedule to get only what appeared since the last run.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name (optional)",
            "type": "string",
            "description": "A label to keep two monitors apart when they use exactly the same search and filters. Leave empty otherwise.",
            "default": ""
          },
          "resetSeen": {
            "title": "Forget seen articles first",
            "type": "boolean",
            "description": "Clear the saved list of seen articles for this search before the run, so every matching article counts as new again.",
            "default": false
          },
          "ncbiApiKey": {
            "title": "NCBI API key (optional)",
            "type": "string",
            "description": "Free key from your NCBI account settings. With a key the actor pauses less between requests (NCBI allows 10 requests per second instead of 3). Not needed for normal use. The key is never written to the log or the dataset."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}