# StackOverflow Questions Scraper (`scrapers-hub/stackoverflow-questions-scraper`) Actor

StackOverflow Questions Scraper collects questions by tag and sort order - title, link, tags, author, reputation, score, view count, answer count and accepted-answer status. 👩‍💻 For developer trend analysis and support datasets.

- **URL**: https://apify.com/scrapers-hub/stackoverflow-questions-scraper.md
- **Developed by:** [Scrapers Hub](https://apify.com/scrapers-hub) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

### 💬 StackOverflow Questions Scraper – Tag, Score, Views & Answer Data by Site

The **StackOverflow Questions Scraper** pulls structured question data from Stack Overflow and 78 other Stack Exchange communities, returning title, tags, author, reputation, score, view count, answer count, accepted-answer status and timestamps as clean JSON. Filter by tag, sort by activity, votes, creation date or heat, and cap the result set — then export the lot to CSV or push it straight into a dashboard.

This Stack Overflow scraper is built for developer-relations teams tracking pain points around their SDK, product managers watching which technologies are gaining question volume, researchers studying developer behaviour, and content teams looking for unanswered questions worth writing about. Because it reads the official Stack Exchange API, the data is consistent, well-typed and complete — no HTML parsing, no proxy management, no brittle selectors.

The same input works across the entire Stack Exchange network. Point it at `stackoverflow` for programming questions, `devops` for infrastructure, `datascience` for ML topics, or any of dozens of other sites listed below.

***

### 📊 What Data Can You Extract with This StackOverflow Questions Scraper?

Every dataset row is one question, with the identity, engagement and resolution signals that make Stack Exchange data analytically useful.

| Category | Fields | What it gives you |
|---|---|---|
| 🆔 Question identity | `questionId`, `title`, `link` | The site's numeric question ID, the full question title, and the canonical URL to the question page |
| 🏷️ Topic classification | `tags` | The complete tag array assigned to the question — the primary axis for any technology-level analysis |
| 👤 Author | `author`, `authorReputation` | The asker's display name and their reputation score at the time of scraping |
| 📈 Engagement metrics | `score`, `viewCount`, `answerCount` | Net vote score, cumulative page views, and how many answers the question has attracted |
| ✅ Resolution status | `isAnswered`, `hasAcceptedAnswer` | Whether the question meets the site's answered threshold, and whether the asker has accepted a specific answer |
| 🕒 Timestamps | `createdAt`, `lastActivityAt`, `scrapedAt` | ISO timestamps for when the question was asked, when it last saw activity, and when this record was captured |

The pair worth building your analysis around is `viewCount` and `hasAcceptedAnswer`. A question with tens of thousands of views and no accepted answer is a documented gap — a problem many developers hit and nobody has resolved publicly. Sorting a tag's questions by that combination produces, in one query, a prioritised list of the documentation and tooling gaps in an ecosystem. It is one of the highest-signal, lowest-effort pieces of developer research available.

***

### 🌟 Key Features of the StackOverflow Questions Scraper

| Feature | Description |
|---|---|
| 🌐 79 Stack Exchange sites | Scrape Stack Overflow, Server Fault, Super User, Ask Ubuntu, DevOps, Data Science, Cross Validated, Mathematics, Physics, Unix & Linux, Salesforce, WordPress and 60-plus more from the same input |
| 🏷️ Tag filtering with AND logic | Filter to a single tag such as `python`, or combine several with semicolons to return only questions carrying every listed tag |
| 🔀 Four sort modes | Order by most recent activity, newest creation date, highest score, or what is hot right now — each surfacing a different slice of the community |
| 🎚️ Result cap control | `maxQuestions` bounds the dataset size, or set it to `0` to pull as many questions as the API will return |
| 📡 Official API source | Data comes from the Stack Exchange API rather than scraped HTML, so fields are correctly typed and structurally stable across runs |
| 🚫 No proxy needed | Because it uses the public API, there is no proxy configuration, no blocking to work around and no fingerprint management |
| ⚙️ Sensible empty-input defaults | Leave the tag blank and the scraper returns recent questions from the chosen site, so an exploratory run needs almost no configuration |
| 🕒 Dual timestamps plus scrape time | `createdAt` and `lastActivityAt` come from the platform; `scrapedAt` records your capture moment, which makes longitudinal snapshots directly comparable |
| ⚡ Lightweight execution | No browser and no HTML parsing means runs are fast and consume minimal resources even at large result counts |

***

### 🚀 Why Choose This StackOverflow Questions Scraper?

**It reads the official API, not the page.** Field types are consistent, `tags` arrives as a real array rather than a scraped string, and there are no selectors to break when the site redesigns. That reliability matters most when you are running the same job on a schedule and comparing results across months.

**One Actor covers the whole Stack Exchange network.** The `site` selector spans 79 communities, from Stack Overflow and Server Fault to Cross Validated, Salesforce and Mathematics. Analysing developer questions and infrastructure questions and data science questions requires one configuration change, not three separate tools.

**Sorting and tag filtering happen at the source.** Because `sort` and `tag` are applied by the API, you receive exactly the slice you asked for rather than downloading everything and filtering afterwards. Combined with `maxQuestions`, that keeps runs small, fast and predictable.

**The output supports genuine analysis, not just listing.** Score, view count, answer count, accepted-answer status, author reputation and two platform timestamps in every row means the dataset supports engagement modelling, gap analysis and trend tracking straight out of the box.

***

### 📥 Input

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

#### 🔧 StackOverflow Scraper Input Fields

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `site` | string (enum) | ✅ Yes | `"stackoverflow"` | Which Stack Exchange site to scrape. Defaults to Stack Overflow. Leave everything empty to pull recent Stack Overflow questions |
| `tag` | string | No | `""` | Optional tag filter, e.g. `python`, `react`, `javascript`. Use semicolons for multiple tags (AND). Leave empty to get questions across the whole site |
| `sort` | string (enum) | ✅ Yes | `"activity"` | How to order the questions. One of `activity` (most recent activity), `creation` (newest by creation date), `votes` (highest score), `hot` (hot right now) |
| `maxQuestions` | integer | ✅ Yes | `100` | 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 |

**Supported sites for the `site` field:** `stackoverflow`, `serverfault`, `superuser`, `askubuntu`, `softwareengineering`, `security`, `unix`, `dba`, `codereview`, `sqa`, `devops`, `webmasters`, `webapps`, `wordpress`, `drupal`, `magento`, `sharepoint`, `salesforce`, `gis`, `datascience`, `ai`, `stats`, `math`, `mathoverflow`, `cstheory`, `cs`, `physics`, `electronics`, `dsp`, `raspberrypi`, `arduino`, `android`, `apple`, `gamedev`, `gaming`, `ux`, `graphicdesign`, `tex`, `crypto`, `quant`, `money`, `pm`, `workplace`, `english`, `ell`, `japanese`, `german`, `french`, `spanish`, `russian`, `cooking`, `diy`, `travel`, `photo`, `scifi`, `rpg`, `boardgames`, `music`, `movies`, `worldbuilding`, `writing`, `law`, `politics`, `economics`, `history`, `philosophy`, `skeptics`, `biology`, `chemistry`, `health`, `fitness`, `bicycles`, `mechanics`, `aviation`, `space`, `earthscience`, `gardening`, `outdoors`, `parenting`, `meta`.

#### 💡 Input Examples

**Top-voted React questions of all time:**

```json
{
  "site": "stackoverflow",
  "tag": "reactjs",
  "sort": "votes",
  "maxQuestions": 250
}
```

**Newest Kubernetes questions on DevOps:**

```json
{
  "site": "devops",
  "tag": "kubernetes",
  "sort": "creation",
  "maxQuestions": 100
}
```

**Multi-tag AND filter for a narrow intersection:**

```json
{
  "site": "stackoverflow",
  "tag": "python;pandas;performance",
  "sort": "activity",
  "maxQuestions": 200
}
```

***

### 📤 Output

```json
{
  "questionId": 21593,
  "title": "How do I deploy a bundle of custom python processors in an air gapped NiFi 2.6 deployment?",
  "link": "https://devops.stackexchange.com/questions/21593/how-do-i-deploy-a-bundle-of-custom-python-processors",
  "tags": ["python", "pipeline", "kubernetes-volume", "data"],
  "author": "labubu",
  "authorReputation": 1,
  "score": 0,
  "viewCount": 73,
  "answerCount": 0,
  "isAnswered": false,
  "hasAcceptedAnswer": false,
  "createdAt": "2025-11-25T14:38:28.000Z",
  "lastActivityAt": "2025-11-25T14:38:28.000Z",
  "scrapedAt": "2026-08-08T13:47:55.820Z"
}
```

#### 🧾 StackOverflow Questions Output Fields

| Field | Type | Description |
|---|---|---|
| `questionId` | integer | null | Identifier of the question |
| `title` | string | null | Title of the item |
| `link` | string | null | Link to the item |
| `tags` | array | null | Tags attached to the item |
| `author` | string | null | Author of the item |
| `authorReputation` | integer | null | Author reputation of the item |
| `score` | integer | null | Score assigned to the item |
| `viewCount` | integer | null | Number of views |
| `answerCount` | integer | null | Number of answers |
| `isAnswered` | boolean | null | Whether the question is answered |
| `hasAcceptedAnswer` | boolean | null | Whether the question has an accepted answer |
| `createdAt` | string | null | When the item was created |
| `lastActivityAt` | string | null | When the last activity happened |
| `scrapedAt` | string | null | When this record was scraped |

Note that `isAnswered` and `hasAcceptedAnswer` are distinct signals. A question can carry several answers and satisfy `isAnswered` while the asker has never accepted one, which is precisely the state that identifies contested or partially resolved problems.

***

### 💻 How to Use the StackOverflow Questions Scraper (Step by Step)

#### Step 1: Pick the Right Stack Exchange Site

The `site` field determines which community you are querying, and choosing well matters more than most people expect. A question about container networking may live on Stack Overflow, Server Fault or DevOps depending on how it was framed, and each site has a different population and different norms. If you are researching a topic that spans several communities, run the same tag against each relevant site and compare — the differences in volume and resolution rate are themselves informative.

#### Step 2: Build Your Tag Filter

`tag` accepts a single tag such as `python`, or several joined by semicolons. Multiple tags apply AND logic, so `python;pandas;performance` returns only questions carrying all three. That intersection narrows results quickly, which is exactly what you want for a focused investigation but can return very little for uncommon combinations. Start with one or two tags and add a third only if the result set is too broad. Leaving the field empty returns questions across the whole site.

#### Step 3: Choose the Sort Mode That Matches Your Question

The four sort options answer genuinely different questions. `votes` surfaces the canonical, historically important questions in a tag — best for understanding a technology's core difficulties. `creation` gives you the newest questions, which is what you want for monitoring emerging issues after a release. `activity` shows what is being revisited and updated right now. `hot` reflects the site's own heat calculation, blending recency with engagement. Pick deliberately, because the same tag returns almost entirely different rows under each.

#### Step 4: Set `maxQuestions` for Your Purpose

The default cap of 100 suits an exploratory look. For a proper analysis of a tag's landscape, several hundred to a few thousand gives you enough rows for the distributions to mean something. Setting `maxQuestions` to `0` pulls as many questions as the API will return, which is the right choice for a full corpus build but produces a much longer run. Size the cap to the analysis you actually intend to do.

#### Step 5: Run the Actor and Check the Log

Start the run from the Apify console or trigger it through the API. Because the Actor reads the official Stack Exchange API rather than scraping HTML, runs are fast and there is no blocking behaviour to watch for. The log reports collection progress, so a run that returns far fewer questions than your cap usually means the tag combination or site simply does not contain that many matching questions.

#### Step 6: Analyse the Dataset

Open the dataset and start with the two highest-value cuts. First, sort by `viewCount` descending and filter `hasAcceptedAnswer` to false — this is your list of high-demand unresolved problems. Second, explode the `tags` array and count co-occurrences with your primary tag; that shows you which technologies people are actually combining with yours in practice, which frequently contradicts the assumptions in a product roadmap.

#### Step 7: Schedule Recurring Runs for Trend Tracking

A single snapshot tells you the current state; a series tells you the direction. Schedule the same input weekly or monthly and append each dataset to a table keyed on `questionId` and `scrapedAt`. Because `viewCount`, `score` and `answerCount` are re-captured each time, the resulting history shows how individual questions accumulate attention and how quickly a tag's overall volume is growing or declining.

***

### 🔌 API Access & Integrations

Run the StackOverflow Questions Scraper and get results in a single synchronous call:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers-hub~stackoverflow-questions-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "site": "stackoverflow",
    "tag": "python",
    "sort": "votes",
    "maxQuestions": 100
  }'
