Stack Exchange AI Dataset — Code, Math & Reasoning RLHF avatar

Stack Exchange AI Dataset — Code, Math & Reasoning RLHF

Pricing

from $2.00 / 1,000 results

Go to Apify Store
Stack Exchange AI Dataset — Code, Math & Reasoning RLHF

Stack Exchange AI Dataset — Code, Math & Reasoning RLHF

Extract high-quality Q&A pairs with accepted answers, scores, and markdown bodies across Stack Overflow, Math, and 170+ communities for RLHF and LLM training.

Pricing

from $2.00 / 1,000 results

Rating

0.0

(0)

Developer

Axery

Axery

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 days ago

Last modified

Categories

Share

Stack Exchange AI Dataset Scraper

Extract high-quality reasoning, programming, and mathematical Question & Answer pairs across Stack Exchange communities — tailored specifically for LLM fine-tuning, SFT (Supervised Fine-Tuning), DPO, and RLHF reward modeling.

Pure HTTP via Stack Exchange REST API. No browser overhead. Fast, clean, and reliable.


⚡ What makes this different for AI builders

Generic ScrapingWhat this Actor gives you
RLHF SignalUnranked text blobsDirect pairing of question + acceptedAnswer + topAlternativeAnswers with exact scores for preference optimization
Clean FormattingTangled HTML with scriptsClean code blocks (`code` and ``` blocks) and clean plain text
Quality FilterScrapes low-effort/spam questionsConfigurable minScore and acceptedOnly to extract only golden, human-vetted knowledge
Multi-DomainJust Stack OverflowSupports 170+ communities: Math, Cross Validated (Statistics), Server Fault (DevOps), Physics, Ask Ubuntu

📥 Input Parameters

{
"site": "stackoverflow",
"tagged": "python;pandas",
"minScore": 5,
"acceptedOnly": true,
"maxItems": 50
}
FieldTypeDefaultDescription
sitestringstackoverflowstackoverflow, math, stats, superuser, serverfault, askubuntu, ai, physics, etc.
taggedstringpythonFilter by tags (e.g. machine-learning, calculus, docker).
intitlestringnullOptional keyword search in title.
minScoreinteger3Minimum net upvotes. Filters out noise.
acceptedOnlybooleantrueOnly return questions with a verified accepted answer (RLHF gold standard).
includeAnswersbooleantrueFetch and pair full accepted answer and alternative answers.
sortstringvotesvotes (highest quality first), activity, or creation.
maxItemsinteger50Maximum Q&A pairs to extract.

📤 Output Structure

Each record is an instruction-tuning ready pair:

{
"questionId": 231767,
"site": "stackoverflow",
"title": "What does the \"yield\" keyword do in Python?",
"bodyText": "What functionality does the yield keyword provide in Python?...",
"score": 13135,
"tags": ["python", "iterator", "generator", "yield"],
"isAnswered": true,
"hasAcceptedAnswer": true,
"acceptedAnswerId": 231855,
"acceptedAnswer": {
"answerId": 231855,
"isAccepted": true,
"score": 18318,
"bodyText": "To understand what yield does, you must understand what generators are...",
"creationDate": "2008-10-23T22:21:11+00:00",
"author": "e-satis"
},
"topAlternativeAnswers": [
{
"answerId": 231835,
"score": 4200,
"bodyText": "Think of it like a return statement, but instead of exiting the function..."
}
],
"url": "https://stackoverflow.com/questions/231767",
"creationDate": "2008-10-23T22:13:40+00:00"
}