stackoverflow

Scrape StackOverflow tag pages with Puppeteer and Cheerio.

5|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/AgentComputerAI/torch --skill stackoverflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stackoverflow
Source: https://github.com/AgentComputerAI/torch/tree/main/skills/sites/stackoverflow
Command: npx skills add https://github.com/AgentComputerAI/torch --skill stackoverflow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

StackOverflow tag pages are protected by Cloudflare which blocks repeated anonymous requests, making traditional HTTP scraping unreliable.

Core Features & Use Cases

  • Real Chrome bypass: Connect to a local Chrome instance to maintain Cloudflare session cookies and avoid bot detection.
  • HTML extraction: Parse question titles, URLs, votes, answers, views, excerpts, tags, authors, and timestamps directly from the rendered HTML using Cheerio.
  • Robust pagination: Iterate through tag pages with configurable page size and polite delays, handling up to 1000 pages per tag.

Quick Start

Use the stackoverflow skill to scrape the newest questions for a specific tag, such as "javascript".

Frequently Asked Questions about stackoverflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scrape StackOverflow tags when Cloudflare is blocking my requests?

To scrape StackOverflow tags blocked by Cloudflare, you can connect Puppeteer to a local Chrome debug port. This uses a real browser instance to maintain session cookies and bypass bot detection, allowing reliable HTML extraction.

What is the best way to extract question data like votes and timestamps from StackOverflow HTML?

The best way to extract question data like votes and timestamps from StackOverflow is using Cheerio for DOM extraction. It parses the rendered HTML to capture titles, URLs, excerpts, tags, authors, and timestamps directly.

Can I use Puppeteer to bypass Cloudflare bot detection on StackOverflow?

Yes, you can use Puppeteer to bypass Cloudflare bot detection on StackOverflow. By connecting to a local real Chrome instance, it maintains valid session cookies and avoids the blocks that traditional anonymous requests trigger.

How do I handle pagination when scraping up to 1000 pages of StackOverflow questions?

To handle pagination when scraping up to 1000 pages of StackOverflow questions, you iterate through tag pages with a configurable page size. The process applies polite delays between requests to reliably retrieve data.

Do I need a local Chrome instance to scrape StackOverflow tag pages reliably?

Yes, you need a local Chrome instance to scrape StackOverflow tag pages reliably. Connecting Puppeteer to a local Chrome debug port is required to bypass Cloudflare protections and retrieve the rendered HTML for parsing.