{
  "openapi": "3.0.1",
  "info": {
    "title": "StackOverflow Scraper · Questions, Answers, Tags & Users",
    "description": "Stack Overflow Scraper (StackOverflow Scraper) to scrape questions, answers, tags, user profiles, and developer Q&A datasets across Stack Overflow and Stack Exchange sites. Filter by tag, query, score, date, and accepted answers. No login or API key required.",
    "version": "1.0",
    "x-build-id": "6HsHtOicGAdQ7MkU2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/reapx~stackoverflow-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-reapx-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/reapx~stackoverflow-scraper/runs": {
      "post": {
        "operationId": "runs-sync-reapx-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/reapx~stackoverflow-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-reapx-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": {
          "dataset": {
            "title": "What to scrape",
            "enum": [
              "questions",
              "answers",
              "tags",
              "users"
            ],
            "type": "string",
            "description": "Which Stack Exchange collection to read. Each returns a different kind of row, keyed by its own Stack Exchange identifier.<br><br>Options: <code>questions</code>, <code>answers</code>, <code>tags</code>, <code>users</code>."
          },
          "site": {
            "title": "Stack Exchange site",
            "type": "string",
            "description": "Which site to read. Defaults to Stack Overflow; any Stack Exchange site key works, e.g. <code>serverfault</code>, superuser, askubuntu, math, unix, dba.<br><br>Leave this field empty to skip this filter."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 2500,
            "type": "integer",
            "description": "Hard cap on how many rows the run returns. This is also your cost cap: you are charged once per item returned. The API serves at most 2,500 items for one query.<br><br>The higher the number, the longer the run takes and the more you are charged, because you pay per row returned."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "activity",
              "votes",
              "creation",
              "relevance",
              "popular",
              "name",
              "reputation",
              "modified"
            ],
            "type": "string",
            "description": "Ordering. Questions accept activity, votes, creation and relevance; answers accept activity, votes and creation; tags accept popular, activity and name; users accept reputation, creation, name and modified. An unsupported value falls back to the dataset's default.<br><br>Options: <code>activity</code>, <code>votes</code>, <code>creation</code>, <code>relevance</code>, <code>popular</code>, <code>name</code>."
          },
          "order": {
            "title": "Direction",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Descending gives the highest or newest first.<br><br>Options: <code>desc</code>, <code>asc</code>."
          },
          "query": {
            "title": "Full-text search",
            "type": "string",
            "description": "Free-text search across question titles and bodies. Pair it with sort \"Best match\" for relevance ranking.<br><br>Leave this field empty to skip this filter."
          },
          "titleContains": {
            "title": "Title contains",
            "type": "string",
            "description": "Match text in the question title only, which is far more precise than a body search.<br><br>Leave this field empty to skip this filter."
          },
          "tagged": {
            "title": "Tagged with all of",
            "type": "array",
            "description": "Only questions carrying every one of these tags. Use the exact Stack Overflow tag spelling, e.g. <code>python</code>, pandas, machine-learning.<br><br>Leave this field empty to include every option.",
            "items": {
              "type": "string"
            }
          },
          "notTagged": {
            "title": "Not tagged with",
            "type": "array",
            "description": "Exclude questions carrying any of these tags.<br><br>Leave this field empty to include every option.",
            "items": {
              "type": "string"
            }
          },
          "minScore": {
            "title": "Minimum score",
            "type": "integer",
            "description": "Only items at or above this vote score. Requires sort \"Votes / score\", which is how the API applies a floor."
          },
          "minAnswers": {
            "title": "Minimum answers",
            "minimum": 1,
            "type": "integer",
            "description": "Only questions with at least this many answers."
          },
          "acceptedOnly": {
            "title": "Has an accepted answer",
            "type": "boolean",
            "description": "Only questions where the asker accepted an answer - the solved set."
          },
          "unansweredOnly": {
            "title": "Unanswered only",
            "type": "boolean",
            "description": "Only questions with no answers and nothing accepted - where the gaps are."
          },
          "closedOnly": {
            "title": "Closed questions only",
            "type": "boolean",
            "description": "Only questions the community has closed."
          },
          "user": {
            "title": "Author user ID",
            "type": "integer",
            "description": "Only questions asked by this Stack Exchange user ID."
          },
          "tagNameContains": {
            "title": "Tag name contains",
            "type": "string",
            "description": "Only tags whose name contains this text. Applies when scraping tags.<br><br>Leave this field empty to skip this filter."
          },
          "userNameContains": {
            "title": "Display name contains",
            "type": "string",
            "description": "Only users whose display name contains this text. Applies when scraping users.<br><br>Leave this field empty to skip this filter."
          },
          "minReputation": {
            "title": "Minimum reputation",
            "type": "integer",
            "description": "Only users at or above this reputation. Requires sort \"Reputation\"."
          },
          "lastNDays": {
            "title": "In the last N days",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Rolling window on the creation date. Ignored if you set an explicit \"From date\".<br><br>The higher the number, the longer the run takes and the more you are charged, because you pay per row returned."
          },
          "dateFrom": {
            "title": "From date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Earliest creation date, YYYY-MM-DD."
          },
          "dateTo": {
            "title": "To date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Latest creation date, YYYY-MM-DD."
          },
          "includeBody": {
            "title": "Include the full body text",
            "type": "boolean",
            "description": "Add the question or answer body as both plain text and original HTML. Off by default to keep rows small."
          },
          "includeAnswers": {
            "title": "Include answers with each question",
            "type": "boolean",
            "description": "Attach every answer to each question row, highest score first, with author and accepted flag. Applies when scraping questions. Costs one extra request per 100 questions."
          },
          "apiKey": {
            "title": "Stack Apps API key (optional)",
            "type": "string",
            "description": "Optional and free from stackapps.com/apps/oauth/register. Without one, Stack Exchange allows 300 requests per day per IP; with one, 10,000. Only needed for very large or frequent runs.<br><br>Leave this field empty to skip this filter."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}