{
  "openapi": "3.0.1",
  "info": {
    "title": "Stack Overflow & Stack Exchange Scraper",
    "description": "Search questions across Stack Overflow and 25+ Stack Exchange sites; export title, tags, score, answers, views, author, dates, link and optional top answers via the official Stack Exchange API. No scraping, no key. Pay per question.",
    "version": "0.1",
    "x-build-id": "bXbbJnYiig0JtzXdd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alleserojje~stackoverflow-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alleserojje-stackoverflow-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/alleserojje~stackoverflow-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alleserojje-stackoverflow-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/alleserojje~stackoverflow-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alleserojje-stackoverflow-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": {
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text search. Supports intitle: for title-only matches, e.g. \"intitle:python web scraping\"."
          },
          "tagged": {
            "title": "Tags",
            "type": "array",
            "description": "Filter by one or more tags (OR-combined), e.g. python, javascript.",
            "items": {
              "type": "string"
            }
          },
          "site": {
            "title": "Stack Exchange site",
            "enum": [
              "stackoverflow",
              "superuser",
              "serverfault",
              "askubuntu",
              "unix",
              "mathoverflow",
              "math",
              "stats",
              "softwareengineering",
              "codereview",
              "dba",
              "electronics",
              "physics",
              "security",
              "gis",
              "tex",
              "wordpress",
              "webapps",
              "webmasters",
              "salesforce",
              "magento",
              "drupal",
              "sharepoint",
              "apple",
              "android"
            ],
            "type": "string",
            "description": "Which Stack Exchange community to query.",
            "default": "stackoverflow"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Max questions to return (1-100).",
            "default": 20
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "votes",
              "activity",
              "creation"
            ],
            "type": "string",
            "description": "Order results by relevance, score, activity, or creation date.",
            "default": "relevance"
          },
          "minScore": {
            "title": "Min score",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Only return questions with at least this score (upvotes)."
          },
          "minAnswers": {
            "title": "Min answer count",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Only return questions with at least this many answers."
          },
          "answered": {
            "title": "Answered status",
            "enum": [
              "any",
              "answered",
              "unanswered"
            ],
            "type": "string",
            "description": "Filter by whether the question has an accepted answer.",
            "default": "any"
          },
          "fromDate": {
            "title": "From date",
            "type": "string",
            "description": "Optional. Only questions created on/after this date (YYYY-MM-DD)."
          },
          "toDate": {
            "title": "To date",
            "type": "string",
            "description": "Optional. Only questions created on/before this date (YYYY-MM-DD)."
          },
          "includeAnswers": {
            "title": "Include top answers",
            "type": "boolean",
            "description": "Fetch the top-scored answers for each question and nest them in the record (one extra API request per 100 questions).",
            "default": false
          },
          "apiKey": {
            "title": "Stack Exchange API key (optional)",
            "type": "string",
            "description": "Optional. Register at stackapps.com for a key; raises the quota from ~300 to 10,000 requests/day."
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not required — the Stack Exchange API is open. Datacenter proxy available if you want it.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}