{
  "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": "21rHPzlUBEwvSHfDW"
  },
  "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 (PubMed queries)",
            "type": "array",
            "description": "One PubMed search per line. Plain keywords work; boolean operators and field tags like [au], [ti], [mh] also work. Example: breast cancer AND immunotherapy. Filters below are added to every line.",
            "items": {
              "type": "string"
            }
          },
          "pmids": {
            "title": "Or fetch exact articles by PMID (optional)",
            "type": "array",
            "description": "Exact PubMed IDs, one per line, for example 31295471. Fetched in addition to the searches. Filters below do not apply to PMIDs, except Exclude retracted articles.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max articles (free plan: 10)",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stops after this many articles. Cited-by, related and reference rows are extra and capped separately. Free plan: 10 per run. Paid: up to 1,000,000, but PubMed caps one query at 9,999 records, so split big topics by date."
          },
          "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 this PubMed publication type, for example Review or Randomized Controlled Trial. Any = no filter.",
            "default": "any"
          },
          "author": {
            "title": "Author",
            "type": "string",
            "description": "Last name plus initials, for example Doudna JA. Separate several authors with a semicolon to match any of them.",
            "default": ""
          },
          "journal": {
            "title": "Journal",
            "type": "string",
            "description": "Full name, NLM abbreviation or ISSN, for example Nature Medicine or N Engl J Med. Separate several with a semicolon.",
            "default": ""
          },
          "meshTerm": {
            "title": "MeSH heading",
            "type": "string",
            "description": "Medical Subject Heading, for example Breast Neoplasms, or with a subheading: Neoplasms/drug therapy. Separate several with a semicolon.",
            "default": ""
          },
          "humanOnly": {
            "title": "Human studies only",
            "type": "boolean",
            "description": "Keep articles indexed as Humans. Articles not yet indexed by MeSH are left out.",
            "default": false
          },
          "hasAbstractOnly": {
            "title": "Only articles with an abstract",
            "type": "boolean",
            "description": "Skip records that have no abstract in PubMed.",
            "default": false
          },
          "freeFullTextOnly": {
            "title": "Only articles with free full text",
            "type": "boolean",
            "description": "Keep articles that link to a free full-text version.",
            "default": false
          },
          "excludeRetracted": {
            "title": "Exclude retracted articles",
            "type": "boolean",
            "description": "Leave out retracted articles. When off, they are returned with isRetracted set to true.",
            "default": false
          },
          "publishedAfter": {
            "title": "Published after (YYYY/MM/DD)",
            "type": "string",
            "description": "Only articles dated on or after this day. YYYY/MM or YYYY also work. Example: 2024/01/01. Empty = no lower limit.",
            "default": ""
          },
          "publishedBefore": {
            "title": "Published before (YYYY/MM/DD)",
            "type": "string",
            "description": "Only articles dated on or before this day. Example: 2025/12/31. Empty = no upper limit.",
            "default": ""
          },
          "dateType": {
            "title": "Which date to compare",
            "enum": [
              "pdat",
              "edat",
              "mdat"
            ],
            "type": "string",
            "description": "Publication date by default. Choose Date added to PubMed to find what was recently indexed.",
            "default": "pdat"
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "relevance",
              "pub_date",
              "entry_date"
            ],
            "type": "string",
            "description": "Best match is the default. Use Newest added to PubMed first together with Only new articles to follow a topic.",
            "default": "relevance"
          },
          "includeAbstract": {
            "title": "Full abstract and MeSH terms",
            "type": "boolean",
            "description": "Adds the structured abstract, MeSH headings, substances and author keywords. Billed only for articles that have an abstract.",
            "default": true
          },
          "includeCitedBy": {
            "title": "Add articles that cite each result",
            "type": "boolean",
            "description": "Adds one row per citing article (recordType cited-by). Billed per citing article.",
            "default": false
          },
          "maxCitedByPerArticle": {
            "title": "Max citing articles per result (1-200)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Cap per result. Example: 20. Used only when cited-by is on.",
            "default": 20
          },
          "includeRelated": {
            "title": "Add similar articles",
            "type": "boolean",
            "description": "Adds one row per PubMed similar article (recordType related). Billed per related article.",
            "default": false
          },
          "maxRelatedPerArticle": {
            "title": "Max similar articles per result (1-100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Cap per result. Example: 10. Used only when similar articles is on.",
            "default": 10
          },
          "includeReferences": {
            "title": "Add the reference list of each result",
            "type": "boolean",
            "description": "Adds one row per cited reference that PubMed can identify (recordType reference). Only when the reference list is deposited.",
            "default": false
          },
          "maxReferencesPerArticle": {
            "title": "Max references per result (1-200)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Cap per result. Example: 10. Used only when references is on.",
            "default": 10
          },
          "onlyNew": {
            "title": "Only new articles",
            "type": "boolean",
            "description": "Skips articles delivered by an earlier run of the same search and filters, and does not charge for them. Pair with Sort by Newest added to PubMed first and a schedule.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name (optional)",
            "type": "string",
            "description": "Only needed to keep two monitors apart when search and filters are identical. Example: crispr-weekly.",
            "default": ""
          },
          "resetSeen": {
            "title": "Forget seen articles first",
            "type": "boolean",
            "description": "Clears the saved list for this search, so every match counts as new again.",
            "default": false
          },
          "ncbiApiKey": {
            "title": "NCBI API key (optional)",
            "type": "string",
            "description": "Free key from your NCBI account. Raises the request rate from 3 to 10 per second. Never logged or stored in 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}