```

Or from Python with the official client:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")

run_input = {
    "site": "devops",
    "tag": "kubernetes",
    "sort": "creation",
    "maxQuestions": 200,
}

run = client.actor("scrapers-hub/stackoverflow-questions-scraper").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    if not item["hasAcceptedAnswer"] and item["viewCount"] > 500:
        print(item["viewCount"], "|", item["title"], "|", item["link"])
```

Runs also integrate with Zapier, Make, Google Sheets, Slack and custom webhooks, so new questions matching your tags can be posted to a team channel or appended to a tracking sheet automatically.

***

### 💡 Best Use Cases for StackOverflow Questions Data

#### 🧭 Developer Experience and Pain Point Research

Filter to the tags covering your SDK or framework, sort by `votes`, and read the top questions. Recurring themes across high-`score`, high-`viewCount` questions are the friction points your documentation has not resolved. Questions where `hasAcceptedAnswer` is false despite substantial views point at gaps nobody in the community has managed to close — often the highest-value docs you could write.

#### 📈 Technology Adoption and Trend Analysis

Question volume is a genuine leading indicator of technology adoption. Running the same tag with `sort` set to `creation` on a monthly schedule and counting rows by `createdAt` month produces an adoption curve. Comparing two competing tools' curves side by side gives you a defensible read on relative momentum that download counts and social buzz do not.

