Stack Overflow & StackExchange Search
Pricing
from $1.00 / 1,000 answer fetcheds
Stack Overflow & StackExchange Search
Search Stack Overflow and StackExchange Q&A sites via the official API. Filter questions by tags, sort by votes, activity, or relevance. Extract scores, answer counts, view counts, author reputation, and direct links. No API key needed -- 300 free requests/day.
Pricing
from $1.00 / 1,000 answer fetcheds
Rating
0.0
(0)
Developer

ryan clinton
Actor stats
0
Bookmarked
5
Total users
2
Monthly active users
2 days ago
Last modified
Categories
Share
Search Stack Overflow and the StackExchange network for questions using the official StackExchange API v2.3. Extract questions with scores, answer counts, view counts, tags, and author details from nine popular Q&A communities. Filter by tags, sort by votes or activity, and limit results to questions with accepted answers -- no API key needed, no code required. Returns up to 500 structured results per run.
Why use Stack Overflow & StackExchange Search?
Running this actor on Apify gives you a cloud-hosted, schedulable, and API-accessible way to query StackExchange programmatically. Instead of manually browsing Stack Overflow or building your own API client, you get a ready-to-use tool that handles pagination, rate limiting, 502 error retries, HTML entity decoding, and data normalization automatically. You can schedule recurring searches to track trending technologies, monitor questions about your product, gather training data for developer tooling, or benchmark community engagement across tags. The structured output integrates directly with Apify webhooks, API endpoints, and third-party tools like Google Sheets, Slack, Zapier, and Make.
Key features
- Multi-site search -- Query Stack Overflow plus 8 other StackExchange communities from a single interface: Server Fault, Super User, Ask Ubuntu, Mathematics, Cross Validated (Statistics), Data Science, Information Security, and Unix & Linux.
- Tag filtering -- Filter questions by one or more semicolon-separated tags (e.g.,
python;web-scraping) to narrow results precisely. - Flexible sorting -- Sort results by most votes, recent activity, newest creation date, or relevance.
- Answered-only mode -- Restrict results to questions with accepted answers to surface solved problems.
- Rich output data -- Each question includes 17 fields: score, answer count, view count, tag list, accepted answer detection, ISO timestamps, and author reputation.
- Automatic pagination -- Fetches up to 5 pages (500 questions) automatically with 1.1-second rate-limited delays between pages.
- No API key required -- Uses the free StackExchange API tier (300 requests/day) with zero authentication.
- Error resilience -- Handles 502 gateway errors with a 5-second wait and automatic retry.
- Clean data normalization -- HTML entities decoded in titles, Unix timestamps converted to ISO 8601, and tags provided as both comma string and JSON array.
How to use Stack Overflow & StackExchange Search
- Open the actor in Apify Console and navigate to the Input tab.
- Enter a Search Query (e.g., "web scraping python"), a Tags Filter (e.g., "python;beautifulsoup"), or both. At least one of these two fields is required.
- Select the Site you want to search. The default is Stack Overflow, but you can pick from any of the 9 supported communities using the dropdown.
- Choose how to Sort results: by votes (default), recent activity, newest, or relevance.
- Optionally enable Answered Only to limit results to questions with accepted answers.
- Set Max Results between 1 and 500 (default 30).
- Click Start. Results appear in the dataset within seconds.
- Once the run completes, go to the Dataset tab to view, filter, and export results as JSON, CSV, XML, or Excel.
You can also trigger the actor via the Apify API, schedule it for recurring runs using Apify Schedules, or connect it to webhooks and integrations for fully automated pipelines. See the API & Integration section below for code examples.
Input parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | String | No* | -- | Search query for questions (e.g., "react hooks tutorial") |
site | String | No | stackoverflow | StackExchange site to search. Options: stackoverflow, serverfault, superuser, askubuntu, math, stats, datascience, security, unix |
tagged | String | No* | -- | Semicolon-separated tags to filter by (e.g., "python;web-scraping") |
sortBy | String | No | votes | Sort order: votes, activity, creation, or relevance |
answeredOnly | Boolean | No | false | Only return questions that have accepted answers |
maxResults | Integer | No | 30 | Maximum number of questions to return (1--500) |
*At least one of query or tagged must be provided.
Input example
{"query": "web scraping python","site": "stackoverflow","tagged": "python;beautifulsoup","sortBy": "votes","answeredOnly": false,"maxResults": 50}
Tips for best results
- Combine
queryandtaggedfor the most precise results. For example, query "authentication" with tags "node.js;express" to find auth questions in the Express ecosystem. - Use semicolons to separate tags, not commas. The StackExchange API requires semicolon-delimited tag lists (e.g., "python;pandas;dataframe").
- Sort by
votesto surface the most authoritative, community-validated questions. Sort byactivityto find recently updated discussions. Sort bycreationto see the newest questions. - Enable
answeredOnlywhen you need proven solutions rather than open questions. - Start with a smaller
maxResults(30--50) to test your query before scaling up. - Search specialized sites for domain-specific topics:
statsfor statistics,securityfor cybersecurity,datasciencefor machine learning. - Monitor API quota in the run logs. The actor reports remaining quota on the first page fetch.
Output
Output example
{"questionId": 2081586,"title": "Web scraping with Python","link": "https://stackoverflow.com/questions/2081586/web-scraping-with-python","score": 287,"answerCount": 12,"viewCount": 892451,"tags": "python, web-scraping, beautifulsoup, html-parsing","tagList": ["python", "web-scraping", "beautifulsoup", "html-parsing"],"isAnswered": true,"hasAcceptedAnswer": true,"createdAt": "2010-01-18T03:24:11.000Z","lastActivityAt": "2024-09-12T14:08:33.000Z","ownerName": "JohnDev","ownerReputation": 15420,"ownerUrl": "https://stackoverflow.com/users/234567/johndev","site": "stackoverflow","extractedAt": "2026-02-17T10:30:00.000Z"}
Output fields
| Field | Type | Description |
|---|---|---|
questionId | Integer | Unique StackExchange question ID |
title | String | Question title with HTML entities decoded |
link | String | Direct URL to the question page |
score | Integer | Community vote score (upvotes minus downvotes) |
answerCount | Integer | Total number of answers posted |
viewCount | Integer | Total number of page views |
tags | String | Comma-separated tag list (e.g., "python, flask, api") |
tagList | Array | Tags as a JSON array for programmatic use |
isAnswered | Boolean | Whether the question has at least one upvoted answer |
hasAcceptedAnswer | Boolean | Whether the question author accepted an answer |
createdAt | String | ISO 8601 timestamp when the question was posted |
lastActivityAt | String | ISO 8601 timestamp of the most recent activity |
ownerName | String | Display name of the question author |
ownerReputation | Integer | Author's reputation score on the site |
ownerUrl | String | URL to the author's profile page |
site | String | StackExchange site the question was found on |
extractedAt | String | ISO 8601 timestamp when the data was extracted |
The dataset typically contains an array of these objects, one per question found. Results can be exported as JSON, CSV, XML, or Excel directly from the Apify Console or via the API. The tagList array field is particularly useful for programmatic filtering and aggregation, while the tags string field is convenient for display and CSV exports.
Use cases
- Technology trend analysis -- Track which programming languages, frameworks, or tools generate the most questions and community engagement over time.
- Product monitoring -- Search for questions mentioning your product, SDK, or API to identify common pain points and improve documentation.
- Competitive intelligence -- Compare question volumes and engagement across competing technologies (e.g., React vs. Vue vs. Angular).
- Developer hiring -- Identify active contributors in niche technology areas by analyzing author reputation and answer patterns.
- Training data collection -- Gather question-answer pairs for building developer chatbots, FAQ systems, or AI training datasets.
- Content research -- Find high-engagement, unanswered questions to target for blog posts, tutorials, or video content.
- Documentation gap analysis -- Identify recurring questions about your library or framework that indicate missing or unclear documentation.
API & Integration
You can run this actor programmatically using the Apify API or any of the official client libraries.
All examples below use the actor ID BIc8GRivosWDHHrwf. Replace YOUR_API_TOKEN with your Apify API token from Settings > Integrations in the Apify Console.
Python
from apify_client import ApifyClientclient = ApifyClient("YOUR_API_TOKEN")run_input = {"query": "kubernetes deployment strategies","site": "stackoverflow","tagged": "kubernetes;docker","sortBy": "votes","answeredOnly": True,"maxResults": 50,}run = client.actor("BIc8GRivosWDHHrwf").call(run_input=run_input)for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(f"{item['title']} (score: {item['score']}, views: {item['viewCount']})")
JavaScript
import { ApifyClient } from "apify-client";const client = new ApifyClient({ token: "YOUR_API_TOKEN" });const input = {query: "kubernetes deployment strategies",site: "stackoverflow",tagged: "kubernetes;docker",sortBy: "votes",answeredOnly: true,maxResults: 50,};const run = await client.actor("BIc8GRivosWDHHrwf").call(input);const { items } = await client.dataset(run.defaultDatasetId).listItems();items.forEach((item) => {console.log(`${item.title} (score: ${item.score}, views: ${item.viewCount})`);});
cURL
curl -X POST "https://api.apify.com/v2/acts/BIc8GRivosWDHHrwf/runs?token=YOUR_API_TOKEN" \-H "Content-Type: application/json" \-d '{"query": "kubernetes deployment strategies","site": "stackoverflow","tagged": "kubernetes;docker","sortBy": "votes","answeredOnly": true,"maxResults": 50}'
Integrations
- Google Sheets -- Export question data to a spreadsheet for collaborative analysis and reporting.
- Slack / Email -- Set up webhooks to receive alerts when new high-scoring questions appear on a monitored topic.
- Zapier / Make -- Connect the actor output to thousands of apps for automated workflows.
- Custom dashboards -- Pull dataset results via the Apify API into BI tools or custom applications.
- Scheduled runs -- Use Apify Schedules to run recurring searches (e.g., daily "new questions" checks sorted by creation date).
How it works
Stack Overflow & StackExchange Search=====================================+-----------+ +------------------+ +-------------------+| Input | ----> | Build API URL | ----> | Fetch Page 1 || (query, | | (query, site, | | (100 results/pg) || tags, | | tagged, sort, | | Report quota || site) | | answered) | +--------+----------++-----------+ +------------------+ |v+--------+----------+| More pages? || - has_more=true || - page <= 5 || - count < max |+--------+----------+| |Yes No| |+------+--+ +--+----------+| Wait | | Transform || 1.1s | | & decode || Fetch | | HTML || next pg | | entities |+------+---+ +--+---------+| |+-----------+|v+-----------+------+| Push to Apify || Dataset (JSON) || Log summary |+------------------+
The actor constructs a query against the StackExchange API v2.3 /search/advanced endpoint using the provided input parameters. It requests pages of up to 100 results each with Accept-Encoding: gzip for compressed responses. Between page requests, the actor waits 1.1 seconds to stay within rate limits. If the API returns a 502 gateway error (common during high-traffic periods), the actor waits 5 seconds and retries the same page.
Once all pages are fetched (up to 5 pages maximum), the actor transforms each question into a clean output format. Unix epoch timestamps from the API are converted to ISO 8601 strings. HTML entities in question titles (&, <, >, ', ") are decoded to plain text. The hasAcceptedAnswer field is derived by checking for the presence of accepted_answer_id in the raw API response. Tags are provided in two formats: a comma-separated string for display and a JSON array for programmatic use.
After pushing all results to the Apify dataset, the actor logs a summary including total questions output, aggregate score and view count, percentage of answered questions, and the top 8 most frequent tags across the result set.
Performance & cost
| Metric | Value |
|---|---|
| Memory | 256 MB |
| Typical run time (30 results) | 3--10 seconds |
| Typical run time (500 results) | 20--35 seconds |
| Estimated cost (30 results) | ~$0.001 |
| Estimated cost (500 results) | ~$0.005 |
| API requests per run (30 results) | 1 |
| API requests per run (500 results) | 5 |
| Daily API quota (free tier) | 300 requests |
| External API cost | Free |
A single run fetching 30 questions typically uses 1 API request and completes in under 10 seconds. Fetching the maximum of 500 questions requires 5 pages and takes 20--35 seconds due to the 1.1-second rate-limiting delay between pages. The StackExchange API itself is completely free, so the only cost is Apify platform compute. You can run this actor hundreds of times per month well within the Apify Free plan limits.
Limitations
- Daily API quota -- The free StackExchange API tier is limited to 300 requests per day (resetting at midnight UTC). Each page of results consumes one request, so a 500-result run uses 5 requests.
- Maximum 500 results per run -- The actor fetches up to 5 pages of 100 results each. For larger data needs, run multiple searches with different tag or date filters.
- 9 supported sites -- The input dropdown offers 9 StackExchange communities. Other sites in the 170+ network can be queried by passing the site slug directly via the API.
- No answer content -- The actor returns question metadata (titles, scores, tags, links) but does not extract the full text of answers. Use the question links to access answer content.
- No date range filtering -- The current version does not expose date range parameters, though the underlying API supports them.
- Rate limiting -- The 1.1-second delay between pages and 5-second retry on 502 errors are hardcoded to protect API quota.
- No user-specific search -- The actor does not support filtering questions by a specific StackExchange user ID. It focuses on topic and tag-based discovery.
- Compressed responses only -- The actor sends
Accept-Encoding: gzipheaders as required by the StackExchange API. All response decompression is handled automatically.
Responsible use
This actor accesses the public StackExchange API, which is free and available without authentication. Please follow these guidelines to ensure fair and ethical use:
- Respect the 300 requests/day free tier quota. Do not schedule runs more frequently than necessary.
- Do not use extracted data to impersonate StackExchange users or misattribute content.
- StackExchange content is licensed under CC BY-SA 4.0. If you republish question titles or content, provide proper attribution as required by the license.
- Avoid bulk automated reposting of StackExchange content on competing platforms.
- Use the actor for legitimate research, monitoring, analysis, and integration purposes.
- When building datasets for AI training, ensure compliance with StackExchange's Terms of Service and the CC BY-SA 4.0 license requirements.
FAQ
Do I need a StackExchange API key to use this actor? No. The actor uses the anonymous (unauthenticated) tier of the StackExchange API, which provides 300 requests per day. No API key, account, or registration is required.
Can I search any StackExchange site, not just the 9 listed?
The input dropdown offers 9 popular sites, but the site parameter accepts any valid StackExchange site slug (e.g., "gaming", "dba", "electronics"). You can pass any slug via the API input to search the full network.
What happens if I exceed the daily API quota? The StackExchange API returns an error response when the quota is exhausted. The actor will log this error and stop. The quota resets at midnight UTC each day. For most use cases, 300 requests/day is more than sufficient.
How is "relevance" sorting determined? The relevance sort uses the StackExchange API's internal ranking algorithm, which considers keyword match quality, question score, answer quality, and recency. It works best when combined with a keyword query rather than tag-only searches.
Can I get the full text of answers, not just question metadata?
The current version returns question metadata only (title, score, tags, links, author info). It does not extract answer bodies. Each result includes a direct link to the question page where you can read the full answers.
How do I filter by multiple tags?
Separate tags with semicolons in the tagged field. For example, "python;pandas;dataframe" will return questions tagged with all three tags. This is an AND filter -- questions must have every specified tag.
What does the quota remaining number in the logs mean? The StackExchange API returns your remaining daily quota with each response. The actor logs this on the first page fetch so you can monitor usage. If you see a low number, consider spacing out your runs to avoid hitting the 300 request/day limit.
What is the difference between "isAnswered" and "hasAcceptedAnswer"?
The isAnswered field is true when a question has at least one answer with a positive score (upvoted by the community). The hasAcceptedAnswer field is true only when the question author has explicitly marked one answer as the accepted solution. A question can be isAnswered: true but hasAcceptedAnswer: false if the community upvoted answers but the author never accepted one.
Related actors
| Actor | Description | Link |
|---|---|---|
| GitHub Repository Search | Search GitHub repos by topic, language, stars, or keyword | View on Apify |
| Hacker News Search | Search and monitor Hacker News stories and discussions | View on Apify |
| DBLP Publication Search | Search computer science publications and conference papers | View on Apify |
| OpenAlex Research Search | Search 250M+ academic works across all disciplines | View on Apify |
| Wikipedia Article Search | Search and extract Wikipedia articles and summaries | View on Apify |
| Semantic Scholar Search | Search academic papers with citation data and abstracts | View on Apify |
| ArXiv Paper Search | Search preprint papers from arXiv across all scientific fields | View on Apify |