{
  "openapi": "3.0.1",
  "info": {
    "title": "PubMed Search Scraper",
    "description": "Search PubMed (NCBI E-utilities) for biomedical articles by keyword, date range, and article type. Returns title, authors, journal, abstract, DOI, MeSH terms, keywords, and citation. Free public API, no proxy, no cookies. Optional NCBI API key for higher rate limits.",
    "version": "0.1",
    "x-build-id": "hcjhKD8omSadVHcxr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~pubmed-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-pubmed-search-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/crawlerbros~pubmed-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-pubmed-search-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/crawlerbros~pubmed-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-pubmed-search-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": "One or more PubMed search queries. Each term is searched independently; results are merged. Supports PubMed query syntax (e.g. `cancer AND immunotherapy[MeSH]`).",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "PubMed search URLs (optional)",
            "type": "array",
            "description": "Paste full PubMed search URLs (e.g. `https://pubmed.ncbi.nlm.nih.gov/?term=cancer&filter=simsearch1.fha`). The actor extracts the query and merges with `searchTerms`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "pmidList": {
            "title": "PMID list (optional)",
            "type": "array",
            "description": "Direct-lookup mode: list of PubMed IDs to fetch without searching (e.g. `[\"38123456\", \"36438426\"]`). Bypasses esearch — calls esummary + efetch directly. Combine with or use instead of `searchTerms`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerTerm": {
            "title": "Max items per search term",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on articles returned per search term. Total dataset size = sum across all terms.",
            "default": 25
          },
          "dateFrom": {
            "title": "Publication date from (YYYY/MM/DD)",
            "type": "string",
            "description": "Earliest publication date. PubMed format: `YYYY/MM/DD` (e.g. `2024/01/01`). Optional."
          },
          "dateTo": {
            "title": "Publication date to (YYYY/MM/DD)",
            "type": "string",
            "description": "Latest publication date. PubMed format: `YYYY/MM/DD`. Optional."
          },
          "articleType": {
            "title": "Article type",
            "enum": [
              "any",
              "review",
              "clinical_trial",
              "meta_analysis",
              "case_report",
              "randomized_controlled_trial",
              "systematic_review",
              "editorial",
              "letter",
              "comment",
              "practice_guideline",
              "observational_study",
              "comparative_study",
              "multicenter_study"
            ],
            "type": "string",
            "description": "Restrict to a specific article type. `any` keeps everything.",
            "default": "any"
          },
          "freeFullTextOnly": {
            "title": "Free full-text only",
            "type": "boolean",
            "description": "If true, restrict to articles with free full text available (PMC).",
            "default": false
          },
          "language": {
            "title": "Language",
            "enum": [
              "any",
              "english",
              "spanish",
              "french",
              "german",
              "chinese",
              "japanese",
              "italian",
              "portuguese",
              "russian",
              "korean"
            ],
            "type": "string",
            "description": "Restrict by article language.",
            "default": "any"
          },
          "journalFilter": {
            "title": "Journal name (optional)",
            "type": "string",
            "description": "Restrict to a specific journal (exact name, e.g. `Nature` or `New England Journal of Medicine`). Optional."
          },
          "authorFilter": {
            "title": "Author (optional)",
            "type": "string",
            "description": "Restrict to articles by a specific author (PubMed author format, e.g. `Smith J` or `Smith JR`). Optional."
          },
          "meshFilter": {
            "title": "MeSH terms (optional)",
            "type": "array",
            "description": "Restrict to articles tagged with these MeSH (Medical Subject Headings) terms. All terms are AND-ed (e.g. `[\"Lung Neoplasms\", \"Machine Learning\"]` returns articles tagged with both).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "affiliationFilter": {
            "title": "Author affiliation (optional)",
            "type": "string",
            "description": "Restrict to articles where any author's affiliation contains this substring (e.g. `Harvard`, `Mayo Clinic`, `Beijing`). Optional."
          },
          "includeCitedByCount": {
            "title": "Include cited-by count",
            "type": "boolean",
            "description": "Add a `citedByCount` field via NCBI elink (count of PubMed articles citing each result). Adds 1 elink call per page of PMIDs. Default off — turn on for citation-network analysis.",
            "default": false
          },
          "apiKey": {
            "title": "NCBI API key (optional)",
            "type": "string",
            "description": "Free key from https://www.ncbi.nlm.nih.gov/account/ — raises rate limit from 3 req/s to 10 req/s. Useful for large bulk runs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}