#### ✍️ Content Strategy and SEO Topic Discovery

Every high-`viewCount` question without an accepted answer is a topic with proven search demand and unsatisfied intent. Extracting those titles for a tag gives content teams a prioritised brief list grounded in real developer queries rather than keyword-tool estimates. The `tags` array supplies the surrounding topic cluster for internal linking.

#### 🛠️ Product Roadmap and Feature Prioritisation

Co-occurrence analysis over the `tags` array reveals which technologies developers actually pair with yours. If your tag repeatedly co-occurs with a framework you do not officially support, that is direct evidence for an integration request. Weighting each co-occurrence by `viewCount` turns the observation into a prioritisation input.

#### 🎓 Academic and Community Research

Software engineering researchers studying knowledge sharing, question quality or community dynamics get a well-structured corpus here: `authorReputation` alongside `score`, `answerCount` and the two platform timestamps supports reputation-effect and response-time studies without any additional data collection. `scrapedAt` makes each snapshot reproducible and citable.

#### 🧑‍💻 Talent and Expertise Mapping

The `author` and `authorReputation` fields, aggregated across a tag, identify who is consistently active in a technical area. For recruiters and community managers building relationships with domain experts, that is a far more grounded signal than a self-declared skill list on a professional network.

#### 🚨 Release Monitoring and Regression Detection

