{
  "openapi": "3.0.1",
  "info": {
    "title": "OpenAlex Scraper - Research Papers, Citations & Authors API",
    "description": "OpenAlex API scraper: export research papers, citations, authors, institutions, journals and topics from 250M+ scholarly works to CSV, Excel or JSON. Abstracts included. $3 per 1,000 results.",
    "version": "0.1",
    "x-build-id": "XfTDdLMYkFR6g3cru"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deanko~openalex-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deanko-openalex-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/deanko~openalex-scraper/runs": {
      "post": {
        "operationId": "runs-sync-deanko-openalex-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/deanko~openalex-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-deanko-openalex-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": {
          "entity": {
            "title": "What to scrape",
            "enum": [
              "works",
              "authors",
              "institutions",
              "sources",
              "topics",
              "concepts"
            ],
            "type": "string",
            "description": "OpenAlex entity type to export. Works are papers and other research outputs.",
            "default": "works"
          },
          "search": {
            "title": "Search query",
            "type": "string",
            "description": "Full-text search. For works it matches title, abstract and full text; for other entities it matches the name. Supports AND, OR, NOT and \"exact phrases\". Leave empty to list everything matching the filters.",
            "default": ""
          },
          "fromYear": {
            "title": "Publication year from",
            "minimum": 1000,
            "maximum": 2100,
            "type": "integer",
            "description": "Works only. Earliest publication year (inclusive)."
          },
          "toYear": {
            "title": "Publication year to",
            "minimum": 1000,
            "maximum": 2100,
            "type": "integer",
            "description": "Works only. Latest publication year (inclusive)."
          },
          "openAccessOnly": {
            "title": "Open access only",
            "type": "boolean",
            "description": "Works and sources only. Return only open-access works (or fully open-access journals).",
            "default": false
          },
          "workType": {
            "title": "Work type",
            "enum": [
              "",
              "article",
              "review",
              "preprint",
              "book",
              "book-chapter",
              "dataset",
              "dissertation",
              "editorial",
              "letter",
              "report",
              "other"
            ],
            "type": "string",
            "description": "Works only. Restrict to one work type.",
            "default": ""
          },
          "institutionId": {
            "title": "Institution ID",
            "type": "string",
            "description": "Works and authors. OpenAlex institution ID or URL, e.g. I136199984 (Harvard). Find IDs by running this Actor with entity = institutions.",
            "default": ""
          },
          "authorId": {
            "title": "Author ID",
            "type": "string",
            "description": "Works only. OpenAlex author ID or URL, e.g. A5023888391. Find IDs by running this Actor with entity = authors.",
            "default": ""
          },
          "topicId": {
            "title": "Topic or concept ID",
            "type": "string",
            "description": "OpenAlex topic ID (T10346) or legacy concept ID (C41008148, works only). Find IDs by running this Actor with entity = topics.",
            "default": ""
          },
          "countryCode": {
            "title": "Country code",
            "pattern": "^([A-Za-z]{2})?$",
            "type": "string",
            "description": "Two-letter ISO country code, e.g. US, DE, KR. Works: any author's institution country. Authors: last known institution. Institutions and sources: their country.",
            "default": ""
          },
          "extraFilter": {
            "title": "Extra OpenAlex filter (advanced)",
            "type": "string",
            "description": "Any raw OpenAlex filter string, appended to the filters above, e.g. cited_by_count:>100,has_doi:true,language:en. See https://docs.openalex.org for all filters.",
            "default": ""
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "",
              "relevance_score:desc",
              "cited_by_count:desc",
              "publication_date:desc",
              "publication_year:desc",
              "works_count:desc",
              "display_name"
            ],
            "type": "string",
            "description": "Sort order. Default is relevance when you search, otherwise OpenAlex's default order.",
            "default": ""
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of rows to save. You are charged per row, so this caps your cost (100 rows is about $0.30; 1,000 rows is about $3).",
            "default": 100
          },
          "mailto": {
            "title": "Your email (optional, polite pool)",
            "type": "string",
            "description": "Optional. Sent to OpenAlex as the mailto parameter so they can contact you about your usage. Not stored by the Actor.",
            "default": ""
          },
          "apiKey": {
            "title": "OpenAlex API key (optional)",
            "type": "string",
            "description": "Optional. Your free OpenAlex API key (https://openalex.org/settings/api) gives you your own daily budget instead of the shared per-IP one. Recommended for very large exports."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}