{
  "openapi": "3.0.1",
  "info": {
    "title": "OpenAlex API Scraper: Works, DOI, Funders, Institutions",
    "description": "Search OpenAlex scholarly works or look up DOI and work IDs. Filter by publication year, citations, open access, institution, country, funder and grant. Export authors, funding, topics and citation history.",
    "version": "0.1",
    "x-build-id": "5vGtHJui9WiMUACam"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s-r~openalex-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s-r-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/s-r~openalex-scraper/runs": {
      "post": {
        "operationId": "runs-sync-s-r-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/s-r~openalex-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-s-r-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": {
          "queries": {
            "title": "Queries",
            "type": "array",
            "description": "Search terms. Each unique term is searched separately; up to 100 terms.",
            "items": {
              "type": "string"
            }
          },
          "dois": {
            "title": "Dois",
            "type": "array",
            "description": "DOIs, DOI URLs or doi: identifiers, returned in input order. Unknown or filtered DOIs produce warnings.",
            "items": {
              "type": "string"
            }
          },
          "openalex_ids": {
            "title": "Openalex ids",
            "type": "array",
            "description": "OpenAlex work IDs (W followed by digits) or OpenAlex URLs, returned in input order.",
            "items": {
              "type": "string"
            }
          },
          "year_from": {
            "title": "Year from",
            "minimum": 1000,
            "maximum": 2100,
            "type": "integer",
            "description": "First publication year, inclusive."
          },
          "year_to": {
            "title": "Year to",
            "minimum": 1000,
            "maximum": 2100,
            "type": "integer",
            "description": "Last publication year, inclusive."
          },
          "open_access_only": {
            "title": "Open access only",
            "type": "boolean",
            "description": "Only works marked open access by OpenAlex.",
            "default": false
          },
          "oa_status": {
            "title": "Oa status",
            "enum": [
              "",
              "gold",
              "green",
              "hybrid",
              "bronze",
              "diamond",
              "closed"
            ],
            "type": "string",
            "description": "Optional open access category.",
            "default": ""
          },
          "work_types": {
            "title": "Work types",
            "type": "array",
            "description": "OpenAlex work types, combined with OR. See the README for supported types.",
            "items": {
              "type": "string"
            }
          },
          "min_citations": {
            "title": "Min citations",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum citation count, inclusive."
          },
          "institution_rors": {
            "title": "Institution rors",
            "type": "array",
            "description": "ROR institution IDs or https://ror.org URLs, combined with OR.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "ISO 3166-1 alpha-2 institution country codes, combined with OR.",
            "items": {
              "type": "string"
            }
          },
          "funder_ids": {
            "title": "Funder ids",
            "type": "array",
            "description": "OpenAlex funder IDs (F followed by digits) or OpenAlex URLs, combined with OR.",
            "items": {
              "type": "string"
            }
          },
          "award_ids": {
            "title": "Award ids",
            "type": "array",
            "description": "OpenAlex award IDs (G followed by digits) OR funder grant numbers. Do not mix the two forms in one request.",
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Optional ISO 639-1 publication language.",
            "default": ""
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "cited_by_count:desc",
              "publication_date:desc",
              "publication_date:asc"
            ],
            "type": "string",
            "description": "Result ordering. Relevance uses the OpenAlex default when no search term is supplied.",
            "default": "relevance"
          },
          "max_results": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum works per query or filter-only stream. DOI and ID lists are processed in full.",
            "default": 100
          },
          "include_abstract": {
            "title": "Include abstract",
            "type": "boolean",
            "description": "Return reconstructed full abstracts where available. Missing abstracts remain empty strings.",
            "default": true
          },
          "cursor": {
            "title": "Cursor",
            "type": "string",
            "description": "Opaque continuation cursor. Repeat all other input unchanged; Apify follows this automatically."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}