People Also Ask API: collect and expand Google questions with Python
Get the People Also Ask questions for any search as JSON, then expand them level by level. Real yields for two seeds, the cost per level and the code.
CrawlerData teamPublished 5 min read
Contents
The People Also Ask box is a map of what people want to know next. Each question you open leads to more. For content planning, FAQ writing and keyword research, that tree is useful, and it is slow to explore by hand.
This guide collects it with code. We use the Google Search API, which returns the box in the people_also_ask field, and write an expand() function that follows the questions level by level and removes duplicates. The numbers below come from searches we ran in October 2026. Google’s questions change over time and by country, so yours will differ.
Get the questions for one search
Put your key in an environment variable:
export CRAWLERDATA_API_KEY="YOUR_API_KEY"
import os
import requests
API_URL = "https://api.crawlerdata.com/v1/jobs"
HEADERS = {"Authorization": f"Bearer {os.environ['CRAWLERDATA_API_KEY']}"}
def paa(query, country="us", language="en"):
"""The People Also Ask questions Google shows for `query` (an empty list if none)."""
body = {
"endpoint": "google-search",
"params": {"query": query, "country": country, "language": language},
"queue": "live",
}
resp = requests.post(API_URL, json=body, headers=HEADERS, timeout=180)
resp.raise_for_status()
data = resp.json()
if data["job"]["status"] != "completed":
raise RuntimeError(data["job"]["error"])
return [q["question"] for q in data["result"]["people_also_ask"]]
For how to start a podcast, it returned four questions:
paa("how to start a podcast")
# ['Do podcasts make money?',
# 'Can you start a podcast for free?',
# 'Can a normal person start a podcast?',
# 'Do I need a license for a podcast?']
Each item in the response is { "question": "..." }. There is no answer text and no source link, only the question. When you want to see how Google answers one, run it as its own search.
Expand them level by level
Treat each question as a new search. Ask the seed, ask every new question you got, and repeat. This function does that for as many levels as you ask for, and keeps each question once:
from concurrent.futures import ThreadPoolExecutor
def expand(seed, depth=2, workers=3, **kwargs):
"""Ask the seed, then ask each new question, `depth` levels deep.
Returns ({question: the question or seed it came from}, requests made).
Each request costs 1 credit."""
seen, made = {}, 0
level = [seed]
for _ in range(depth):
with ThreadPoolExecutor(workers) as pool:
results = list(pool.map(lambda q: paa(q, **kwargs), level))
made += len(level)
next_level = []
for parent, questions in zip(level, results):
for question in questions:
key = question.strip().lower()
if key != seed.lower() and key not in seen:
seen[key] = parent
next_level.append(question)
level = next_level
return seen, made
Two details worth noting:
- Duplicates are removed by lowercase text. The same question comes back from several parents, and it should count once.
- The dictionary remembers each question’s parent. That gives you the tree, not only a flat list, so you can group questions under the one that led to them.
A slice of what two levels of how to start a podcast found:
do podcasts make money? <- how to start a podcast
can you start a podcast for free? <- how to start a podcast
can a normal person start a podcast? <- how to start a podcast
do i need a license for a podcast? <- how to start a podcast
how much money does a podcaster make? <- Do podcasts make money?
who has the highest paid podcast? <- Do podcasts make money?
is it hard to start a podcast? <- Do podcasts make money?
how many views do you need on a podcast to make money? <- Do podcasts make money?
how do podcasts make money if they are free? <- Can you start a podcast for free?
how much does a podcast with 50,000 listeners make? <- Can you start a podcast for free?
The tree drifts as it deepens: a question about starting a podcast leads to one about whether podcasts make money, and from there to what a podcaster earns. That drift is the useful part, since it shows the next things people ask once the first question is answered.
What each level costs and finds
We ran two seeds to two and to three levels:
| Seed | Levels | Requests (credits) | Unique questions |
|---|---|---|---|
| how to start a podcast | 2 | 5 | 19 |
| how to start a podcast | 3 | 20 | 45 |
| how to learn python | 2 | 5 | 18 |
| how to learn python | 3 | 19 | 52 |
The cost grew about fourfold from the second level to the third, because each level asks every question the previous one found, while the number of questions grew more slowly as duplicates appeared. Two levels is a cheap place to start: about 5 credits for 18 or 19 questions. Go to a third level for the seeds that matter most.
Not every search has the box
A People Also Ask box does not appear for every search. In a test of 40 searches we ran for our AI Overview data, 29 had one. All 8 local business searches had it, and 9 of 10 how-to searches. Brand searches mostly did not: only 1 of 6 did. If paa() returns an empty list for a seed, that is a normal result and not an error, and you can move to a rephrased seed.
Turn the questions into a content plan
A list of questions is raw material. A workable routine:
- Expand each topic you cover, two levels deep, and keep the parent for each question.
- Group questions under their parent, so related ones sit together.
- Check what ranks for the questions that matter by running them through the search endpoint, as in What is a SERP API?.
- Write the answers as short sections or an FAQ on the page that should own the topic.
- Track the result for the keywords you target with a rank checker.
For ideas that start from what people type rather than what they ask, Google Autocomplete for keyword research does the same job from the search box.
Country and language
country takes one of 31 two-letter codes and language a two-letter code. Questions can differ between markets, so expand each market you work in separately.
What it costs
Every request is 1 credit, on every queue.
| What you run | Requests | At $1.00 per 1,000 | At $0.30 per 1,000 |
|---|---|---|---|
| 1 seed, 2 levels | about 5 | $0.005 | $0.0015 |
| 100 seeds, 2 levels | about 500 | $0.50 | $0.15 |
| 100 seeds, 3 levels | about 2,000 | $2.00 | $0.60 |
See pricing for the packs. Failed requests are not charged.
Next steps
You now have a function that returns the People Also Ask questions for a search, an expand() that turns one seed into a tree and an idea of what each level costs and finds. The Google Search API page lists every parameter with a full example response.
Frequently asked questions
- Is there a People Also Ask API?
- We are not aware of a public Google API for it. The CrawlerData google-search endpoint returns the People Also Ask box in the people_also_ask field of every response, as a list of questions. In our October 2026 test the seed search how to start a podcast returned 4 questions.
- Does the API return the answers to People Also Ask questions?
- No. Each item in people_also_ask has a question and nothing else. To see what answers Google gives, run each question as a search of its own and read the results and the AI Overview, if one is shown.
- How do I expand People Also Ask questions?
- Ask the seed, then ask each question you got as a new search, and repeat for as many levels as you want. The expand function in this guide does that and removes duplicates. Two levels of how to start a podcast cost 5 requests and gave 19 unique questions.
- How many questions does each level find?
- In our test of how to start a podcast, 2 levels gave 19 unique questions for 5 credits and 3 levels gave 45 for 20 credits. For how to learn python it was 18 for 5 credits and 52 for 19 credits.
- Does every search have a People Also Ask box?
- No. In a test of 40 searches, 29 had one. All 8 local business searches had one, while brand searches such as nike and weather mostly did not.
- How much does it cost?
- 1 credit per request. Expanding a seed two levels deep is about 5 credits and three levels about 20. A hundred seeds at two levels is 500 credits, or $0.50 at the Starter rate of $1.00 per 1,000 requests.
- People Also Ask
- People Also Ask API
- Keyword research
- SEO
- Python
- Tutorial