{
  "openapi": "3.0.1",
  "info": {
    "title": "Stack Overflow Scraper — Q&A Search on 184 Stack Exchange Sites",
    "description": "Search Stack Overflow and 184 Stack Exchange sites: full-text search with tag/date/score/views/accepted filters, tag feeds for monitoring, questions by id, users and tag stats. Returns clean-text questions with top answers and comments in one request.",
    "version": "0.1",
    "x-build-id": "5AaDY20vbf2exZKlI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yadroo~stackexchange-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yadroo-stackexchange-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/yadroo~stackexchange-search/runs": {
      "post": {
        "operationId": "runs-sync-yadroo-stackexchange-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/yadroo~stackexchange-search/run-sync": {
      "post": {
        "operationId": "run-sync-yadroo-stackexchange-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "tag",
              "questions",
              "users",
              "tagInfo"
            ],
            "type": "string",
            "description": "What to fetch. `search` = /search/advanced with `queries` and the filters below (default). `tag` = list questions tagged `tagged` sorted by activity/creation/votes/hot/week/month — best for monitoring a product tag. `questions` = fetch specific `questionIds` with answers. `users` = user profiles by id or display name. `tagInfo` = question counts, synonyms and related tags for `tags`.",
            "default": "search"
          },
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "Free-text queries for `search` mode (one API call chain per query). Each query is matched against title and body. Leave empty to search only by the structured filters below (e.g. `tagged` + `minViews`).",
            "items": {
              "type": "string"
            }
          },
          "site": {
            "title": "Site",
            "type": "string",
            "description": "Stack Exchange site as the API `site` parameter: `stackoverflow`, `serverfault`, `superuser`, `askubuntu`, `unix`, `dba`, `security`, `datascience`, `ai`, `math`, `english`, `workplace`, `law`, `money`… (184 main sites) or a meta site like `meta.stackoverflow`. Site URLs (`https://askubuntu.com`) and names (`Ask Ubuntu`) are accepted too. The full dictionary is in the README; unknown values fail fast with a clear error.",
            "default": "stackoverflow"
          },
          "key": {
            "title": "Stack Apps key (optional)",
            "type": "string",
            "description": "Application key from https://stackapps.com/apps/oauth/register. Without a key the public quota is 300 requests/day per IP — shared with everyone else running from the same Apify IP. With a key: 10,000/day."
          },
          "tagged": {
            "title": "Tagged (AND)",
            "type": "string",
            "description": "Only questions having ALL of these tags, separated by `;` (e.g. `python;pandas`). Required in `tag` mode. OR-logic is not supported by the API — run several inputs instead."
          },
          "nottagged": {
            "title": "Not tagged",
            "type": "string",
            "description": "Exclude questions having any of these tags (`;`-separated). Search mode only."
          },
          "title": {
            "title": "Title contains",
            "type": "string",
            "description": "Text that must appear in the title. Search mode only."
          },
          "body": {
            "title": "Body contains",
            "type": "string",
            "description": "Text that must appear in the question body. Search mode only."
          },
          "url": {
            "title": "Links to URL",
            "type": "string",
            "description": "Only questions whose body links to this URL (wildcards `*` allowed, e.g. `*.mycompany.com*`). Great for brand / docs monitoring. Search mode only."
          },
          "user": {
            "title": "Asked by user id",
            "minimum": 1,
            "type": "integer",
            "description": "Numeric user id of the asker. Search mode only."
          },
          "accepted": {
            "title": "Has accepted answer",
            "enum": [
              "any",
              "yes",
              "no"
            ],
            "type": "string",
            "description": "`yes` = only questions with an accepted answer, `no` = only without. Search mode only.",
            "default": "any"
          },
          "closed": {
            "title": "Closed",
            "enum": [
              "any",
              "yes",
              "no"
            ],
            "type": "string",
            "description": "`yes` = only closed questions, `no` = exclude closed. Search mode only.",
            "default": "any"
          },
          "migrated": {
            "title": "Migrated",
            "enum": [
              "any",
              "yes",
              "no"
            ],
            "type": "string",
            "description": "Filter questions migrated from another site. Search mode only.",
            "default": "any"
          },
          "notice": {
            "title": "Has post notice",
            "enum": [
              "any",
              "yes",
              "no"
            ],
            "type": "string",
            "description": "Filter questions with a post notice (e.g. bounty, needs details). Search mode only.",
            "default": "any"
          },
          "wiki": {
            "title": "Community wiki",
            "enum": [
              "any",
              "yes",
              "no"
            ],
            "type": "string",
            "description": "Filter community-wiki questions. Search mode only.",
            "default": "any"
          },
          "minAnswers": {
            "title": "Min answers",
            "minimum": 0,
            "type": "integer",
            "description": "Only questions with at least this many answers. Search mode only."
          },
          "minViews": {
            "title": "Min views",
            "minimum": 0,
            "type": "integer",
            "description": "Only questions with at least this many views. Search mode only."
          },
          "unanswered": {
            "title": "Unanswered filter",
            "enum": [
              "any",
              "noAnswers",
              "noAcceptedAnswer"
            ],
            "type": "string",
            "description": "`noAnswers` → /questions/no-answers in tag mode (client-side answerCount=0 in search mode); `noAcceptedAnswer` → /questions/unanswered in tag mode, accepted=False in search mode. Use for support / lead-gen: find people asking about your product with no help yet.",
            "default": "any"
          },
          "fromDate": {
            "title": "From date",
            "type": "string",
            "description": "Only questions created on/after this date (ISO 8601, e.g. `2026-01-01`)."
          },
          "toDate": {
            "title": "To date",
            "type": "string",
            "description": "Only questions created on/before this date (ISO 8601)."
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "activity",
              "creation",
              "votes",
              "hot",
              "week",
              "month",
              "reputation",
              "name",
              "modified"
            ],
            "type": "string",
            "description": "Sort field. Search mode: relevance | activity | creation | votes. Tag mode: activity | creation | votes | hot | week | month. Users mode: reputation | creation | name | modified. Invalid combinations fall back to the mode default with a warning.",
            "default": "relevance"
          },
          "order": {
            "title": "Order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Sort direction.",
            "default": "desc"
          },
          "sortMin": {
            "title": "Sort min",
            "type": "string",
            "description": "Lower bound on the sort field: a number for `votes` (e.g. `5` = score ≥ 5), an ISO date for `activity`/`creation`. Ignored for relevance/hot/week/month."
          },
          "sortMax": {
            "title": "Sort max",
            "type": "string",
            "description": "Upper bound on the sort field (same semantics as Sort min)."
          },
          "limit": {
            "title": "Max questions per query",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Questions to fetch per query / per tag feed (paged 100 at a time). Each page is one API request.",
            "default": 20
          },
          "maxItems": {
            "title": "Max items total",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on dataset items for the whole run (cost guard).",
            "default": 1000
          },
          "questionIds": {
            "title": "Question ids / URLs",
            "type": "array",
            "description": "For `questions` mode: numeric ids or full question URLs (e.g. `https://stackoverflow.com/questions/11227809/...`). Up to 100 per API request.",
            "items": {
              "type": "string"
            }
          },
          "users": {
            "title": "Users",
            "type": "array",
            "description": "For `users` mode: numeric user ids, profile URLs (`/users/22656/...`) or display-name searches (`inname`). Names return up to `limit` matches each.",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "title": "Tags",
            "type": "array",
            "description": "For `tagInfo` mode: tag names to look up (question count, synonyms, moderator-only flag, optional related tags).",
            "items": {
              "type": "string"
            }
          },
          "includeRelatedTags": {
            "title": "Include related tags",
            "type": "boolean",
            "description": "tagInfo mode: also fetch the top 30 co-occurring tags for each tag (one extra request per tag).",
            "default": false
          },
          "includeAnswers": {
            "title": "Include top answers",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "How many answers to embed per question (accepted first, then by score). Answers come in the same request as the question — no extra API calls. 0 = none.",
            "default": 2
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Embed comments on questions (and on embedded answers). Same request, larger items.",
            "default": false
          },
          "bodyMaxLength": {
            "title": "Question body max chars",
            "minimum": 0,
            "type": "integer",
            "description": "Truncate the plain-text question body to this many characters (0 = no limit). HTML is converted to readable text; code blocks are kept.",
            "default": 2000
          },
          "answerBodyMaxLength": {
            "title": "Answer body max chars",
            "minimum": 0,
            "type": "integer",
            "description": "Truncate each embedded answer body (0 = no limit).",
            "default": 3000
          },
          "dedupe": {
            "title": "Dedupe across queries",
            "type": "boolean",
            "description": "Emit each question only once per run even if several queries match it (first query wins).",
            "default": true
          },
          "fields": {
            "title": "Only these fields",
            "type": "array",
            "description": "Optional list of top-level output fields to keep (e.g. `[\"title\",\"url\",\"score\",\"answers\"]`). `id` is always kept. Empty = all fields.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}