{
  "openapi": "3.0.1",
  "info": {
    "title": "Stack Overflow Scraper | Incremental, No API Key Needed",
    "description": "Questions and answers from the official Stack Exchange API - no login, no browser. Incremental mode returns only what's new since your last run, filtered server-side by date. Filter by tag or keyword; full question and answer bodies, scores, owners. $0.60 per 1,000 rows.",
    "version": "1.0",
    "x-build-id": "c0XtapANFgrbuRp8C"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hridayrungta~stackoverflow-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hridayrungta-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/hridayrungta~stackoverflow-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hridayrungta-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/hridayrungta~stackoverflow-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hridayrungta-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": {
          "site": {
            "title": "Site",
            "type": "string",
            "description": "Any Stack Exchange site's API name (e.g. \"stackoverflow\", \"superuser\", \"serverfault\", \"askubuntu\").",
            "default": "stackoverflow"
          },
          "tags": {
            "title": "Tags",
            "type": "array",
            "description": "Filter questions to these tags (AND match). Leave empty for no tag filter.",
            "items": {
              "type": "string"
            }
          },
          "query": {
            "title": "Keyword search",
            "type": "string",
            "description": "Full-text search phrase. Combine with tags to narrow further, or use alone.",
            "default": ""
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "all",
              "changes"
            ],
            "type": "string",
            "description": "\"all\": every matching question, every run. \"changes\": only what's new since your last run for this exact tag/query source.",
            "default": "all"
          },
          "sort": {
            "title": "Sort (mode \"all\" only)",
            "enum": [
              "creation",
              "activity",
              "votes",
              "hot"
            ],
            "type": "string",
            "description": "Listing order. Incremental mode overrides this to \"creation\" regardless of what is set here.",
            "default": "creation"
          },
          "includeAnswers": {
            "title": "Also scrape answers",
            "type": "boolean",
            "description": "Fetch every answer for every matched question, batched up to 100 questions per request.",
            "default": false
          },
          "minScore": {
            "title": "Minimum score",
            "type": "integer",
            "description": "Drop questions and answers scoring below this. Leave blank for no floor.",
            "default": 0
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Cost cap - you're billed once per row saved.",
            "default": 200
          },
          "firstRunSince": {
            "title": "First run since (mode \"changes\" only)",
            "type": "string",
            "description": "A source's first incremental run only takes questions created since this date/span - never the site's whole history. Default \"30 days\"; \"all\" for a deliberate backfill.",
            "default": "30 days"
          },
          "apiKey": {
            "title": "Stack Apps API key (optional)",
            "type": "string",
            "description": "Free, instant registration at stackapps.com. Without one, requests share a 300/day pool; with one, 10,000/day."
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "Retries with backoff for network errors, throttling and 5xx responses.",
            "default": 3
          },
          "stateStoreName": {
            "title": "State store name (mode \"changes\" only)",
            "type": "string",
            "description": "Name of the key-value store (in YOUR account) that holds the high-water mark per source. Leave blank for the default.",
            "default": ""
          },
          "stateNamespace": {
            "title": "State namespace (mode \"changes\" only)",
            "type": "string",
            "description": "Advanced: an explicit namespace for the mark key. Leave blank to namespace by your Apify user id automatically.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}