After shipping a release, run your tag with `sort` set to `creation` on a short cadence and watch question volume. A sharp rise in newly created questions in the days after a release, especially clustered around particular `tags`, is an early warning that something in the release is confusing or broken — often before it reaches your support queue.

***

### ⚙️ Tips for Better StackOverflow Scraping Results

- **Match the sort mode to the question you are asking.** `votes` finds canonical problems, `creation` finds emerging ones, `activity` finds what is being revisited, `hot` finds what the community is engaged with today. Using the wrong one produces a technically valid but analytically useless dataset.
- **Add tags one at a time.** Semicolon-joined tags apply AND logic and narrow results very quickly. If a three-tag filter returns almost nothing, drop back to two and confirm the intersection actually exists before assuming something is broken.
- **Check the site before blaming the tag.** Many technical tags exist on several Stack Exchange sites with very different volumes. A tag that seems empty on `stackoverflow` may be thriving on `serverfault`, `devops` or `datascience`.
- **Snapshot on a schedule and keep every run.** `viewCount`, `score` and `answerCount` change continuously. A single pull is a moment in time; a series keyed on `questionId` and `scrapedAt` is a trend dataset you can actually reason about.
- **Export JSON when you need the `tags` array.** CSV flattens the array into one cell, which makes tag co-occurrence analysis awkward. JSON keeps it as a list your analysis code can explode directly.
- **Treat `isAnswered` and `hasAcceptedAnswer` as separate signals.** Answered-but-not-accepted is a distinct and interesting state: it usually means the existing answers were inadequate, which is exactly where opportunity lies.

