{
  "openapi": "3.0.1",
  "info": {
    "title": "PubMed & Europe PMC API — Papers, Emails & PDFs",
    "description": "Official Europe PMC & PubMed REST API scraper & MCP tool. Extract full untruncated abstracts, author emails, ORCIDs, citations, MeSH terms, NIH/EU grants, NCT trials & free PDF links. $2/1k, free count mode, zero proxy.",
    "version": "1.0",
    "x-build-id": "ZcgU5Bjt62tmwDbLq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yannabadie~pubmed-europepmc-api-mcp/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yannabadie-pubmed-europepmc-api-mcp",
        "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/yannabadie~pubmed-europepmc-api-mcp/runs": {
      "post": {
        "operationId": "runs-sync-yannabadie-pubmed-europepmc-api-mcp",
        "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/yannabadie~pubmed-europepmc-api-mcp/run-sync": {
      "post": {
        "operationId": "run-sync-yannabadie-pubmed-europepmc-api-mcp",
        "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": {
          "mode": {
            "title": "Run Mode",
            "enum": [
              "search",
              "count",
              "lookup_pmids",
              "batch_search"
            ],
            "type": "string",
            "description": "search = structured search (or startUrl); count = FREE exact hitCount & cost preview ($0 paper charge); lookup_pmids = direct batch lookup by PMIDs/PMCIDs/DOIs; batch_search = deduplicated pull across multiple queries.",
            "default": "search"
          },
          "query": {
            "title": "Search Query",
            "type": "string",
            "description": "Keywords, drug, disease, or boolean Europe PMC / PubMed query (e.g. 'GLP-1 semaglutide', 'CRISPR gene editing', '\"rheumatoid arthritis\" AND biologic').",
            "default": "GLP-1 semaglutide"
          },
          "startUrl": {
            "title": "PubMed or Europe PMC Search URL (optional)",
            "type": "string",
            "description": "Paste a PubMed search URL (https://pubmed.ncbi.nlm.nih.gov/?term=...) or Europe PMC search URL to import its query automatically.",
            "default": ""
          },
          "queries": {
            "title": "Batch Queries (batch_search mode)",
            "type": "array",
            "description": "List of search queries to run and deduplicate by PMID/DOI in batch_search mode.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "pmids": {
            "title": "PMIDs, PMCIDs, or DOIs (lookup_pmids mode)",
            "type": "array",
            "description": "Direct identifiers to retrieve (e.g. ['27295427', 'PMC4985288', '10.1056/NEJMoa1603827']).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "author": {
            "title": "Author Filter",
            "type": "string",
            "description": "Filter by author name (e.g. 'Marso SP' or 'Doudna J').",
            "default": ""
          },
          "journal": {
            "title": "Journal Filter",
            "type": "string",
            "description": "Filter by journal title or ISO abbreviation (e.g. 'Lancet', 'N Engl J Med', 'Nature').",
            "default": ""
          },
          "meshTerm": {
            "title": "MeSH Term Filter",
            "type": "string",
            "description": "Filter by Medical Subject Heading (e.g. 'Cardiovascular Diseases', 'Neoplasms').",
            "default": ""
          },
          "grantAgency": {
            "title": "Funding / Grant Agency",
            "type": "string",
            "description": "Filter by funder name (e.g. 'NIH', 'Wellcome Trust', 'European Research Council').",
            "default": ""
          },
          "pubYearFrom": {
            "title": "Publication Year From",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Start publication year inclusive (e.g. 2023)."
          },
          "pubYearTo": {
            "title": "Publication Year To",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "End publication year inclusive (e.g. 2026)."
          },
          "pubType": {
            "title": "Publication Type",
            "type": "string",
            "description": "Filter by publication type (e.g. 'Clinical Trial', 'Randomized Controlled Trial', 'Review', 'Meta-Analysis', 'Preprint').",
            "default": ""
          },
          "source": {
            "title": "Source Scope",
            "enum": [
              "ALL",
              "MED",
              "PPR"
            ],
            "type": "string",
            "description": "ALL = PubMed + Europe PMC + Preprints; MED = PubMed/MEDLINE only; PPR = Preprints only (bioRxiv/medRxiv).",
            "default": "ALL"
          },
          "sortBy": {
            "title": "Sort Order",
            "enum": [
              "relevance",
              "date",
              "cited"
            ],
            "type": "string",
            "description": "Sort results by relevance, newest publication date, or highest citation count.",
            "default": "relevance"
          },
          "openAccessOnly": {
            "title": "Open Access Only",
            "type": "boolean",
            "description": "Restrict to Open Access articles (OPEN_ACCESS:Y).",
            "default": false
          },
          "hasFreePdf": {
            "title": "Has Free PDF Only",
            "type": "boolean",
            "description": "Restrict to articles with a free downloadable PDF (HAS_PDF:Y).",
            "default": false
          },
          "onlyWithEmail": {
            "title": "Only Keep Papers With Author Email",
            "type": "boolean",
            "description": "Filter output to articles containing at least one extracted corresponding/author email.",
            "default": false
          },
          "onlyWithNct": {
            "title": "Only Keep Papers Linked to ClinicalTrials.gov (NCT)",
            "type": "boolean",
            "description": "Filter output to articles referencing at least one ClinicalTrials.gov NCT identifier.",
            "default": false
          },
          "maxResults": {
            "title": "Max Articles",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of articles to emit (up to 5000 per run). Ignored in free count mode.",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}