# Stackoverflow Intelligence (`viralanalyzer/stackoverflow-intelligence`) Actor

Scrape Stack Overflow questions, answers, tags, and user profiles. Analyze developer trends and technology adoption patterns.

- **URL**: https://apify.com/viralanalyzer/stackoverflow-intelligence.md
- **Developed by:** [viralanalyzer](https://apify.com/viralanalyzer) (community)
- **Categories:** Developer tools, AI, Agents
- **Stats:** 3 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $15.75 / 1,000 question scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 📚 Stack Overflow Intelligence — Questions, Answers & Trends

> 🔗 [View on Apify Store](https://apify.com/viralanalyzer/stackoverflow-intelligence) | 🇺🇸 English | [🇧🇷 Português](#português)

Scrape **Stack Overflow questions and answers** using the public Stack Exchange API v2.3. Search by keyword, browse hot questions, get **trending topics of the week**, or filter by tag. Supports any Stack Exchange site. No API key needed.

### ✨ Features

- 🔍 **4 scraping modes** — Search, Hot Questions, Trending (most voted this week), By Tag
- 🔑 **Keyword search** — Find questions by topic with multiple sort options
- 🏷️ **Tag filtering** — Get questions by Stack Overflow tags (python, javascript, react, etc.)
- 💡 **Answer extraction** — Fetch the top/accepted answer per question (optional)
- 📊 **Full metrics** — Score, view count, answer count, author reputation
- 🌐 **Multi-site** — Works with any Stack Exchange site (stackoverflow, serverfault, askubuntu, etc.)
- 🛡️ **Anti-placeholder guardrails** — Every result validated as real data
- ⚡ **API-based** — Fast and reliable via official Stack Exchange API

### 📥 Input

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `mode` | String | Yes | `search` | Scraping mode: `search`, `hot`, `trending`, or `by_tag` |
| `searchQueries` | Array | Only in `search` mode | — | Keywords to search for (max 10 queries) |
| `tags` | Array | Only in `by_tag` mode | — | Stack Overflow tags to filter (max 5 tags) |
| `sortBy` | String | No | `relevance` | Sort order: `relevance`, `votes`, `creation`, or `activity` |
| `maxItems` | Integer | No | `50` | Maximum number of questions to scrape (1–200) |
| `includeAnswers` | Boolean | No | `false` | Fetch the top/accepted answer for each question |
| `site` | String | No | `stackoverflow` | Stack Exchange site to query |

#### Input Example
```json
{
    "mode": "search",
    "searchQueries": [
        "react hooks useEffect",
        "python async await"
    ],
    "sortBy": "votes",
    "maxItems": 50,
    "includeAnswers": true,
    "site": "stackoverflow"
}
````

### 📤 Output

| Field | Type | Description |
|-------|------|-------------|
| `questionId` | Integer | Stack Overflow question ID |
| `title` | String | Question title |
| `link` | String | Question URL |
| `score` | Integer | Vote score (upvotes - downvotes) |
| `viewCount` | Integer | Total view count |
| `answerCount` | Integer | Number of answers |
| `isAnswered` | Boolean | Has an accepted answer |
| `tags` | Array | Question tags |
| `ownerName` | String | Author display name |
| `ownerReputation` | Integer | Author reputation score |
| `creationDate` | String | Creation timestamp (ISO 8601) |
| `lastActivityDate` | String | Last activity timestamp (ISO 8601) |
| `bodyPreview` | String | Question body preview (first 300 chars, HTML stripped) |
| `platform` | String | Always `stackoverflow` |
| `scrapedAt` | String | Timestamp of data extraction (ISO 8601) |
| `topAnswer` | Object | Top/accepted answer (when `includeAnswers` is enabled) |

#### Answer Fields

| Field | Type | Description |
|-------|------|-------------|
| `answerId` | Integer | Answer ID |
| `score` | Integer | Answer vote score |
| `isAccepted` | Boolean | Whether this is the accepted answer |
| `body` | String | Answer body (first 500 chars, HTML stripped) |
| `ownerName` | String | Answerer display name |
| `ownerReputation` | Integer | Answerer reputation score |
| `creationDate` | String | Answer creation timestamp (ISO 8601) |

#### Output Example

```json
{
    "questionId": 54620698,
    "title": "How to fix missing dependency warning when using useEffect React Hook",
    "link": "https://stackoverflow.com/questions/54620698",
    "score": 1247,
    "viewCount": 892341,
    "answerCount": 18,
    "isAnswered": true,
    "tags": ["javascript", "reactjs", "react-hooks", "eslint", "use-effect"],
    "ownerName": "Andrey Luiz",
    "ownerReputation": 8453,
    "creationDate": "2019-02-11T14:32:08.000Z",
    "lastActivityDate": "2026-02-28T09:15:42.000Z",
    "bodyPreview": "With React 16.8.6, I get this warning when I attempt to compile: React Hook useEffect has a missing dependency. Either include it or remove the dependency array...",
    "platform": "stackoverflow",
    "scrapedAt": "2026-03-06T14:45:33.219Z",
    "topAnswer": {
        "answerId": 54621037,
        "score": 1583,
        "isAccepted": true,
        "body": "The reason the linter rule wants you to include the function in the dependency array is because by default it assumes any function could be different on every render. If the function is stable (defined outside component or wrapped in useCallback)...",
        "ownerName": "Dan Abramov",
        "ownerReputation": 267891,
        "creationDate": "2019-02-11T15:01:22.000Z"
    }
}
```

### 📋 Use Cases

- 🔍 **Developer research** — Find solutions and best practices for specific technologies
- 📈 **Tech trend analysis** — Track which technologies generate the most questions
- ✍️ **Content marketing** — Identify common pain points to write tutorials about
- 🛠️ **Product development** — Discover frequent issues users face with your technology
- 👥 **Hiring intelligence** — Analyze which skills are most in demand
- 📖 **Knowledge base building** — Curate high-quality Q\&A for internal documentation

### ❓ FAQ

**Q: Does this actor need an API key?**
A: No. The Stack Exchange API v2.3 allows unauthenticated requests with a quota of 300 requests per day per IP. The actor monitors quota usage and logs remaining calls.

**Q: What is the difference between "hot" and "trending" modes?**
A: "hot" returns questions that Stack Overflow considers currently hot based on their algorithm (recent activity + engagement). "trending" returns questions from the past week sorted by votes, showing the most upvoted questions of the week.

**Q: Can I scrape sites other than Stack Overflow?**
A: Yes. Set the `site` parameter to any Stack Exchange site ID such as `serverfault`, `askubuntu`, `superuser`, `gamedev`, or `math`. The full list is available at stackexchange.com/sites.

**Q: Will enabling answers slow down the scraper?**
A: Yes. Each question with answers requires an additional API call. The actor adds a 500ms delay between answer requests to respect the API quota. For large runs, this can add significant execution time.

**Q: What does the "bodyPreview" field contain?**
A: It contains the first 300 characters of the question body with all HTML tags stripped. This provides enough context to understand the question without fetching the full body, which can be very long.

### 💰 Pricing

This actor uses **Pay Per Event (PPE)** pricing:

| Metric | Cost |
|--------|------|
| Per question scraped | $0.03 |

### 🔗 Related Actors

- [Hacker News Intelligence](https://apify.com/viralanalyzer/hackernews-intelligence) — HN stories & comments
- [GitHub Trending Scraper](https://apify.com/viralanalyzer/github-trending-scraper) — Trending repositories
- [Craigslist Scraper](https://apify.com/viralanalyzer/craigslist-scraper) — Classifieds & listings
- [YouTube Fast Scraper](https://apify.com/viralanalyzer/youtube-fast-scraper) — YouTube video metrics

### 📝 Changelog

#### v1.0 (Current)

- ✅ 4 scraping modes (search, hot, trending, by\_tag)
- ✅ Keyword search with multiple sort options (relevance, votes, creation, activity)
- ✅ Tag-based filtering (up to 5 tags)
- ✅ Optional top/accepted answer extraction
- ✅ Multi-site support (any Stack Exchange site)
- ✅ Deduplication by question ID
- ✅ API quota monitoring
- ✅ Anti-placeholder guardrails
- ✅ Retry logic with rate limit handling
- ✅ PPE billing via Actor.charge()

***

<a name="português"></a>

## 📚 Stack Overflow Intelligence — Perguntas, Respostas & Tendências

> [🇺🇸 English](#-stack-overflow-intelligence--questions-answers--trends) | 🇧🇷 Português

Extraia **perguntas e respostas do Stack Overflow** usando a API pública Stack Exchange v2.3. Busque por palavra-chave, navegue pelas perguntas quentes, obtenha **tópicos em alta da semana**, ou filtre por tag. Suporta qualquer site do Stack Exchange. Sem API key.

### ✨ Funcionalidades

- 🔍 **4 modos de extração** — Search, Hot Questions, Trending (mais votadas da semana), By Tag
- 🔑 **Busca por palavra-chave** — Encontre perguntas por tópico com múltiplas opções de ordenação
- 🏷️ **Filtro por tag** — Obtenha perguntas por tags do SO (python, javascript, react, etc.)
- 💡 **Extração de respostas** — Busque a resposta top/aceita por pergunta (opcional)
- 📊 **Métricas completas** — Score, visualizações, contagem de respostas, reputação do autor
- 🌐 **Multi-site** — Funciona com qualquer site Stack Exchange (stackoverflow, serverfault, askubuntu, etc.)
- 🛡️ **Guardrails anti-placeholder** — Todo resultado validado como dado real
- ⚡ **Baseado em API** — Rápido e confiável via API oficial Stack Exchange

### 📥 Entrada

| Parâmetro | Tipo | Obrigatório | Padrão | Descrição |
|-----------|------|-------------|--------|-----------|
| `mode` | String | Sim | `search` | Modo de extração: `search`, `hot`, `trending` ou `by_tag` |
| `searchQueries` | Array | Apenas no modo `search` | — | Palavras-chave para pesquisar (máximo 10 consultas) |
| `tags` | Array | Apenas no modo `by_tag` | — | Tags do Stack Overflow para filtrar (máximo 5 tags) |
| `sortBy` | String | Não | `relevance` | Ordenação: `relevance`, `votes`, `creation` ou `activity` |
| `maxItems` | Integer | Não | `50` | Número máximo de perguntas para extrair (1–200) |
| `includeAnswers` | Boolean | Não | `false` | Buscar a resposta top/aceita para cada pergunta |
| `site` | String | Não | `stackoverflow` | Site do Stack Exchange para consultar |

#### Exemplo de Entrada

```json
{
    "mode": "search",
    "searchQueries": [
        "react hooks useEffect",
        "python async await"
    ],
    "sortBy": "votes",
    "maxItems": 50,
    "includeAnswers": true,
    "site": "stackoverflow"
}
```

### 📤 Saída

| Campo | Tipo | Descrição |
|-------|------|-----------|
| `questionId` | Integer | ID da pergunta no Stack Overflow |
| `title` | String | Título da pergunta |
| `link` | String | URL da pergunta |
| `score` | Integer | Score de votos (upvotes - downvotes) |
| `viewCount` | Integer | Total de visualizações |
| `answerCount` | Integer | Número de respostas |
| `isAnswered` | Boolean | Possui resposta aceita |
| `tags` | Array | Tags da pergunta |
| `ownerName` | String | Nome do autor |
| `ownerReputation` | Integer | Reputação do autor |
| `creationDate` | String | Timestamp de criação (ISO 8601) |
| `lastActivityDate` | String | Timestamp da última atividade (ISO 8601) |
| `bodyPreview` | String | Preview do corpo da pergunta (primeiros 300 caracteres, HTML removido) |
| `platform` | String | Sempre `stackoverflow` |
| `scrapedAt` | String | Timestamp da extração dos dados (ISO 8601) |
| `topAnswer` | Object | Resposta top/aceita (quando `includeAnswers` está habilitado) |

#### Campos da Resposta

| Campo | Tipo | Descrição |
|-------|------|-----------|
| `answerId` | Integer | ID da resposta |
| `score` | Integer | Score de votos da resposta |
| `isAccepted` | Boolean | Se é a resposta aceita |
| `body` | String | Corpo da resposta (primeiros 500 caracteres, HTML removido) |
| `ownerName` | String | Nome de quem respondeu |
| `ownerReputation` | Integer | Reputação de quem respondeu |
| `creationDate` | String | Timestamp de criação da resposta (ISO 8601) |

#### Exemplo de Saída

```json
{
    "questionId": 54620698,
    "title": "How to fix missing dependency warning when using useEffect React Hook",
    "link": "https://stackoverflow.com/questions/54620698",
    "score": 1247,
    "viewCount": 892341,
    "answerCount": 18,
    "isAnswered": true,
    "tags": ["javascript", "reactjs", "react-hooks", "eslint", "use-effect"],
    "ownerName": "Andrey Luiz",
    "ownerReputation": 8453,
    "creationDate": "2019-02-11T14:32:08.000Z",
    "lastActivityDate": "2026-02-28T09:15:42.000Z",
    "bodyPreview": "With React 16.8.6, I get this warning when I attempt to compile: React Hook useEffect has a missing dependency. Either include it or remove the dependency array...",
    "platform": "stackoverflow",
    "scrapedAt": "2026-03-06T14:45:33.219Z",
    "topAnswer": {
        "answerId": 54621037,
        "score": 1583,
        "isAccepted": true,
        "body": "The reason the linter rule wants you to include the function in the dependency array is because by default it assumes any function could be different on every render. If the function is stable (defined outside component or wrapped in useCallback)...",
        "ownerName": "Dan Abramov",
        "ownerReputation": 267891,
        "creationDate": "2019-02-11T15:01:22.000Z"
    }
}
```

### 📋 Casos de Uso

- 🔍 **Pesquisa para desenvolvedores** — Encontre soluções e boas práticas para tecnologias específicas
- 📈 **Análise de tendências tech** — Acompanhe quais tecnologias geram mais perguntas
- ✍️ **Marketing de conteúdo** — Identifique dores comuns para escrever tutoriais
- 🛠️ **Desenvolvimento de produto** — Descubra problemas frequentes que usuários enfrentam com sua tecnologia
- 👥 **Inteligência de contratação** — Analise quais habilidades estão mais em demanda
- 📖 **Base de conhecimento** — Curadoria de Q\&A de alta qualidade para documentação interna

### ❓ Perguntas Frequentes

**P: Este actor precisa de uma API key?**
R: Não. A API Stack Exchange v2.3 permite requisições não autenticadas com uma cota de 300 requisições por dia por IP. O actor monitora o uso da cota e registra as chamadas restantes.

**P: Qual é a diferença entre os modos "hot" e "trending"?**
R: "hot" retorna perguntas que o Stack Overflow considera quentes no momento com base no algoritmo deles (atividade recente + engajamento). "trending" retorna perguntas da última semana ordenadas por votos, mostrando as perguntas mais votadas da semana.

**P: Posso fazer scraping de outros sites além do Stack Overflow?**
R: Sim. Configure o parâmetro `site` para qualquer ID de site Stack Exchange como `serverfault`, `askubuntu`, `superuser`, `gamedev` ou `math`. A lista completa está disponível em stackexchange.com/sites.

**P: Habilitar respostas vai deixar o scraper mais lento?**
R: Sim. Cada pergunta com respostas requer uma chamada API adicional. O actor adiciona um atraso de 500ms entre requisições de respostas para respeitar a cota da API. Para execuções grandes, isso pode adicionar tempo significativo de execução.

**P: O que o campo "bodyPreview" contém?**
R: Ele contém os primeiros 300 caracteres do corpo da pergunta com todas as tags HTML removidas. Isso fornece contexto suficiente para entender a pergunta sem buscar o corpo completo, que pode ser muito longo.

### 💰 Preços

Este actor usa precificação **Pay Per Event (PPE)**:

| Métrica | Custo |
|---------|-------|
| Por pergunta extraída | $0.03 |

### 🔗 Actors Relacionados

- [Hacker News Intelligence](https://apify.com/viralanalyzer/hackernews-intelligence) — Stories e comentários do HN
- [GitHub Trending Scraper](https://apify.com/viralanalyzer/github-trending-scraper) — Repositórios em alta
- [Craigslist Scraper](https://apify.com/viralanalyzer/craigslist-scraper) — Classificados e anúncios
- [YouTube Fast Scraper](https://apify.com/viralanalyzer/youtube-fast-scraper) — Métricas de vídeos do YouTube

### 📝 Changelog

#### v1.0 (Atual)

- ✅ 4 modos de extração (search, hot, trending, by\_tag)
- ✅ Busca por palavra-chave com múltiplas opções de ordenação (relevância, votos, criação, atividade)
- ✅ Filtragem por tag (até 5 tags)
- ✅ Extração opcional de resposta top/aceita
- ✅ Suporte multi-site (qualquer site Stack Exchange)
- ✅ Deduplicação por question ID
- ✅ Monitoramento de cota da API
- ✅ Guardrails anti-placeholder
- ✅ Lógica de retry com tratamento de rate limit
- ✅ Cobrança PPE via Actor.charge()

# Actor input Schema

## `mode` (type: `string`):

What data to collect.

## `searchQueries` (type: `array`):

Keywords to search for (only used in 'search' mode).

## `tags` (type: `array`):

Filter by Stack Overflow tags (only used in 'by\_tag' mode).

## `sortBy` (type: `string`):

How to sort results.

## `maxItems` (type: `integer`):

Maximum number of questions to scrape.

## `includeAnswers` (type: `boolean`):

Fetch the accepted/top answer for each question.

## `site` (type: `string`):

Which Stack Exchange site to query.

## Actor input object example

```json
{
  "mode": "search",
  "searchQueries": [
    "react hooks",
    "python async"
  ],
  "tags": [
    "python",
    "javascript"
  ],
  "sortBy": "relevance",
  "maxItems": 50,
  "includeAnswers": false,
  "site": "stackoverflow"
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset containing all scraped results. Each item follows the dataset schema.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQueries": [
        "react hooks",
        "python async"
    ],
    "tags": [
        "python",
        "javascript"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("viralanalyzer/stackoverflow-intelligence").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchQueries": [
        "react hooks",
        "python async",
    ],
    "tags": [
        "python",
        "javascript",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("viralanalyzer/stackoverflow-intelligence").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "react hooks",
    "python async"
  ],
  "tags": [
    "python",
    "javascript"
  ]
}' |
apify call viralanalyzer/stackoverflow-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=viralanalyzer/stackoverflow-intelligence",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Stackoverflow Intelligence",
        "description": "Scrape Stack Overflow questions, answers, tags, and user profiles. Analyze developer trends and technology adoption patterns.",
        "version": "1.0",
        "x-build-id": "XAhWtT7KMyeU9LPxS"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/viralanalyzer~stackoverflow-intelligence/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-viralanalyzer-stackoverflow-intelligence",
                "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/viralanalyzer~stackoverflow-intelligence/runs": {
            "post": {
                "operationId": "runs-sync-viralanalyzer-stackoverflow-intelligence",
                "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/viralanalyzer~stackoverflow-intelligence/run-sync": {
            "post": {
                "operationId": "run-sync-viralanalyzer-stackoverflow-intelligence",
                "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",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Scraping Mode",
                        "enum": [
                            "search",
                            "hot",
                            "trending",
                            "by_tag"
                        ],
                        "type": "string",
                        "description": "What data to collect.",
                        "default": "search"
                    },
                    "searchQueries": {
                        "title": "Search Keywords",
                        "maxItems": 10,
                        "type": "array",
                        "description": "Keywords to search for (only used in 'search' mode).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "tags": {
                        "title": "Tags",
                        "maxItems": 5,
                        "type": "array",
                        "description": "Filter by Stack Overflow tags (only used in 'by_tag' mode).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "sortBy": {
                        "title": "Sort By",
                        "enum": [
                            "relevance",
                            "votes",
                            "creation",
                            "activity"
                        ],
                        "type": "string",
                        "description": "How to sort results.",
                        "default": "relevance"
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Maximum number of questions to scrape.",
                        "default": 50
                    },
                    "includeAnswers": {
                        "title": "Include Top Answer",
                        "type": "boolean",
                        "description": "Fetch the accepted/top answer for each question.",
                        "default": false
                    },
                    "site": {
                        "title": "Stack Exchange Site",
                        "type": "string",
                        "description": "Which Stack Exchange site to query.",
                        "default": "stackoverflow"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