***

### 🛠️ Troubleshooting

**My run returned far fewer questions than `maxQuestions`.**
The cap is an upper bound, not a target. A narrow tag, a semicolon-joined multi-tag filter, or a smaller Stack Exchange site may simply not contain that many matching questions. Remove one tag from the filter, or try the same tag on a different `site`, to confirm whether the intersection is genuinely sparse.

**A tag I know exists returns nothing.**
Tag strings must match the site's canonical tag exactly — `reactjs` rather than `react`, `node.js` rather than `nodejs`. Check the exact spelling on the site's tag page. Also confirm the tag exists on the `site` you selected, since tag vocabularies differ between Stack Exchange communities.

**`viewCount` and `score` differ from what I see on the site now.**
Both fields are captured at the moment of the run and continue to change afterwards. `scrapedAt` records exactly when your snapshot was taken. For any analysis that depends on current figures, re-run rather than reusing an older dataset.

**The `tags` column looks like one messy string in my CSV.**
`tags` is an array, and CSV export serialises arrays into a single cell. Export as JSON if you want the list preserved as a structure, or split the cell on its delimiter after import if a spreadsheet is where the analysis has to happen.

**Setting `maxQuestions` to 0 produced a very long run.**
That setting pulls as many questions as the API will return, which for a popular tag on a large site is a substantial volume. Use it deliberately when building a full corpus, and set an explicit numeric cap for routine monitoring runs.

***

### ❓ Frequently Asked Questions About StackOverflow Scraping

**What does this StackOverflow Questions Scraper extract?**
For each question it returns the question ID, title, link, tag array, author name and reputation, vote score, view count, answer count, whether the question is answered, whether an answer has been accepted, the creation and last-activity timestamps, and the time the record was scraped.

**Does it return the answer text as well as the questions?**
No. The output covers question-level data including how many answers exist and whether one has been accepted, but not the body text of answers themselves. Use the `link` field to open any question whose answers you need to read.

**Which Stack Exchange sites can I scrape?**
Seventy-nine, including Stack Overflow, Server Fault, Super User, Ask Ubuntu, Software Engineering, Information Security, Unix & Linux, DevOps, Data Science, Artificial Intelligence, Cross Validated, Mathematics, Physics, Salesforce, WordPress, Magento, SharePoint, User Experience and many more. The full list is in the input field table above.

**How do I filter StackOverflow questions by multiple tags?**
Put the tags in the `tag` field separated by semicolons, for example `python;pandas;performance`. Tags combine with AND logic, so only questions carrying every listed tag are returned. Be aware that each additional tag narrows the result set sharply.

**What is the difference between the four sort options?**
`activity` orders by most recent activity, `creation` by newest question first, `votes` by highest score, and `hot` by the site's own heat metric. Each surfaces a genuinely different set of questions from the same tag, so choose the one that matches your research goal.

**How many StackOverflow questions can I scrape in one run?**
`maxQuestions` sets the ceiling and defaults to 100. Setting it to `0` pulls as many questions as the API will return. Practical volume depends on how many questions actually match your site, tag and sort combination.

**Do I need proxies or an API key to run this scraper?**
No. The Actor reads the public Stack Exchange API, so there is no proxy configuration, no blocking to work around, and no credentials for you to supply.

**Can I scrape questions without specifying a tag?**
Yes. Leave `tag` empty and the scraper returns questions across the whole selected site, ordered by your chosen `sort` and capped by `maxQuestions`. This is the fastest way to get a feel for a community you have not analysed before.

