# Stack Overflow Questions & Answers — $0.25/1K (`scrapesignal_labs/stack-overflow-questions-scraper`) Actor

Export current Stack Overflow questions, tags, scores, owners, bodies, and optional top answers through the official API.

- **URL**: https://apify.com/scrapesignal\_labs/stack-overflow-questions-scraper.md
- **Developed by:** [ScrapeSignal Labs](https://apify.com/scrapesignal_labs) (community)
- **Categories:** Developer tools, Education, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.25 / 1,000 questions

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Questions & Answers — $0.25 per 1,000 questions

Export current Stack Overflow questions through the official Stack Exchange API. Filter by tags, title text, dates, and ranking, and optionally attach the highest-scoring answers. The output is ready for developer research, documentation planning, support intelligence, trend monitoring, datasets, and AI-agent retrieval.

### What you get

- Question ID, title, link, tags, score, views, and answer status
- Owner identity and reputation exposed by the public API
- Creation, last-activity, and edit timestamps
- Original body HTML plus clean text
- Optional top answers with accepted status, score, owner, HTML, and text
- API quota and coverage information in the run's `SUMMARY` record

### Example input

```json
{
  "tags": ["javascript", "node.js"],
  "searchText": "web scraping",
  "sort": "votes",
  "maxQuestions": 25,
  "includeBody": true,
  "includeAnswers": true,
  "maxAnswersPerQuestion": 3
}
```

### Optional API key

Public runs use the Stack Exchange API's anonymous quota. Add a Stack Apps `stackExchangeKey` for regular use or more headroom. The key is marked sensitive and is sent only to `api.stackexchange.com`.

### Pricing

The introductory price is **$0.00025 per delivered question** ($0.25 per 1,000), plus a **$0.00005 start event**. Apify platform usage is included. Answers are included with their question and do not create an extra event charge.

Stack Overflow content is licensed by its contributors under the terms shown by Stack Overflow. Preserve required attribution and comply with the Stack Exchange API terms when storing or republishing results.

# Actor input Schema

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

Questions must contain at least one selected Stack Overflow tag.

## `searchText` (type: `string`):

Optional words that must appear in the question title.

## `sort` (type: `string`):

Ranking applied by the official Stack Exchange API.

## `fromDate` (type: `string`):

Optional ISO date/time lower bound.

## `toDate` (type: `string`):

Optional ISO date/time upper bound.

## `maxQuestions` (type: `integer`):

A hard output and price ceiling for this run.

## `includeBody` (type: `boolean`):

Return the original HTML and a cleaned plain-text version of each question body.

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

Fetch answers for the returned questions and rank them by score.

## `maxAnswersPerQuestion` (type: `integer`):

Hard cap on the highest-scoring answers attached to each returned question.

## `stackExchangeKey` (type: `string`):

Raises the official Stack Exchange API quota. It is sent only to api.stackexchange.com.

## `timeoutSeconds` (type: `integer`):

Stop waiting for an individual Stack Exchange API response after this many seconds.

## Actor input object example

```json
{
  "tags": [
    "javascript"
  ],
  "searchText": "",
  "sort": "activity",
  "fromDate": "",
  "toDate": "",
  "maxQuestions": 25,
  "includeBody": true,
  "includeAnswers": false,
  "maxAnswersPerQuestion": 3,
  "timeoutSeconds": 20
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesignal_labs/stack-overflow-questions-scraper").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("scrapesignal_labs/stack-overflow-questions-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{}' |
apify call scrapesignal_labs/stack-overflow-questions-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapesignal_labs/stack-overflow-questions-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/CR0GFzDLsXeqbUlXv/builds/B8mSmp28B4w4OSn3f/openapi.json
