People Also Ask scraper: questions, answers and sources from Google
A Python Playwright scraper for Google PAA: it renders the SERP, clicks to expand, extracts answers and source links, and walks the question graph breadth-fi…
On this page
People Also Ask scraper: questions, answers and sources from Google
TL;DR
- It extracts Google People Also Ask questions, the answer content behind them, source links and metadata, at scale.
- The README's diagnosis of existing scrapers is specific: HTTP-only tools get an empty shell because Google requires JavaScript, Selenium gets detected, and most tools collect the question text without the answer.
- The fix has three parts: Playwright with real Chrome, a persistent browser profile that reduces captcha triggers, and click-to-expand that extracts answers, sources and new questions.
- Breadth-first recursion is depth-controlled, so one seed question becomes a graph rather than a list.
What it is and who it is for
People Also Ask is a Python scraper for Google's PAA box, built with Playwright. It ships as both a CLI and a library and writes JSON or CSV.
It is for the person doing keyword research who wants the questions people actually type, not the ones a keyword tool guesses, and for the one who has read enough "PAA tools" to know that half of them return question text with no answer behind it.
Why the existing scrapers break
The README's three diagnoses are worth repeating because they explain the design:
- HTTP-only scrapers fail. Google requires JavaScript to render search results, so a simple
requests.get()returns an empty shell, not the PAA box. - Selenium scrapers break. Google's anti-bot systems detect ChromeDriver easily, and internal
jsnameselectors change without warning. - No answer extraction. Most scrapers collect question text only, missing the answer content that appears when you click a question.
How this one addresses them
- Playwright with real Chrome (
channel="chrome") renders the full result page including the PAA box. - A persistent browser profile keeps cookies and history, which the README says dramatically reduces captcha triggers.
- Click-to-expand extracts answers and source links, and discovers new questions through breadth-first recursion.
- Resilient selectors with multiple fallback strategies use the
data-qattribute as the primary key instead of fragilejsnametokens. - Captcha detection raises a clear error instead of silently parsing garbage.
That last point is the one that saves the run: a scraper that parses a captcha page as if it were results produces a plausible, empty dataset, which is worse than a failure.
Features
- Questions and answers — the question text plus the answer content and source links, not the question alone.
- BFS recursion — clicking a question expands it and reveals two or three new questions, with depth-controlled traversal.
- Multi-language and geo —
hlfor language andglfor country, for localized results. - SQLite caching — optional persistent cache that avoids re-scraping the same query.
- Anti-bot defense — persistent Chrome profile, user-agent rotation, stealth scripts and captcha detection.
- CLI and library — a command-line tool, or an importable Python library.
- JSON and CSV output — question, answer, sources, depth and related questions.
Quick start
pip install people-also-ask
playwright install chromium
The README notes that channel="chrome" requires Google Chrome installed on your system, and that passing channel=None to the PaaScraper constructor switches to Chromium.
When to use it, when not to
Use it when you are building a topic map and want the questions Google actually surfaces, when you need the answer content behind each question rather than the question list, or when you want the question graph for a seed topic at a controlled depth.
Do not use it as a bulk crawler without watching captchas: the README's anti-bot layer reduces triggers, and it does not claim to eliminate them. Do not use it as a ranking data source either — PAA gives you questions and sources, not search volume or difficulty. And keep the depth control in mind: breadth-first recursion can expand faster than you expect, and depth is the only thing that bounds it.
Sources
- People Also Ask — repository — the three diagnoses, the five fixes, features and requirements quoted above.
- README.md — install commands, quick start, license (MIT).
Project page: People Also Ask scraper
For the workflow that turns these questions into a prioritized content plan, see the SEO, GEO and ASO skill, and for the technical audit around the same pages, One Prompt Security Audit.
The repository is MIT-licensed.
FAQ
Does it need a Google API key? No. It renders the result page with Playwright and real Chrome, and a persistent profile reduces captcha triggers.
Does it extract answers or only questions? Answers: clicking a question expands it and the scraper extracts the answer content and source links, then discovers new questions.
Can it go deeper than one level? Yes, with breadth-first recursion and depth control, which is what bounds the crawl.
What does it output? JSON or CSV with question, answer, sources, depth and related questions, plus optional SQLite caching to avoid re-scraping the same query.