People Also Ask API: get PAA questions as JSON and track them
A People Also Ask API returns the questions in Google's "People also ask" box as JSON, usually with each answer and its source link. Google does not offer one, so you get PAA from a SERP API or your own scraper. The useful part comes next: storing questions by day, removing duplicates and watching which questions and domains change.
Short answer: For PAA as part of every results page you already pay for, use a SERP API that returns it in the same call, such as Serpent API's peopleAlsoAsk block (from $0.03 per 1,000 searches — pay as you go, no subscription). For deeper question trees, DataForSEO's click depth (1 to 4 levels, $0.00015 per click) or SerpApi's Related Questions API. Skip DIY scraping unless you enjoy maintaining it: the people-also-ask Python package was last released in July 2022.
What is the People Also Ask box, in data terms?
It is a list of questions related to the search, each of which expands into a short answer taken from a web page, with a link to that page. Google's own Search Central gallery calls it a "related questions group", described as "a cluster of questions that are related to what the user initially searched for".
For a developer, each entry has four useful parts: the question, the answer text, the source URL and the source title. The order matters too, because the first questions are the ones most people see without scrolling. That gives you three kinds of signal: what people ask, how Google answers it, and which site gets the credit.
If your goal is content ideas rather than data, our AnswerThePublic alternative guide builds a question explorer from PAA and autocomplete. This page is about getting PAA into a database and tracking it.
Can you still scrape PAA yourself in Python?
You can, but the classic approach no longer works. Most tutorials fetch the results page with requests and parse it with BeautifulSoup. Since January 2025 Google requires JavaScript to search. Google told TechCrunch the change helps protect its services from bots and abuse, and TechCrunch reported that without JavaScript many search functions would not work properly.
The tutorials that rank for this query show the problem. Oxylabs' guide, last updated 23 October 2024, parses the class span.CSkcDe with a Chrome 91 user agent. Generated class names like that change without notice. The people-also-ask package on PyPI is at version 1.1.0, released 23 July 2022.
A browser-driven scraper can still read the box, but then you own the browser fleet, the selectors and the breakage. For a handful of keywords that can be fine. For hundreds of keywords every day, an API is cheaper than your time. Our guide to parsing SERP features in Python shows what the selector work looks like if you go that way.
How do SERP APIs return PAA?
All the major SERP APIs include PAA, but they differ in the field name, in what each row holds, and in how you get more questions than the page shows at first. Those differences decide both your parser and your bill.
- SerpApi returns
related_questions. Each item has the question and, depending on the answer type, a snippet, title and link or an AI-generated answer with references. Each also carries anext_page_token, which you send to its Google Related Questions API to get the questions that appear when that one is clicked (docs). The docs page does not say how those follow-up calls count against your plan. - DataForSEO returns a
people_also_askitem and lets you setpeople_also_ask_click_depthfrom 1 to 4. Its docs say "your account will be billed $0.00015 extra for each click", refunded if fewer clicks happen. - Scrapingdog's tutorial prints a
peopleAlsoAskedForfield from its Google search API; each item in its sample output carries a question, title, answers, link, displayed link and rank. It does not cover expansion or cost per question. - Serpent API returns
peopleAlsoAskinside theresultsobject of every/api/searchresponse, one item per question, carrying the question and, where the page has them, its answer text and source page. The key is always present, as an empty list when a page has no box, andmetadata.hasPeopleAlsoAsktells you at a glance (docs).
What does a PAA response look like?
The request is a plain GET with your key in a header, and the response has the same outline on every engine (docs):
curl "https://apiserpent.com/api/search?q=best+laptops+2026&engine=google&country=us" \
-H "X-API-Key: YOUR_API_KEY"
{
"success": true,
"query": "best laptops 2026",
"engine": "google",
"country": "us",
"results": {
"organic": [ ... ],
"peopleAlsoAsk": [ ... ],
"relatedSearches": [ { "query": "best budget laptops 2026" } ]
},
"metadata": {
"hasPeopleAlsoAsk": true,
"hasRelatedSearches": true
}
}
Abridged: peopleAlsoAsk holds one item per question, carrying the question and, where the page has them, its answer text and source page. The item keys the tracker below reads are the ones in the full response example on our Google SERP API page. The block comes back on engine=google, bing, yahoo and brave, so one parser works across engines, and metadata.hasPeopleAlsoAsk tells you whether a response holds any questions before you loop. The code reads the answer and source with .get(), so a question without an answer never breaks your loop.
Build a PAA tracker in Python
The tracker does four things: fetch PAA for a keyword, store each question with the day, match questions that differ only in case or punctuation, and compare two days. It uses requests and the standard library's sqlite3.
# paa_tracker.py
import os
import re
import sqlite3
from urllib.parse import urlparse
import requests
API = "https://apiserpent.com/api/search"
KEY = os.environ.get("SERPENT_API_KEY", "YOUR_API_KEY")
def fetch_paa(keyword, country="us"):
"""One Google results page; return its People Also Ask rows."""
r = requests.get(
API,
params={"q": keyword, "engine": "google", "country": country},
headers={"X-API-Key": KEY},
timeout=60,
)
r.raise_for_status()
data = r.json()
return data["results"]["peopleAlsoAsk"] # always present; [] when the page had none
def normalise(question):
"""Same question, different punctuation or case -> same key."""
q = re.sub(r"[^\w\s]", "", question.lower())
return re.sub(r"\s+", " ", q).strip()
def store(db, day, keyword, items):
db.execute("""CREATE TABLE IF NOT EXISTS paa (
day TEXT, keyword TEXT, position INTEGER, question TEXT, qkey TEXT,
answer TEXT, source_url TEXT, source_domain TEXT,
UNIQUE(day, keyword, qkey))""")
for pos, item in enumerate(items, start=1):
url = item.get("sourceUrl") or ""
db.execute(
"INSERT OR IGNORE INTO paa VALUES (?,?,?,?,?,?,?,?)",
(day, keyword, pos, item["question"], normalise(item["question"]),
item.get("answer"), url, urlparse(url).netloc.removeprefix("www.")),
)
db.commit()
def changes(db, keyword, before, after):
def keys(day):
rows = db.execute("SELECT qkey, question FROM paa WHERE day=? AND keyword=?", (day, keyword))
return dict(rows.fetchall())
old, new = keys(before), keys(after)
return ([new[k] for k in new.keys() - old.keys()],
[old[k] for k in old.keys() - new.keys()])
def owners(db, day):
return db.execute("""SELECT source_domain, COUNT(*) FROM paa
WHERE day=? AND source_domain != '' GROUP BY 1 ORDER BY 2 DESC""", (day,)).fetchall()
Daily use is three lines: call fetch_paa() for each keyword, pass the rows to store() with today's date, then call changes() against yesterday. Run it from cron or any scheduler once a day per market.
This code runs on Python 3.15.2 with requests 2.34.2 and SQLite 3.54.1 (20 November 2026). For the test, only requests.get was replaced by a stub that returns the documented response shape shown above, over two days of sample questions. The output:
new questions: ['Do programmers need a dedicated GPU?']
dropped questions: ['Is a MacBook good for coding?']
answer owners on 2026-11-20: [('example.org', 1), ('example.net', 1), ('example.com', 1)]
Note what did not show up as new: "is 16gb ram enough for programming" on day two matched "Is 16GB RAM enough for programming?" from day one, because both reduce to the same key. Without that step, every change in capitalisation or punctuation looks like a new question and your trend lines fill with noise.
str.removeprefix needs Python 3.9 or later. To track several countries, add a country column and include it in the unique key; the API takes it as the country parameter, and location narrows it to a city. If you are used to setting country and language with Google's own gl and hl, our guide to Google search URL parameters explains what each one does.
What should you measure?
Four numbers cover most PAA reporting, and all of them fall out of the table above with one SQL query each.
- Question churn: new and dropped questions per keyword per week. High churn means Google is still testing what people want for that topic, which is a content opportunity.
- Answer ownership: the share of PAA answers sourced from your domain versus each competitor, from
source_domain. This is the PAA version of rank tracking. - Position of your answers: the first questions in the box get the most exposure, so an answer at position 1 is worth more than one at position 4.
- Answer drift: when the
answertext for the same question changes but the source does not, the page was updated or Google picked a different passage. Worth a look when your own page is the source.
Questions also make good inputs for the rest of your research. Feeding new PAA questions back in as queries is how many teams grow a keyword list; the keyword research with a SERP API guide covers that loop. If you also track featured snippets, PAA answers and snippets often come from the same pages, see our featured snippet guide.
What does PAA data cost per 1,000 keywords?
On an API that returns PAA inside the results page, the cost of PAA is the cost of the search. With Serpent API that is from $0.03 per 1,000 searches — pay as you go, no subscription (pricing). Nothing extra is added for the peopleAlsoAsk block.
Expansion is where costs diverge. At DataForSEO, a Standard-queue Google results page is $0.60 per 1,000 (pricing); four PAA clicks add 4 × $0.00015 = $0.0006 per keyword, or $0.60 per 1,000. So a full four-level PAA crawl of 1,000 keywords costs $1.20 on the Standard queue, or $2.60 in Live mode at $2.00 per 1,000 pages.
At SerpApi, a search costs between $25 per 1,000 on the Starter plan and $3.75 per 1,000 on the 1-million plan (pricing). Its docs page does not say whether Related Questions calls are billed as searches, so I have not priced deeper trees there. Ask before you build a crawler that follows every token.
| Option | What you get | Cost per 1,000 keywords |
|---|---|---|
| Serpent API | PAA block in each /api/search response | $0.60 Default · $0.30 Growth ($100) · $0.10 Scale ($500) · $0.05 Enterprise ($1,000) · $0.03 Enterprise Plus ($1,250) |
| DataForSEO, Standard, no clicks | PAA as shown on the page | $0.60 |
| DataForSEO, Standard, 4 clicks | Expanded question tree | $1.20 |
| DataForSEO, Live, 4 clicks | Expanded tree, real time | $2.60 |
| SerpApi, 1M plan | PAA as shown on the page | $3.75 (expansion calls: unverified) |
Which approach should you pick?
- You track PAA for many keywords every day and care about ownership and churn: an API that returns PAA in the results page you already fetch. That is the cheapest way to get the signal, and the tracker above is all the code you need.
- You need the full question tree for content planning: DataForSEO's click depth, which prices every level openly, or SerpApi's Related Questions API.
- You need ten keywords once: open a browser. No API is worth setting up for that.
- You want to build a scraper anyway: budget for a real browser and weekly selector fixes, and read the parsing guide linked above first.
Whichever you choose, keep the storage layer from this guide. The normalised key and the day-over-day diff are what turn a list of questions into a trend you can report on.
How we checked this
On 20 November 2026 I read Google's Search Central visual elements gallery and its Custom Search JSON API overview, SerpApi's related questions and Related Questions API docs, SerpApi's pricing page, DataForSEO's live advanced SERP docs and pricing, and the PyPI page of the people-also-ask package. I also opened the Scrapingdog and Oxylabs PAA tutorials and a TechCrunch report on Google's JavaScript requirement. That is 2 Google sources, 7 vendor sources, 1 package registry and 1 news report, each re-opened on the same day to check the sentence it supports.
The tracker code was executed locally on Python 3.15.2 with requests 2.34.2; only the HTTP call was stubbed, with the response shape shown on our Google SERP API page and two days of sample questions. No live searches were made. What I could not verify: whether SerpApi bills uncached Related Questions calls as searches (its docs say only that cached searches are free); and how often PAA appears on a typical results page today (I did not find a current dated study). The gap check covered the vendor tutorials and docs named here, not a fresh top-five list.
Get People Also Ask as JSON with every search
Serpent API returns peopleAlsoAsk, organic results, related searches and the other result blocks in one response, from $0.03 per 1,000 — pay as you go, no subscription.
Explore: Google SERP API · Playground · Docs · Pricing
FAQ
Does Google have an official People Also Ask API?
No. Google describes the People Also Ask box in its Search Central documentation as a "related questions group", but it offers no API that returns those questions. Its Custom Search JSON API, the nearest official product, is closed to new customers, and existing customers have until 1 January 2027 to move to another solution. To get PAA programmatically you use a SERP API or run your own browser-based scraper.
How do I scrape People Also Ask with Python?
The dependable route is to call a SERP API from Python with requests and read the PAA list from the JSON, as in the tracker above. Fetching Google's page with requests and parsing it with BeautifulSoup, as older tutorials do, stopped being dependable once Google began requiring JavaScript in January 2025. A browser automation tool such as Playwright can still render the page, but you then maintain the selectors yourself.
How many People Also Ask questions can I get per keyword?
The box shows a short list when the page loads; SerpApi's docs describe the extra questions Google generates when one is clicked. A standard results-page call returns that first set of questions. To go deeper, DataForSEO lets you request one to four levels of clicks at $0.00015 per click, and SerpApi returns a next_page_token per question that its Related Questions API expands. Deeper trees cost more and repeat more, so deduplicate as you go.
Is it legal to scrape People Also Ask?
PAA questions and short answers are publicly shown to every searcher, and collecting public search results through an API is common practice in SEO tools. Google's terms restrict automated access to its services, and the law differs by country and by how data is used, so this is not legal advice. Store only what you need, respect the source sites' content rights when you reuse answers, and ask a lawyer if you plan to republish PAA text at scale.
What is the difference between People Also Ask and related searches?
People Also Ask shows full questions that expand into an answer from a web page with a source link. Related searches are suggested search phrases, usually at the bottom of the page, with no answer attached. Both come back in the same Serpent API response, as peopleAlsoAsk and relatedSearches. PAA is better for understanding intent and answer ownership; related searches are better for expanding a keyword list.
Sources
Google (checked 20 November 2026):
- Google Search Central: visual elements gallery (related questions)
- Google: Custom Search JSON API overview (closed to new customers; transition by 1 Jan 2027)
Vendor documentation and pricing (checked 20 November 2026):
- SerpApi: related questions results
- SerpApi: Google Related Questions API
- SerpApi pricing
- DataForSEO: Google organic live advanced (people_also_ask_click_depth)
- DataForSEO: Google Organic SERP API pricing
- Scrapingdog: scrape People Also Ask
- Oxylabs: how to scrape Google People Also Ask
Other (checked 20 November 2026):





