{
  "openapi": "3.0.1",
  "info": {
    "title": "OpenAlex Scholarly Papers & Authors",
    "description": "OpenAlex scholarly metadata scraper for research datasets. Export work, author or institution records as JSON with source metadata and available citation fields.",
    "version": "1.0",
    "x-build-id": "0z4UzNHn043dPmBpw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/grit-77~openalex-papers/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-grit-77-openalex-papers",
        "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/grit-77~openalex-papers/runs": {
      "post": {
        "operationId": "runs-sync-grit-77-openalex-papers",
        "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/grit-77~openalex-papers/run-sync": {
      "post": {
        "operationId": "run-sync-grit-77-openalex-papers",
        "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": [
          "queries"
        ],
        "properties": {
          "entityType": {
            "title": "Entity type",
            "enum": [
              "works",
              "authors",
              "institutions"
            ],
            "type": "string",
            "description": "Search works, author profiles or institutions. One type per run.",
            "default": "works"
          },
          "queries": {
            "title": "Search queries",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "One to 100 non-empty search strings. Results are deduplicated by OpenAlex ID across queries.",
            "items": {
              "type": "string"
            }
          },
          "yearFrom": {
            "title": "Publication year from",
            "minimum": 1,
            "maximum": 2100,
            "type": "integer",
            "description": "Works only. Inclusive lower publication year; omit for no lower bound."
          },
          "yearTo": {
            "title": "Publication year to",
            "minimum": 1,
            "maximum": 2100,
            "type": "integer",
            "description": "Works only. Inclusive upper publication year; omit for no upper bound."
          },
          "conceptIds": {
            "title": "Concept IDs",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Works only. Legacy OpenAlex concept IDs, e.g. C154945302. OR within this list; AND with other filters. Concept names are not accepted.",
            "items": {
              "type": "string"
            }
          },
          "topicIds": {
            "title": "Topic IDs",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Works only. OpenAlex topic IDs, e.g. T10028; an alternative to legacy concepts.",
            "items": {
              "type": "string"
            }
          },
          "openAccess": {
            "title": "Open access",
            "type": "boolean",
            "description": "Works only. True restricts to open-access works, false to closed works; omit to include both."
          },
          "minCitations": {
            "title": "Minimum citations",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Inclusive cited_by_count minimum for the selected entity type."
          },
          "authorIds": {
            "title": "Author IDs",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Works only. Restrict papers to these A-prefixed OpenAlex author IDs.",
            "items": {
              "type": "string"
            }
          },
          "institutionIds": {
            "title": "Institution IDs",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Works: affiliation IDs. Authors: last known institution IDs. Accepts I-prefixed IDs or full OpenAlex URLs.",
            "items": {
              "type": "string"
            }
          },
          "countryCode": {
            "title": "Institution country",
            "type": "string",
            "description": "Institutions only. Two-letter country code, e.g. GB."
          },
          "institutionType": {
            "title": "Institution type",
            "enum": [
              "education",
              "healthcare",
              "company",
              "archive",
              "nonprofit",
              "government",
              "facility",
              "other"
            ],
            "type": "string",
            "description": "Institutions only. Restrict to an OpenAlex institution type."
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "relevance",
              "citations",
              "year",
              "worksCount"
            ],
            "type": "string",
            "description": "Relevance, citation count descending, publication year descending (works only), or works count descending (authors/institutions only).",
            "default": "relevance"
          },
          "includeAbstracts": {
            "title": "Include reconstructed abstracts",
            "type": "boolean",
            "description": "Works only. Reconstruct available OpenAlex abstract token positions into text.",
            "default": true
          },
          "maxItems": {
            "title": "Maximum dataset rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Global hard cap across all queries, including error rows. Duplicates do not consume the cap.",
            "default": 100
          },
          "concurrency": {
            "title": "Concurrent searches",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum parallel search workers. All workers share a request limiter and result budget.",
            "default": 2
          },
          "apiKey": {
            "title": "OpenAlex API key (optional)",
            "type": "string",
            "description": "Optional own free OpenAlex API key for a larger daily allowance; sent in an Authorization header. Anonymous access is used when omitted."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}