# Stack Overflow Scraper - Questions by Tag (`logiover/stack-exchange-questions-scraper`) Actor

Scrape Stack Overflow questions by tag without an API key. Stack Exchange data export to CSV/JSON; an API alternative for question datasets.

- **URL**: https://apify.com/logiover/stack-exchange-questions-scraper.md
- **Developed by:** [Logiover](https://apify.com/logiover) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 167 total users, 5 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 results

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/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 Scraper — Questions by Tag, Score, Views & Answers (No API Key)

![Apify Actor](https://img.shields.io/badge/Apify-Actor-00A67E?logo=apify\&logoColor=white) ![No API key](https://img.shields.io/badge/No%20API%20key-required-2ea44f) ![No proxy](https://img.shields.io/badge/No%20proxy-needed-2ea44f) ![Pay per result](https://img.shields.io/badge/Pricing-Pay%20per%20result-1C7ED6) ![Export](https://img.shields.io/badge/Export-JSON%20%7C%20CSV%20%7C%20Excel-F59E0B)

Scrape developer questions from **Stack Overflow** and any of the **170+ Stack Exchange** Q\&A sites by **tag, site and sort order** — millions of questions across programming, DevOps, data science, sysadmin and more. Get **title, tags, score, views, answer count, accepted-answer flag, author, reputation and timestamps** in clean flat JSON, straight from the official public Stack Exchange API. **Fast, no login, no API key, no proxy.**

> ### 🏆 Why this Stack Exchange scraper?
>
> **14-column flat schema** · **thousands of questions per run** · official public API (stable, no scraping fragility) · auto-pagination with backoff · no key, no proxy · export to JSON / CSV / Excel. The practical **Stack Overflow API alternative** for developer-insight research, SEO content mining and LLM training data.

***

### ✨ What this Actor does / Key features

- 🌐 **170+ network sites** — Stack Overflow, Server Fault, Super User, Ask Ubuntu, DBA, Data Science, Code Review, Cross Validated, Software Engineering, DevOps and every other Stack Exchange site by short ID.
- 🏷️ **Tag filtering** — target a single tag (`python`, `react`, `kubernetes`) or combine several with `;` to narrow to questions carrying all of them.
- 🔀 **Flexible sorting** — order results by `activity`, `creation`, `votes` or `hot` to surface the newest, the highest-voted or the trending questions.
- 📊 **Engagement metrics** — every row carries net score, total views and answer count, plus `isAnswered` and `hasAcceptedAnswer` flags for support and content triage.
- 👤 **Author signals** — asker display name and reputation score for community and influence analysis.
- 🕒 **Full timestamps** — creation and last-activity times in ISO format, ready for trend analysis and scheduled diffing.
- ⚡ **Auto-pagination** — set a cap or let it paginate until the tag is exhausted; the Actor respects the API quota with automatic backoff.
- 🧾 **Flat, LLM-ready rows** — a clean 14-column schema that drops straight into a spreadsheet, warehouse or RAG pipeline.
- 🟢 **Zero setup** — no Stack Exchange account, no API key, no proxy configuration.

### 🚀 Quick start (3 steps)

1. **Configure** — pick a `site` (e.g. `stackoverflow`), set a `tag` to filter (or leave empty for all), and choose a sort order.
2. **Run** — click **Start**. The Actor queries the public Stack Exchange API, paginates automatically and streams questions into your dataset.
3. **Get your data** — open the **Output** tab and export to **JSON, CSV, JSONL, Excel, HTML or XML**, or pull it via the Apify API.

### 📥 Input

Everything is optional — run it as-is to pull the latest Stack Overflow questions, or narrow with a site, tag and sort.

#### Example — highest-voted Python questions on Stack Overflow

```json
{
  "site": "stackoverflow",
  "tag": "python",
  "sort": "votes",
  "maxQuestions": 500
}
```

#### Example — newest DevOps questions (product monitoring)

```json
{
  "site": "devops",
  "tag": "kubernetes;helm",
  "sort": "creation",
  "maxQuestions": 300
}
```

#### Example — trending Server Fault questions

```json
{
  "site": "serverfault",
  "tag": "",
  "sort": "hot",
  "maxQuestions": 200
}
```

| Field | Type | Description |
|-------|------|-------------|
| `site` | string | Stack Exchange site short ID: `stackoverflow`, `serverfault`, `superuser`, `askubuntu`, `dba`, `datascience`, `codereview` and 170+ more. |
| `tag` | string | Tag filter (e.g. `python`). Combine multiple tags with `;` to require all of them. Empty = all questions for the site. |
| `sort` | string | `activity`, `creation`, `votes` or `hot`. |
| `maxQuestions` | integer | Total cap for the run. `0` = paginate until the tag is exhausted (subject to the API's daily quota). |

> **Finding a site short ID:** it's the subdomain of the site — `stackoverflow` for stackoverflow.com, `serverfault` for serverfault.com, `datascience` for datascience.stackexchange.com, and so on.

### 📤 Output

One row per question — a flat 14-column record, exportable to JSON, CSV, JSONL, Excel, HTML or XML. Here is a sample:

```json
{
  "questionId": 78123456,
  "title": "How do I merge two dictionaries in Python 3?",
  "link": "https://stackoverflow.com/questions/78123456/how-do-i-merge-two-dictionaries-in-python-3",
  "tags": ["python", "python-3.x", "dictionary"],
  "author": "dev_ada",
  "authorReputation": 4820,
  "score": 137,
  "viewCount": 89412,
  "answerCount": 9,
  "isAnswered": true,
  "hasAcceptedAnswer": true,
  "createdAt": "2026-06-28T10:14:00Z",
  "lastActivityAt": "2026-07-05T22:03:00Z",
  "scrapedAt": "2026-07-06T12:00:00Z"
}
```

<details>
<summary><b>📋 Full field reference (click to expand)</b></summary>

| Field | Description |
|-------|-------------|
| `questionId` | Stack Exchange question ID |
| `title` | Question headline |
| `link` | Direct URL to the question |
| `tags` | List of tags (e.g. `python`, `react`, `kubernetes`) |
| `author` | Asker's display name |
| `authorReputation` | Asker's reputation score |
| `score` | Net upvotes |
| `viewCount` | Total views |
| `answerCount` | Number of answers |
| `isAnswered` | Whether the question has an accepted-or-positive answer |
| `hasAcceptedAnswer` | Accepted-answer flag |
| `createdAt` | Creation timestamp (ISO 8601) |
| `lastActivityAt` | Last-activity timestamp (ISO 8601) |
| `scrapedAt` | When the row was collected (ISO 8601) |

</details>

### 💡 Use cases

- **Developer-insight & pain-point research** — mine what users actually struggle with for a language, framework or product by pulling its tagged questions.
- **Product & competitor monitoring** — track questions tagged with your tool or a competitor's on a schedule and diff against yesterday.
- **FAQ & SEO content generation** — surface high-view, high-score questions to turn into docs, tutorials and articles.
- **Support intelligence** — quantify recurring issues by tag, score and view count to prioritise your knowledge base.
- **LLM training data** — assemble large, structured developer Q\&A corpora for fine-tuning or RAG.
- **Unanswered-question hunting** — filter on `isAnswered` / `hasAcceptedAnswer` to find high-view gaps worth answering or documenting.

### 👥 Who uses it

Developer-relations & DevRel teams · technical content & SEO writers · product managers monitoring tool adoption · support and knowledge-base teams · ML engineers building Q\&A datasets · community and open-source maintainers.

### 💰 Pricing

This Actor runs on a simple **pay-per-result** model — you pay for the questions you extract, with no separate Apify platform fees to calculate. Try it on the **free tier** first, then scale up. See the **Pricing** tab on this page for the current rate.

### ❓ Frequently Asked Questions

**Is it legal to scrape Stack Overflow?**
The Actor uses the official public Stack Exchange API and collects only publicly available question data. You are responsible for using the data in compliance with Stack Exchange's terms and applicable laws.

**Do I need a Stack Exchange API key?**
No. The Actor uses anonymous Stack Exchange API access — no account, key or proxy required. Anonymous usage is subject to the API's daily quota, which the Actor respects with backoff.

**Do I need a proxy?**
No. Because it uses the official API, no proxy is needed — runs work out of the box.

**Which sites can I scrape?**
Any of the 170+ Stack Exchange network sites — Stack Overflow, Server Fault, Super User, Ask Ubuntu, DBA, Data Science, Code Review, Cross Validated, Software Engineering, DevOps and more. Just enter the site's short ID.

**Can I filter by multiple tags?**
Yes. Enter several tags separated by `;` in the `tag` field to narrow results to questions carrying all of them.

**Which export formats are supported?**
Each run is stored in an Apify Dataset, downloadable as JSON, JSONL, CSV, Excel, HTML or XML, or accessible via the Apify API.

#### Is this a Stack Overflow API alternative?

Yes. If you want to scrape Stack Overflow without registering, this Actor is a practical Stack Overflow API alternative — it queries the public Stack Exchange API anonymously and returns flat rows ready for analysis, no key required.

#### How do I export Stack Exchange data to CSV or JSON?

Run the Actor for your chosen site and tag, then download the resulting dataset. Export to CSV, JSON, Excel or XML is one click in the Apify Console, or pull a Stack Overflow questions dataset in JSON straight from the Apify API.

#### Can I export Stack Overflow questions by tag?

Yes. Set the `tag` field (e.g. `python`) and the Actor returns every matching question with title, score, views, answers, author and dates — ideal for building a tagged Stack Overflow questions dataset.

#### How do I scrape the highest-voted Stack Overflow questions for a tag?

Set the tag (for example `python`), choose `sort=votes`, and the scraper returns questions ordered by net upvotes with score, views and answer counts.

#### Can I scrape questions from Server Fault or Super User too?

Yes. Enter any Stack Exchange short ID in the `site` field, such as `serverfault`, `superuser` or `datascience`, to scrape that network site by tag.

#### How do I find unanswered questions to build support content?

Scrape a tag, then filter the dataset on `isAnswered` or `hasAcceptedAnswer` — high-view questions without accepted answers are strong FAQ and content targets.

### 🔗 More data scrapers by logiover

Pair Stack Exchange with the rest of the developer & community intelligence suite:

| Focus | Actor |
|---|---|
| 💬 Reddit | [Reddit Subreddit Scraper](https://apify.com/logiover/reddit-subreddit-scraper) · [Reddit Search Scraper](https://apify.com/logiover/reddit-search-scraper) |
| 🟠 Hacker News | [HN Search Scraper](https://apify.com/logiover/hacker-news-search-scraper) · [HN Who Is Hiring](https://apify.com/logiover/hacker-news-who-is-hiring-scraper) |
| 👩‍💻 Dev community | [Dev.to Articles Scraper](https://apify.com/logiover/devto-articles-scraper) · [Substack Newsletter Scraper](https://apify.com/logiover/substack-newsletter-scraper) |
| 🐙 GitHub | [GitHub Repository Scraper](https://apify.com/logiover/github-repository-scraper) · [GitHub Activity Stream](https://apify.com/logiover/github-activity-stream) |
| 📦 Packages | [npm Package Intelligence](https://apify.com/logiover/npm-package-intelligence-scraper) · [Hugging Face Hub Intelligence](https://apify.com/logiover/huggingface-hub-intelligence-scraper) |
| 🏫 Communities | [Skool Scraper](https://apify.com/logiover/skool-scraper) · [Meetup Scraper](https://apify.com/logiover/meetup-scraper) |

👉 Browse all **[logiover scrapers on Apify Store](https://apify.com/logiover)** — 180+ actors across real estate, jobs, crypto, social media & B2B data.

### ⏰ Scheduling & integration

Schedule this Actor on Apify to keep a fresh Q\&A feed for a tag or product daily or weekly. Export results to JSON, CSV or Excel, sync to Google Sheets, or push to your database, BI tools and webhooks through the Apify API. Connect it to **Make, n8n or Zapier** to build automated developer-insight and content pipelines.

### ⭐ Support & feedback

Found a bug or need an extra field? Open an issue on the **Issues** tab — response is usually fast. If this Actor saves you time, a **★★★★★ review** on the Store page genuinely helps and is hugely appreciated. 🙏

### ⚖️ Legal

This Actor extracts only publicly available data via the official Stack Exchange API and is intended for legitimate research, analytics and content use. You are responsible for complying with Stack Exchange's terms of service and any applicable local laws.

***

### 📝 Changelog

#### 2026-08-01

- Completed the August 2026 full health check: verified empty/programmatic default, Console UI default, and two source-informed alternative inputs on Apify.
- Confirmed successful live execution, non-empty structured output, dataset-field/type integrity, and logical sample quality within the 5-minute quality window.

#### 2026-07-06

- ✨ README overhaul: richer output sample, ready-to-run example scenarios, developer & community suite links, shields badges and a clearer quick start.

#### 2026-07-01

- Maintenance pass: re-verified end-to-end on live data and confirmed successful runs within the 5-minute quality window on the default input.
- Sharpened Store metadata (SEO title & description) and expanded the FAQ with high-intent, long-tail questions for easier discovery in Google and Apify Store search.
- Added ready-to-run example tasks that cover common real-world use cases.

#### 2026-06-15

- Reliability pass: re-verified end-to-end on live data with real-world inputs. Routine maintenance build.

#### 2026-06-07

- Docs: added coverage for Stack Overflow API alternative, exporting Stack Exchange data to CSV/JSON, and pulling a Stack Overflow questions dataset by tag.

***

\*Maintained: last verified 2026-09-01 — checked end-to-end against live run history (reliability, output fields and types, and time/memory budgets).

# Actor input Schema

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

Which Stack Exchange site to scrape. Defaults to Stack Overflow. Leave everything empty to pull recent Stack Overflow questions.

## `tagged` (type: `string`):

Optional tag filter, e.g. 'python', 'react', 'javascript'. Use semicolons for multiple tags (AND). Leave empty to get questions across the whole site.

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

How to order the questions.

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

Maximum number of questions to save. Empty input returns recent questions up to this cap. Set to 0 to pull as many as the API allows.

## Actor input object example

```json
{
  "site": "stackoverflow",
  "tagged": "",
  "sort": "activity",
  "maxQuestions": 100
}
```

# Actor output Schema

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

All records extracted by this run. Open the Dataset tab to browse, filter, and export as CSV, JSON, or Excel.

# 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 = {
    "maxQuestions": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/stack-exchange-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 = { "maxQuestions": 100 }

# Run the Actor and wait for it to finish
run = client.actor("logiover/stack-exchange-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 '{
  "maxQuestions": 100
}' |
apify call logiover/stack-exchange-questions-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,logiover/stack-exchange-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/fFYO6XEK2Y3sKoUst/builds/kT38D5sxaGauG65qm/openapi.json