**What is the difference between `isAnswered` and `hasAcceptedAnswer`?**
`isAnswered` reflects whether the question meets the site's threshold for having been answered, while `hasAcceptedAnswer` records whether the asker has explicitly accepted one specific answer. Questions that are answered but have no accepted answer often indicate that the existing responses were not fully satisfactory.

**How do I find unanswered StackOverflow questions in my tag?**
Run your tag with `sort` set to `votes` or `activity`, then filter the dataset where `hasAcceptedAnswer` is false and `viewCount` is high. That combination isolates problems with proven demand and no published resolution — the best possible list for documentation and content planning.

**Can I track how question volume changes over time?**
Yes. Schedule the same input to run on a recurring basis and append each dataset to a table keyed on `questionId` and `scrapedAt`. Counting rows by `createdAt` period gives you volume trends, and re-captured `viewCount` values show how attention accumulates on individual questions.

**Is the author's reputation current or historical?**
`authorReputation` is the value at the time the record was scraped. Reputation changes continuously as users earn votes, so the figure represents a snapshot rather than a permanent attribute. Re-run to refresh it.

**What export formats does the StackOverflow data support?**
JSON, CSV, Excel, XML and RSS from the Apify console, plus direct retrieval through the API. Prefer JSON when you need the `tags` array intact for co-occurrence analysis; CSV is fine for the flat numeric and text fields.

**Is scraping Stack Overflow allowed?**
This Actor reads the official public Stack Exchange API, which is the sanctioned route to the data. Stack Exchange content is published under a Creative Commons licence that requires attribution — if you republish question titles or content, attribute the source and link back as the licence requires.

**Can I run this StackOverflow scraper on a schedule?**
Yes. Apify's scheduler runs any saved input on a recurring basis, which is how most people use this Actor — weekly or monthly snapshots of the same tags build the longitudinal dataset that makes trend analysis possible.

***

### 🆘 Support & Feedback

If the StackOverflow Questions Scraper behaves unexpectedly — a tag that returns nothing when it should not, a site that fails, or malformed records — please open a report in the **Issues** tab of this Actor with the exact input JSON you used so it can be reproduced.

Need a custom build? Answer body extraction, comment data, user-level aggregation, or a direct pipeline into your data warehouse — email **scraperhubapi@gmail.com** describing what you need.

If this Stack Overflow scraper is useful in your research or developer-relations work, a review on the Actor page is genuinely appreciated, and specific feedback about the fields and sites you rely on shapes what gets built next.

***

### ⚖️ Disclaimer

This StackOverflow Questions Scraper collects only publicly available information through the official public Stack Exchange API. It does not access private messages, moderator tooling, deleted content, or anything requiring authentication.

Stack Exchange content — including question titles and bodies — is contributed by users and published under a Creative Commons licence that requires attribution to the author and the site. If you republish or redistribute any of this content, comply with the licence terms in force at the time of use.

The `author` and `authorReputation` fields relate to identifiable individuals and therefore constitute personal data. If you process them for people in the EU, UK or other regulated jurisdictions, you must establish a lawful basis under the GDPR or the equivalent local framework, honour data subject rights, and retain the data no longer than your stated purpose requires.

Use of this Actor is also subject to the Stack Exchange terms of service and API usage terms. Review those before conducting large-scale or commercial collection, and take your own legal advice where appropriate. Nothing here constitutes legal advice.

If you believe personal data relating to you has been collected through this Actor and you would like it removed, contact **scraperhubapi@gmail.com** with the relevant details and the request will be handled promptly.

# 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.

## `tag` (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",
  "tag": "",
  "sort": "activity",
  "maxQuestions": 100
}
```

# Actor output Schema

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

Records scraped by StackOverflow Questions Scraper, stored in the run's default dataset.

# 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("scrapers-hub/stackoverflow-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("scrapers-hub/stackoverflow-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 scrapers-hub/stackoverflow-questions-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapers-hub/stackoverflow-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/pIwgH96ttH2DBI6H8/builds/oVnehfkq8bzOry4fZ/openapi.json
