{
  "openapi": "3.0.1",
  "info": {
    "title": "Stack Overflow & Stack Exchange Questions and Answers",
    "description": "Export Stack Overflow and Stack Exchange questions and top answers by keyword, tag, date or accepted answer from the official API. Scores, tags, authors and CC BY-SA attribution on every row. No login, no proxy.",
    "version": "0.1",
    "x-build-id": "XM50ZEeMIMvuBb9TR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/atesen-software~stack-exchange-questions/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-atesen-software-stack-exchange-questions",
        "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/atesen-software~stack-exchange-questions/runs": {
      "post": {
        "operationId": "runs-sync-atesen-software-stack-exchange-questions",
        "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/atesen-software~stack-exchange-questions/run-sync": {
      "post": {
        "operationId": "run-sync-atesen-software-stack-exchange-questions",
        "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": "Stack Exchange site",
            "pattern": "^[a-z0-9.-]{1,80}$",
            "type": "string",
            "description": "API site identifier: stackoverflow, math, superuser, etc. No URL.",
            "default": "stackoverflow"
          },
          "query": {
            "title": "Search query",
            "maxLength": 500,
            "type": "string",
            "description": "Full-text query passed to official /search/advanced. Empty returns latest matching questions.",
            "default": ""
          },
          "tagged": {
            "title": "Tags",
            "maxLength": 500,
            "type": "string",
            "description": "Semicolon-separated tags; official advanced search matches at least one tag.",
            "default": ""
          },
          "maxQuestions": {
            "title": "Maximum questions",
            "minimum": 1,
            "maximum": 2500,
            "type": "integer",
            "description": "1–2500. Search scans at most 25 pages; filters and changing results can return fewer.",
            "default": 10
          },
          "answersPerQuestion": {
            "title": "Top answers per question",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "0 disables answers; otherwise up to 100 answers by score for each returned question, subject to total/request/quota limits.",
            "default": 0
          },
          "maxAnswers": {
            "title": "Maximum total answers",
            "minimum": 0,
            "maximum": 2500,
            "type": "integer",
            "description": "Total answer rows across all questions.",
            "default": 100
          },
          "includeBody": {
            "title": "Include HTML bodies",
            "type": "boolean",
            "description": "Stores provider HTML as data only. Sanitize before rendering in your application.",
            "default": false
          },
          "accepted": {
            "title": "Has accepted answer",
            "type": "boolean",
            "description": "Omit for both; true requires an accepted answer, false excludes questions with accepted answers."
          },
          "unanswered": {
            "title": "Only questions with zero answers",
            "type": "boolean",
            "description": "Filters the search results locally to answer_count=0; may return fewer than requested within 25 pages.",
            "default": false
          },
          "fromdate": {
            "title": "Created from (Unix seconds)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional inclusive creation-date lower bound in UTC Unix seconds."
          },
          "todate": {
            "title": "Created until (Unix seconds)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional inclusive creation-date upper bound in UTC Unix seconds."
          },
          "sort": {
            "title": "Question sort",
            "enum": [
              "activity",
              "creation",
              "votes",
              "relevance"
            ],
            "type": "string",
            "description": "Official advanced search sort.",
            "default": "activity"
          },
          "order": {
            "title": "Sort order",
            "enum": [
              "asc",
              "desc"
            ],
            "type": "string",
            "description": "Ascending or descending.",
            "default": "desc"
          },
          "maxRuntimeSeconds": {
            "title": "Application runtime limit",
            "minimum": 5,
            "maximum": 600,
            "type": "integer",
            "description": "Stops cleanly before requests or backoff waits would exceed this duration. The Actor's default run timeout is 660 s, which leaves time to save output at the 600 s maximum; if you set a shorter run timeout, keep this value at least 30 s below it.",
            "default": 120
          },
          "maxApiRequests": {
            "title": "API request cap",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Conservative per-run cap; all requests share provider IP quota with other users.",
            "default": 50
          },
          "userAgent": {
            "title": "Custom User-Agent (optional)",
            "maxLength": 200,
            "type": "string",
            "description": "Leave empty to send the Actor's own descriptive User-Agent. Set your own app name and contact if you prefer to identify yourself to the API.",
            "default": ""
          },
          "apiKey": {
            "title": "Stack Apps key (optional)",
            "type": "string",
            "description": "Optional, free application key from stackapps.com. It raises the daily API quota from about 300 to 10,000 requests for this run. Not a secret access token; never put an OAuth access token here."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}