{
  "openapi": "3.0.1",
  "info": {
    "title": "Europe PMC Scraper",
    "description": "Search Europe PMC, the superset of PubMed: 43M+ abstracts, 10M+ open-access full-text articles, preprints (bioRxiv/medRxiv), patents and theses. Lucene query plus filters, cursor pagination with no ceiling, lookup by PMID/PMCID/DOI, citation networks, text-mined annotations. Keyless.",
    "version": "0.1",
    "x-build-id": "yMTdTF3QKjlDOtKCE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapyx~europepmc-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapyx-europepmc-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/scrapyx~europepmc-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapyx-europepmc-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/scrapyx~europepmc-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapyx-europepmc-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "articles",
              "citation-network"
            ],
            "type": "string",
            "description": "`search` runs a query / filters against the whole Europe PMC index. `articles` looks up specific articles by id. `citation-network` walks the citations of an article (forwards or backwards).",
            "default": "search"
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "`search` mode. Lucene syntax against title / abstract / full text, e.g. `CRISPR base editing`, `\"long covid\"`, `TITLE:\"gut microbiome\"`. Optional if you supply filters instead. Every query returns HTTP 200 -- a zero-hit result is a genuine `hitCount: 0`, not an error."
          },
          "articleIds": {
            "title": "Article IDs",
            "type": "array",
            "description": "`articles` and `citation-network` modes. One per line. Accepts a bare PMID (`23000000`), a source-qualified id (`MED:23000000`, `PMC:PMC3531190`, `PPR:PPR1303040`), or a DOI (`10.1038/nature12373`). `citation-network` needs a PMID / MED / PMC id -- a DOI has no citation endpoint and is rejected up front.",
            "items": {
              "type": "string"
            }
          },
          "direction": {
            "title": "Citation direction",
            "enum": [
              "citing",
              "cited"
            ],
            "type": "string",
            "description": "`citation-network` mode. `citing` = articles that cite this one (forward). `cited` = the reference list of this one (backward).",
            "default": "citing"
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "`search` filter. Restrict to one or more Europe PMC databases: `MED` (PubMed/MEDLINE), `PMC` (open-access full text), `PPR` (preprints -- bioRxiv, medRxiv), `PAT` (patents), `AGR` (Agricola), `CBA` (Chinese biomedical), `ETH` (theses), `HIR`, `CTX`, `NBK` (NCBI bookshelf). An unknown code is rejected rather than silently returning nothing.",
            "items": {
              "type": "string"
            }
          },
          "author": {
            "title": "Author",
            "type": "string",
            "description": "`search` filter. Matched against `AUTH`, e.g. `Doudna JA`."
          },
          "journalTitle": {
            "title": "Journal",
            "type": "string",
            "description": "`search` filter. Matched against `JOURNAL`, e.g. `Nature`, `Lancet`."
          },
          "pubType": {
            "title": "Publication type",
            "type": "string",
            "description": "`search` filter. Matched against `PUB_TYPE`, e.g. `review`, `Randomized Controlled Trial`, `preprint`."
          },
          "fromYear": {
            "title": "From year",
            "type": "integer",
            "description": "`search` filter. Keep articles first published in or after this year."
          },
          "toYear": {
            "title": "To year",
            "type": "integer",
            "description": "`search` filter. Keep articles first published in or before this year."
          },
          "openAccessOnly": {
            "title": "Open access only",
            "type": "boolean",
            "description": "`search` filter. Keep only articles Europe PMC flags as open access.",
            "default": false
          },
          "hasFullText": {
            "title": "Has full text in Europe PMC",
            "type": "boolean",
            "description": "`search` filter. Keep only articles whose full text is hosted in Europe PMC.",
            "default": false
          },
          "hasAbstract": {
            "title": "Has abstract",
            "type": "boolean",
            "description": "`search` filter. Drop records with no abstract (common for patents and some book chapters).",
            "default": false
          },
          "rawQuery": {
            "title": "Raw query (power users)",
            "type": "string",
            "description": "Appended verbatim (AND-joined) to the composed query. Full Europe PMC field syntax, e.g. `HAS_FT:Y`, `GRANT_AGENCY:\"Wellcome Trust\"`, `(SRC:PPR OR SRC:MED)`."
          },
          "resultType": {
            "title": "Result detail",
            "enum": [
              "core",
              "lite"
            ],
            "type": "string",
            "description": "`core` returns the full record (abstract, MeSH terms, chemicals, grants, full-text URLs). `lite` is a much smaller row -- faster and cheaper when you only need bibliographic fields.",
            "default": "core"
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "date",
              "firstPublicationDate",
              "citedByCount",
              "authorCount"
            ],
            "type": "string",
            "description": "`search` mode ordering.",
            "default": "relevance"
          },
          "order": {
            "title": "Sort order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Ignored when sorting by relevance.",
            "default": "desc"
          },
          "includeAnnotations": {
            "title": "Include text-mined annotations",
            "type": "boolean",
            "description": "Fetch the Europe PMC annotation layer for each article -- genes/proteins, diseases, chemicals, organisms, cell types, accession numbers, mined out of the full text. One extra request per article, so it is off by default.",
            "default": false
          },
          "slimOutput": {
            "title": "Slim output (drop raw)",
            "type": "boolean",
            "description": "By default every ARTICLE row carries the verbatim Europe PMC record in `raw`. Turn on for the normalised fields only.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Cap per query (search) or per article (citation network). Search uses cursor pagination, so this has no upstream ceiling.",
            "default": 500
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel in-flight requests (matters for `articles` mode and annotation fetches).",
            "default": 4
          },
          "minRequestInterval": {
            "title": "Min seconds between requests",
            "minimum": 0,
            "type": "number",
            "description": "Politeness pacing for EMBL-EBI's public infrastructure.",
            "default": 0.3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Europe PMC has no anti-bot layer, so a proxy is OFF by default.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}