# Stack Exchange Scraper API - Stack Overflow Questions (`pink_comic/stack-exchange-questions-developer-trends`) Actor

Search the official Stack Exchange API for Stack Overflow and network questions by site, tags, title, answer state, score, views, dates, and activity. Optionally attach bounded accepted and top-answer evidence with source links, quota, backoff, and coverage metadata.

- **URL**: https://apify.com/pink\_comic/stack-exchange-questions-developer-trends.md
- **Developed by:** [Ava Torres](https://apify.com/pink_comic) (community)
- **Categories:** Developer tools, AI, Education
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 stack exchange q\&a scraper api - developer trends evidence items

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/platform/actors/running/actors-in-store#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 Exchange Q\&A Scraper API — Developer Questions & Trends

Search the official Stack Exchange API for source-linked Stack Overflow and network Q\&A by tags, title, answer state, score, views, answer count, dates, and activity. Optionally attach bounded accepted and top-answer evidence.

### Default input

```json
{"site":"stackoverflow","tags":["go"],"sort":"activity","order":"desc","maxResults":5}
```

This returns up to five recently active Go questions. Maximum first-run charge: **$0.0101** ($0.0001 start + 5 × $0.002 items).

### Enriched example

```json
{
  "site":"stackoverflow",
  "tags":["go","http"],
  "title":"timeout",
  "answered":"yes",
  "minScore":2,
  "includeAnswers":true,
  "answersPerQuestion":3,
  "includeBodies":false,
  "maxPages":3,
  "maxResults":20
}
```

Question rows preserve IDs, tags, owner/profile links, question links, accepted/answered state, scores, views, answer counts, timestamps, quota/backoff fields, exact source query, retrieval time, and bounded-query disclosure. Optional answers remain nested and include accepted status, score, timestamps, owner, and answer link. HTML bodies are omitted unless explicitly enabled and are then preserved as unrendered, character-capped source text.

`maxPages` (1–10), `maxResults` (1–100), and `answersPerQuestion` (1–10) bound requests and output. The client retries transport/status/body/malformed-response transients, honors bounded source backoff, and stops explicitly on quota exhaustion. No API key is required.

No-match and source-outage runs return explicit evidence records. Bounded searches are not complete-corpus searches.

### Important limits

Stack Exchange content is community-authored and can be edited, deleted, outdated, unsafe, or incorrect. Votes, views, accepted answers, reputation, and activity are community signals—not technical correctness, security, completeness, official endorsement, or current best practice. Confirm consequential guidance against current documentation and your own tests.

See the full README for all filters, pricing, and source links.

# Actor input Schema

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

API site parameter, such as stackoverflow, serverfault, or superuser.

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

One to five tags; questions must contain all supplied tags.

## `title` (type: `string`):

Keyword matched by the official advanced-search title field.

## `accepted` (type: `string`):

Optional accepted answer state filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `answered` (type: `string`):

Optional answered state filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `minScore` (type: `integer`):

Optional minimum score filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `minViews` (type: `integer`):

Optional minimum views filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `minAnswers` (type: `integer`):

Optional minimum answer count filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `createdFrom` (type: `string`):

YYYY-MM-DD, inclusive.

## `createdTo` (type: `string`):

YYYY-MM-DD, inclusive.

## `activityFrom` (type: `string`):

YYYY-MM-DD; locally applied to retrieved candidates.

## `activityTo` (type: `string`):

YYYY-MM-DD; locally applied to retrieved candidates.

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

Optional source sort filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `order` (type: `string`):

Optional sort order filter or result-control setting. See the README for exact source semantics, bounds, and examples.

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

Adds one bounded answer API request for returned questions.

## `answersPerQuestion` (type: `integer`):

Optional answers per question filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `includeBodies` (type: `boolean`):

Preserves source HTML as text, truncated to maxBodyCharacters. It is not rendered or treated as trusted guidance.

## `maxBodyCharacters` (type: `integer`):

Optional body character limit filter or result-control setting. See the README for exact source semantics, bounds, and examples.

## `maxPages` (type: `integer`):

Hard request bound for question pagination.

## `maxResults` (type: `integer`):

Total paid dataset item cap.

## Actor input object example

```json
{
  "site": "stackoverflow",
  "tags": [
    "go"
  ],
  "accepted": "",
  "answered": "",
  "minScore": 0,
  "minViews": 0,
  "minAnswers": 0,
  "sort": "activity",
  "order": "desc",
  "includeAnswers": false,
  "answersPerQuestion": 3,
  "includeBodies": false,
  "maxBodyCharacters": 4000,
  "maxPages": 3,
  "maxResults": 5
}
```

# 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 = {
    "site": "stackoverflow",
    "tags": [
        "go"
    ],
    "sort": "activity",
    "order": "desc",
    "maxResults": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("pink_comic/stack-exchange-questions-developer-trends").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 = {
    "site": "stackoverflow",
    "tags": ["go"],
    "sort": "activity",
    "order": "desc",
    "maxResults": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("pink_comic/stack-exchange-questions-developer-trends").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 '{
  "site": "stackoverflow",
  "tags": [
    "go"
  ],
  "sort": "activity",
  "order": "desc",
  "maxResults": 5
}' |
apify call pink_comic/stack-exchange-questions-developer-trends --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=pink_comic/stack-exchange-questions-developer-trends",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

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