Stack Overflow Scraper — Questions, Answers & Tags for RAG avatar

Stack Overflow Scraper — Questions, Answers & Tags for RAG

Pricing

Pay per usage

Go to Apify Store
Stack Overflow Scraper — Questions, Answers & Tags for RAG

Stack Overflow Scraper — Questions, Answers & Tags for RAG

Fetch Stack Overflow questions, answers, and comments as clean structured data with markdown formatting. Search by keyword, explore tags, or get full question threads. MCP-enabled for Claude, Cursor, and AI agents.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Aaron Hampton

Aaron Hampton

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

2 days ago

Last modified

Share

Fetch Stack Overflow questions, answers, and comments as clean structured data with markdown-formatted bodies. Search by keyword, explore top questions for a tag, or get full question threads with accepted answers.

Perfect for RAG pipelines, developer research, AI agents, and technical Q&A datasets.

Features

  • Keyword search — search all Stack Overflow questions by keyword and tags
  • Full question threads — get questions with bodies, answers, and comments in clean markdown
  • Tag exploration — fetch top-voted questions for any tag (python, javascript, react, etc.)
  • User profiles — fetch user reputation, badges, and top questions
  • Clean markdown — all HTML bodies converted to readable markdown (code blocks, lists, links, images, tables, blockquotes)
  • Answer ordering — sorted by score with accepted answers first
  • Dual-mode — run as a normal Apify Actor OR connect as an MCP server for Claude, Cursor, and other AI agents
  • No browser required — uses the free Stack Exchange API, no proxies or auth needed

Use Cases

  • RAG pipelines — feed Stack Overflow Q&A into vector databases for code-aware AI assistants
  • Developer research — find canonical answers to programming questions across technologies
  • AI agents — let Claude/Cursor search Stack Overflow via MCP tools
  • Documentation — collect top answers for a tag to build curated knowledge bases
  • Trend analysis — track popular topics and technologies by tag and score

Input (Normal Actor Mode)

FieldTypeDescription
modeenumsearch, question, tag, or user
querystringSearch keyword (mode=search)
questionIdintegerStack Overflow question ID (mode=question)
tagstringTag name like "python" (mode=tag)
userIdintegerStack Overflow user ID (mode=user)
tagsarrayFilter search by tags (mode=search)
acceptedOnlybooleanOnly questions with accepted answers (mode=search)
maxQuestionsintegerMax questions to return (default 10)
includeAnswersbooleanFetch answers for each question (default true)
includeCommentsbooleanFetch comments on questions (default false)
maxAnswersPerQuestionintegerMax answers per question (default 5)
sortByenumrelevance, votes, or newest (default relevance)

Output

{
"id": 393272,
"title": "How to reverse a list in Python",
"url": "https://stackoverflow.com/questions/393272/...",
"score": 2534,
"viewCount": 1200000,
"answerCount": 15,
"tags": ["python", "list", "reverse"],
"isAnswered": true,
"acceptedAnswerId": 393280,
"createdAt": "2010-10-13T10:00:00.000Z",
"bodyMarkdown": "I want to reverse a list:\n```python\nmy_list = [1, 2, 3]\n```",
"answers": [
{
"id": 393280,
"score": 1800,
"isAccepted": true,
"createdAt": "2010-10-13T10:05:00.000Z",
"bodyMarkdown": "Use slicing:\n```python\nreversed_list = my_list[::-1]\n```"
}
]
}

MCP Tools

When connected as an MCP server, the following tools are available:

ToolDescription
search_questionsSearch Stack Overflow by keyword. Returns titles, scores, tags, and optionally answers.
get_questionFetch a full question with markdown body, answers (sorted accepted-first), and optional comments.
get_top_answersGet top-voted questions for a tag with their best answers. Great for discovering canonical Q&A.

Pricing

Pay-per-event. First results are free; subsequent events billed at:

EventPrice
Question fetched$0.002
Answer fetched$0.001
MCP tool call$0.005
Actor start$0.00005

Volume discounts available at higher tiers.

Data Source

This Actor uses the Stack Exchange API — a free, public API with generous rate limits (300 requests/2min without a key, 10,000/2min with a key). No authentication or proxies required.