# Google People Also Ask Scraper (`googleapi/google-people-also-ask-scraper`) Actor

Collect People Also Ask questions and source-visible expanded answers, sections, citations, and media from public Google Search pages.

- **URL**: https://apify.com/googleapi/google-people-also-ask-scraper.md
- **Developed by:** [Google API](https://apify.com/googleapi) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

Collect questions shown in Google Search’s People Also Ask section and the answer content Google displays with them. Each dataset row represents one question. When available, the answer can include text, headings, paragraphs, lists, citation links, images, and video links.

If Google labels expanded content as “AI Overview,” the row identifies it as an AI Overview. Source links are included as they appear on the page; linked pages are not opened.

### How to use

1. Enter one or more search phrases, or provide public Google Search URLs in `startUrls`.
2. Select result pages and the maximum number of questions to collect.
3. Choose whether to include answers and visible citations.
4. Run the Actor and view or export the question records.

Example:

```json
{
  "queries": ["web scraping", "structured data"],
  "page": 1,
  "maxPages": 2,
  "maxItems": 25,
  "language": "en",
  "country": "US",
  "includeAnswers": true,
  "includeSources": true,
  "maxPaaExpansions": 5
}
```

### Input

| Input | Description | Default |
|---|---|---:|
| `query` / `queries` | One or more Google Search phrases. | — |
| `startUrls` | Public Google Search URLs with a search query. | — |
| `page` / `maxPages` | Starting results page and consecutive pages to inspect per search. | 1 / 1 |
| `maxItems` | Maximum unique question records across the run. | 25 |
| `includeAnswers` | Include visible answer text and its structure. | `true` |
| `maxPaaExpansions` | Maximum visible questions to expand on each result page. Set to `0` to keep content already visible without expanding questions. | 5 |
| `includeSources` | Include citation links visible with the answer. | `true` |
| `language` / `country` | Google Search language and country. Country accepts a two-letter code or `ALL`. | `en` / `US` |
| `proxyConfiguration` | Optional Apify Proxy settings. | — |

### Output

Each row contains a required `question` and may include:

- **Answer text:** `answerText` (also available as `answer`) and a clean HTML representation.
- **Structure:** headline, subheadings, paragraphs, bullet points, and grouped answer sections.
- **Citations:** visible source links, citation count, and source domains.
- **Media:** images and video links shown with the answer.
- **Answer type and attribution:** including the `ai_overview` label when Google visibly identifies an answer as an AI Overview.

Question rows may still be returned when answer details are not available. The Actor does not fetch cited pages or combine separate related-result cards with the answer.

Example dataset item:

```json
{
  "question": "Why is the sky blue?",
  "answerText": "The sky appears blue because air scatters blue light from the sun more than other colors.",
  "answerType": "ai_overview",
  "answerHeadline": "How It Works",
  "answerBulletPoints": ["Sunlight contains all colors."],
  "answerSources": [
    {
      "title": "Rayleigh scattering",
      "linkUrl": "https://spaceplace.nasa.gov/blue-sky/",
      "domain": "spaceplace.nasa.gov"
    }
  ]
}
```

The Output tab shows the available result fields. Run summary information is available with the run output in Apify.

### Limits and responsible use

Google may vary People Also Ask results by query, location, and time. Some questions have no visible answer or citation details. The Actor does not sign in or bypass access checks.

Use public search results responsibly and follow applicable privacy requirements and Google Search terms. This Actor is not affiliated with Google.

# Actor input Schema

## `query` (type: `string`):

One public Google Search phrase whose People Also Ask questions should be collected.

## `queries` (type: `array`):

Multiple public Google Search phrases. Use query or queries, or provide startUrls.

## `startUrls` (type: `array`):

Public HTTPS Google Search /search URLs with a non-empty q parameter.

## `maxItems` (type: `integer`):

Maximum number of unique question records to save across all requested searches and pages.

## `page` (type: `integer`):

One-based Google Search results page to start with (10 results per page).

## `maxPages` (type: `integer`):

Maximum number of consecutive Google Search pages to inspect for each query or start URL.

## `language` (type: `string`):

Google Search language code, such as en or en-GB.

## `country` (type: `string`):

Two-letter Google Search country code, or ALL.

## `includeAnswers` (type: `boolean`):

Include answer text, visible headings, paragraphs, lists, citations, and media when Google exposes them.

## `maxPaaExpansions` (type: `integer`):

Bound the number of visible People Also Ask questions expanded on each Google results page so their public answer details can be read. Set to 0 to keep only content already visible in the page response. Cited destination pages are not fetched.

## `includeSources` (type: `boolean`):

Include visible answer citation links when present on the page.

## `timeoutSecs` (type: `integer`):

Maximum time for each public Google Search request.

## `requestDelayMs` (type: `integer`):

Delay between requests to public Google Search pages.

## `maxRetries` (type: `integer`):

Retries for transient public request failures. Access boundaries are not retried or bypassed.

## `proxyConfiguration` (type: `object`):

Optional Apify proxy settings for the standard browser transport, including the initial request.

## Actor input object example

```json
{
  "maxItems": 25,
  "page": 1,
  "maxPages": 1,
  "language": "en",
  "country": "US",
  "includeAnswers": true,
  "maxPaaExpansions": 5,
  "includeSources": true,
  "timeoutSecs": 30,
  "requestDelayMs": 200,
  "maxRetries": 1
}
```

# Actor output Schema

## `output` (type: `string`):

No description

## `runHealth` (type: `string`):

No description

## `dataset` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxItems": 25,
    "maxPaaExpansions": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("googleapi/google-people-also-ask-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "maxItems": 25,
    "maxPaaExpansions": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("googleapi/google-people-also-ask-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxItems": 25,
  "maxPaaExpansions": 5
}' |
apify call googleapi/google-people-also-ask-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,googleapi/google-people-also-ask-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/rBYoBdhvfp7qRJmIP/builds/T3y22IG6Y59G3MQs3/openapi.json
