{
  "openapi": "3.0.1",
  "info": {
    "title": "Academic Paper Scraper",
    "description": "Search MILLIONS of academic papers from Semantic Scholar and arXiv by keyword, DOI, or citation graph. Returns titles, authors, abstracts, citation counts, and open access PDFs as clean JSON. Works as an MCP tool for AI agents.",
    "version": "1.1",
    "x-build-id": "Wg5rmHP0hTWzQ7l3P"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/labrat011~academic-paper-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-labrat011-academic-paper-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/labrat011~academic-paper-scraper/runs": {
      "post": {
        "operationId": "runs-sync-labrat011-academic-paper-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/labrat011~academic-paper-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-labrat011-academic-paper-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",
        "required": [
          "query"
        ],
        "properties": {
          "mode": {
            "title": "🎯 Mode",
            "enum": [
              "search",
              "get_paper",
              "citations"
            ],
            "type": "string",
            "description": "Operation mode: 'search' for keyword search, 'get_paper' for lookup by ID, 'citations' for citation graph traversal.",
            "default": "search"
          },
          "query": {
            "title": "🔍 Search Query or Paper ID",
            "type": "string",
            "description": "For 'search': keywords like 'transformer attention mechanism'. For 'get_paper'/'citations': a paper ID — DOI (10.1234/...), arXiv ID (2301.12345), PubMed ID (PMID:12345678), or Semantic Scholar ID."
          },
          "queriesList": {
            "title": "🔍 Queries List (Batch Search)",
            "type": "array",
            "description": "Run multiple search queries in a single job — results are merged and deduplicated by paper ID. Overrides the single Query field when provided. Ideal for systematic reviews, topic mapping, and research monitoring. Example: [\"CRISPR gene editing\", \"base editing\", \"prime editing\"]"
          },
          "source": {
            "title": "📚 Source",
            "enum": [
              "auto",
              "semantic_scholar",
              "arxiv"
            ],
            "type": "string",
            "description": "Data source. 'semantic_scholar' searches 226M+ papers across all fields. 'arxiv' searches 2.4M+ preprints (best for physics, CS, math). 'auto' uses Semantic Scholar for general queries and arXiv for category-specific searches.",
            "default": "auto"
          },
          "citationDirection": {
            "title": "🔗 Citation Direction",
            "enum": [
              "citing",
              "cited_by"
            ],
            "type": "string",
            "description": "For 'citations' mode only. 'citing' returns papers that cite the target. 'cited_by' returns papers the target references.",
            "default": "citing"
          },
          "yearFrom": {
            "title": "📅 Year From",
            "minimum": 1900,
            "maximum": 2030,
            "type": "integer",
            "description": "Filter papers published on or after this year (e.g. 2020)."
          },
          "yearTo": {
            "title": "📅 Year To",
            "minimum": 1900,
            "maximum": 2030,
            "type": "integer",
            "description": "Filter papers published on or before this year (e.g. 2025)."
          },
          "fieldsOfStudy": {
            "title": "🏷️ Fields of Study",
            "type": "array",
            "description": "Filter by academic field (Semantic Scholar only). Examples: 'Computer Science', 'Medicine', 'Physics', 'Biology', 'Mathematics', 'Chemistry', 'Engineering'.",
            "default": []
          },
          "openAccessOnly": {
            "title": "🔓 Open Access Only",
            "type": "boolean",
            "description": "Only return papers with a free full-text PDF available.",
            "default": false
          },
          "arxivCategories": {
            "title": "📑 arXiv Categories",
            "type": "array",
            "description": "Filter by arXiv category (arXiv source only). Examples: 'cs.AI', 'cs.LG', 'physics.hep-th', 'math.AG', 'q-bio.NC'. See arxiv.org/category_taxonomy for the full list.",
            "default": []
          },
          "maxResults": {
            "title": "🔢 Max Results",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of papers to return (1–500). Free users are limited to 25 per run. Subscribe for up to 500 results.",
            "default": 100
          },
          "includeAbstract": {
            "title": "📝 Include Abstracts",
            "type": "boolean",
            "description": "Include full paper abstracts in output.",
            "default": true
          },
          "includeTldr": {
            "title": "🤖 Include AI Summary (TLDR)",
            "type": "boolean",
            "description": "Include AI-generated one-sentence summary (Semantic Scholar only, available for ~40% of papers).",
            "default": true
          },
          "includeCitationCounts": {
            "title": "📊 Include Citation Counts",
            "type": "boolean",
            "description": "Include citation count, reference count, and influential citation count for each paper.",
            "default": true
          },
          "sortBy": {
            "title": "🔃 Sort By",
            "enum": [
              "relevance",
              "date"
            ],
            "type": "string",
            "description": "Sort results by relevance or publication date.",
            "default": "relevance"
          },
          "requestIntervalSecs": {
            "title": "⏱️ Request Interval (seconds)",
            "minimum": 0.5,
            "maximum": 10,
            "type": "number",
            "description": "Minimum seconds between API requests. Semantic Scholar allows 1 req/sec without an API key. arXiv recommends 3s between requests.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}