{
  "openapi": "3.0.1",
  "info": {
    "title": "OpenAlex Scholarly Search",
    "description": "Export scholarly works from the public OpenAlex API by query, author, institution, topic, year, open-access status, and citation count. No login, no proxies.",
    "version": "0.1",
    "x-build-id": "Eu3jxDd0pUhZ7nqWl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/foxk1996~openalex-scholarly-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-foxk1996-openalex-scholarly-search",
        "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/foxk1996~openalex-scholarly-search/runs": {
      "post": {
        "operationId": "runs-sync-foxk1996-openalex-scholarly-search",
        "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/foxk1996~openalex-scholarly-search/run-sync": {
      "post": {
        "operationId": "run-sync-foxk1996-openalex-scholarly-search",
        "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": [
          "maxResults"
        ],
        "properties": {
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text work search query for OpenAlex works, such as 'machine learning', 'climate adaptation', or 'retrieval augmented generation'."
          },
          "authorName": {
            "title": "Author name",
            "type": "string",
            "description": "Optional author name to resolve through OpenAlex authors search and filter works by the best matching author."
          },
          "authorId": {
            "title": "Author OpenAlex ID",
            "type": "string",
            "description": "Optional OpenAlex author ID or URL, for example A5086198262 or https://openalex.org/A5086198262. Overrides Author name when provided."
          },
          "institutionName": {
            "title": "Institution name",
            "type": "string",
            "description": "Optional institution name to resolve through OpenAlex institutions search and filter works by the best matching institution."
          },
          "institutionId": {
            "title": "Institution OpenAlex ID",
            "type": "string",
            "description": "Optional OpenAlex institution ID or URL, for example I136199984 or https://openalex.org/I136199984. Overrides Institution name when provided."
          },
          "topicName": {
            "title": "Topic name",
            "type": "string",
            "description": "Optional OpenAlex topic name to resolve through topics search and filter works by the best matching primary topic."
          },
          "topicId": {
            "title": "Topic OpenAlex ID",
            "type": "string",
            "description": "Optional OpenAlex topic ID or URL, for example T10181 or https://openalex.org/T10181. Overrides Topic name when provided."
          },
          "fromYear": {
            "title": "From publication year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Optional inclusive lower publication year filter."
          },
          "toYear": {
            "title": "To publication year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Optional inclusive upper publication year filter."
          },
          "openAccessStatus": {
            "title": "Open access status",
            "enum": [
              "any",
              "oa",
              "gold",
              "green",
              "hybrid",
              "bronze",
              "closed"
            ],
            "type": "string",
            "description": "Open-access filter: any includes all works, oa keeps only open-access works, and gold/green/hybrid/bronze/closed filter by OpenAlex OA status.",
            "default": "any"
          },
          "minCitations": {
            "title": "Minimum citations",
            "minimum": 0,
            "type": "integer",
            "description": "Optional minimum cited_by_count filter for works.",
            "default": 0
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of work records to export. The actor truncates client-side exactly at this cap even if OpenAlex returns more.",
            "default": 25
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "relevance_score:desc",
              "cited_by_count:desc",
              "publication_date:desc"
            ],
            "type": "string",
            "description": "OpenAlex works sort order. Relevance works best with a query; cited_by_count:desc finds influential work; publication_date:desc finds newest work.",
            "default": "relevance_score:desc"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}