{
  "openapi": "3.0.1",
  "info": {
    "title": "Thesis Literature Review Scraper",
    "description": "Turn any research question into a clean reading list of peer-reviewed academic papers from OpenAlex, Semantic Scholar, and Crossref in one run. Includes citation-manager and spreadsheet exports, plus LLM-ready Markdown you can paste into ChatGPT or Claude for instant literature synthesis.",
    "version": "0.1",
    "x-build-id": "BhYpur6Yhdz2Wh0DD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/leafy-dev-jr~thesis-literature-review-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-leafy-dev-jr-thesis-literature-review-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/leafy-dev-jr~thesis-literature-review-scraper/runs": {
      "post": {
        "operationId": "runs-sync-leafy-dev-jr-thesis-literature-review-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/leafy-dev-jr~thesis-literature-review-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-leafy-dev-jr-thesis-literature-review-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": {
          "query": {
            "title": "Research question or keywords",
            "minLength": 3,
            "maxLength": 500,
            "type": "string",
            "description": "Your research question or topic keywords (e.g., 'impact of social media on adolescent mental health')."
          },
          "yearFrom": {
            "title": "Earliest publication year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Only include papers published in or after this year.",
            "default": 2015
          },
          "yearTo": {
            "title": "Latest publication year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Only include papers published in or before this year.",
            "default": 2026
          },
          "maxResults": {
            "title": "Max papers to return",
            "minimum": 10,
            "maximum": 1000,
            "type": "integer",
            "description": "Total de-duplicated papers across all sources (10–1000). Larger runs take longer and cost more — start with 100 to validate the query.",
            "default": 100
          },
          "sources": {
            "title": "Sources to query",
            "uniqueItems": true,
            "type": "array",
            "description": "Which free scholarly APIs to aggregate. Results are deduplicated by DOI (with fuzzy-title fallback) and field-merged across sources. ⚠️ Adding Semantic Scholar can make runs noticeably longer — its anonymous rate-limit pool is strict (1 req/sec + frequent 429s). Enable it only if you need its abstracts/influentialCitationCount, or supply a free Semantic Scholar API key below to bypass the shared pool.",
            "items": {
              "type": "string",
              "enum": [
                "openalex",
                "semanticscholar",
                "crossref"
              ],
              "enumTitles": [
                "OpenAlex (250M+ works)",
                "Semantic Scholar (~200M papers — slower, rate-limited)",
                "Crossref (160M+ records)"
              ]
            },
            "default": [
              "openalex",
              "crossref"
            ]
          },
          "minCitations": {
            "title": "Minimum citation count (0 = no filter)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop papers with fewer citations than this. Set to 0 to keep all.",
            "default": 0
          },
          "openAccessOnly": {
            "title": "Only papers with open access",
            "type": "boolean",
            "description": "When true, only include papers with a free open-access PDF link.",
            "default": false
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "relevance",
              "citations",
              "date"
            ],
            "type": "string",
            "description": "Ranking order for the final deduped list.",
            "default": "relevance"
          },
          "outputFormat": {
            "title": "Additional output formats",
            "type": "array",
            "description": "JSON dataset is always produced. These are additional exports written to the run's Key-Value Store.",
            "items": {
              "type": "string",
              "enum": [
                "bibtex",
                "ris",
                "markdown",
                "csv"
              ]
            },
            "default": [
              "bibtex",
              "markdown"
            ]
          },
          "contactEmail": {
            "title": "Your email (optional — enables polite-pool API access)",
            "type": "string",
            "description": "Optional. When provided, we include it in OpenAlex and Crossref requests so you get priority routing and higher rate limits. Leave blank to run anonymously. Never stored, never shared."
          },
          "semanticScholarApiKey": {
            "title": "Semantic Scholar API key (optional)",
            "type": "string",
            "description": "Optional. Semantic Scholar's anonymous pool is heavily rate-limited. If you have a free API key from https://www.semanticscholar.org/product/api#api-key-form, paste it here to bypass the shared pool. Leave blank to run without it."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}