{
  "openapi": "3.0.1",
  "info": {
    "title": "Research Papers Search for RAG, from OpenAlex data",
    "description": "Search 250M+ scholarly papers from OpenAlex data, or look up DOIs: authors with institutions, venue, citations, topics, open PDF link, rebuilt abstract, APA and BibTeX, and a Markdown card for RAG.",
    "version": "0.1",
    "x-build-id": "IF8bcCenEkymxmar8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/br_data_hub~openalex-research-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-br_data_hub-openalex-research-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/br_data_hub~openalex-research-search/runs": {
      "post": {
        "operationId": "runs-sync-br_data_hub-openalex-research-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/br_data_hub~openalex-research-search/run-sync": {
      "post": {
        "operationId": "run-sync-br_data_hub-openalex-research-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",
        "properties": {
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Type words to find in titles, abstracts and full text, e.g. retrieval augmented generation. Use AND, OR, NOT in uppercase and \"exact phrases\" in double quotes. Leave empty to list papers by filters only.",
            "default": "retrieval augmented generation"
          },
          "dois": {
            "title": "DOIs",
            "type": "array",
            "description": "Enter DOIs to look up instead of searching, one per line, as 10.xxxx/... or https://doi.org/... links. When set, the query and filters are ignored; unknown DOIs come back as not_found and are free.",
            "items": {
              "type": "string"
            }
          },
          "yearFrom": {
            "title": "From year",
            "minimum": 1500,
            "maximum": 2100,
            "type": "integer",
            "description": "Set the first publication year to include, e.g. 2023.",
            "default": 2023
          },
          "yearTo": {
            "title": "To year",
            "minimum": 1500,
            "maximum": 2100,
            "type": "integer",
            "description": "Set the last publication year to include. Leave empty for up to now."
          },
          "openAccessOnly": {
            "title": "Open access only",
            "type": "boolean",
            "description": "Keep on to return only papers free to read somewhere (gold, green, hybrid, bronze or diamond).",
            "default": true
          },
          "types": {
            "title": "Work types",
            "type": "array",
            "description": "Pick the OpenAlex work types to keep, e.g. Article or Preprint. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "article",
                "preprint",
                "review",
                "book",
                "book-chapter",
                "dissertation",
                "dataset",
                "report",
                "letter",
                "editorial",
                "other"
              ],
              "enumTitles": [
                "Article",
                "Preprint",
                "Review",
                "Book",
                "Book chapter",
                "Dissertation",
                "Dataset",
                "Report",
                "Letter",
                "Editorial",
                "Other"
              ]
            }
          },
          "fields": {
            "title": "Research fields",
            "type": "array",
            "description": "Pick fields of the paper's main topic (OpenAlex's 26 fields, based on Scopus ASJC), e.g. Computer Science. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "11",
                "12",
                "13",
                "14",
                "15",
                "16",
                "17",
                "18",
                "19",
                "20",
                "21",
                "22",
                "23",
                "24",
                "25",
                "26",
                "27",
                "28",
                "29",
                "30",
                "31",
                "32",
                "33",
                "34",
                "35",
                "36"
              ],
              "enumTitles": [
                "Agricultural and Biological Sciences",
                "Arts and Humanities",
                "Biochemistry, Genetics and Molecular Biology",
                "Business, Management and Accounting",
                "Chemical Engineering",
                "Chemistry",
                "Computer Science",
                "Decision Sciences",
                "Earth and Planetary Sciences",
                "Economics, Econometrics and Finance",
                "Energy",
                "Engineering",
                "Environmental Science",
                "Immunology and Microbiology",
                "Materials Science",
                "Mathematics",
                "Medicine",
                "Neuroscience",
                "Nursing",
                "Pharmacology, Toxicology and Pharmaceutics",
                "Physics and Astronomy",
                "Psychology",
                "Social Sciences",
                "Veterinary",
                "Dentistry",
                "Health Professions"
              ]
            }
          },
          "topics": {
            "title": "Topics",
            "type": "array",
            "description": "Enter OpenAlex topics as ids (T10028) or names (\"Natural Language Processing Techniques\"), one per line. Names are matched to the closest topic, shown in the log. Papers with any topic are returned.",
            "items": {
              "type": "string"
            }
          },
          "minCitations": {
            "title": "Min citations",
            "minimum": 0,
            "type": "integer",
            "description": "Set the minimum number of citations, e.g. 10."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Type a two-letter ISO 639-1 language code, e.g. en, pt or es. Leave empty for all languages."
          },
          "hasAbstract": {
            "title": "Only with abstract",
            "type": "boolean",
            "description": "Turn on to skip papers for which OpenAlex has no abstract. Useful for RAG, where the abstract is the main text.",
            "default": false
          },
          "includeRetracted": {
            "title": "Include retracted papers",
            "type": "boolean",
            "description": "Turn on to keep retracted papers, flagged with isRetracted. They are left out by default.",
            "default": false
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "citations",
              "newest",
              "oldest"
            ],
            "type": "string",
            "description": "Pick the order of results. Relevance needs a search query; without one, results are sorted by citations.",
            "default": "relevance"
          },
          "maxResults": {
            "title": "Max papers",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Set the maximum number of papers to return in search mode, e.g. 25. Large lists are read 200 per request with cursor paging.",
            "default": 25
          },
          "includeMarkdown": {
            "title": "Include Markdown card",
            "type": "boolean",
            "description": "Keep on to add a markdown field per paper (title, authors, venue, DOI, citations, abstract and APA citation) ready for embeddings or LLM context.",
            "default": true
          },
          "contactEmail": {
            "title": "Contact e-mail",
            "type": "string",
            "description": "Type an e-mail to send to OpenAlex as mailto, as they ask, so they can reach you if a request misbehaves. Not stored in the results. Optional."
          },
          "openalexApiKey": {
            "title": "OpenAlex API key",
            "type": "string",
            "description": "Paste your own OpenAlex API key for higher daily limits. Without it the shared free daily limit applies. Optional."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}