# Google AI Mode Scraper (`brightgro/google-ai-mode`) Actor

Give search queries and get the answer Google's AI Mode gives, with every source it cites and their domains. Optionally check whether your domain is cited. 8 English markets. Data from the DataForSEO SERP API.

- **URL**: https://apify.com/brightgro/google-ai-mode.md
- **Developed by:** [Brightgro LLC](https://apify.com/brightgro) (community)
- **Categories:** SEO tools, AI
- **Security:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$20.00 / 1,000 answers

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Google AI Mode Scraper

The answer Google's AI Mode gives for your search queries, with every source it cites. Use it to see which sites Google's
AI recommends in your market, to track whether your own site is cited, and to feed AI agents and content briefs.

### Who uses it, and for what

- **AI visibility and GEO teams:** check, query by query, whether Google's AI Mode cites your site, and at which position.
- **Brands and agencies:** see which competitors and comparison sites the AI recommends in your category.
- **Content teams:** the sources the AI trusts for a topic show which pages to improve or which sites to get mentioned on.
- **Researchers and AI agents:** answer text and cited sources as flat JSON, by country.

### Example inputs

One query (one answer, $0.02):

```json
{
  "queries": ["best crm for small business"],
  "country": "US"
}
```

Track whether your site is cited across your key queries:

```json
{
  "queries": [
    "best crm for small business",
    "crm with email marketing",
    "free crm software"
  ],
  "country": "US",
  "domain": "hubspot.com"
}
```

The same check in the UK market, where the AI often cites different sources:

```json
{
  "queries": ["best crm for small business"],
  "country": "GB",
  "domain": "hubspot.com"
}
```

### Input

- **Queries:** up to 100, for example `best crm for small business`.
- **Country:** one of 8 English-language Google markets (US, GB, CA, AU, IE, NZ, ZA, IN).
- **Your domain (optional):** for example `hubspot.com`. Each row then says whether AI Mode cited it.

### Output

One row per query: `query`, `country`, `answer` (the answer text, in Markdown where available), `source_count`,
`cited_domains` (in the order cited) and `sources` (position, title, url, domain). With a domain set, also `domain`,
`domain_cited` and `domain_first_position`.

### Pricing

$0.02 for each answer. There is no start fee. A query that Google gives no AI Mode answer for gets one free row saying
so, and a query typed twice in the same run (different capitals or spacing) is asked and charged once.

### Data

From the DataForSEO SERP API (Google AI Mode). Answers are what Google gives at the time of the run, so they change over
time and by country. A long number in an answer or link that could be a payment card number is shown as \[number hidden].

### Related actors

- [AI Visibility Tracker](https://apify.com/brightgro/ai-visibility-check): the same check across ChatGPT, Gemini, Perplexity and AI Mode.
- [Google People Also Ask Scraper](https://apify.com/brightgro/people-also-ask): the questions to put to AI Mode.
- [Ranked Keywords](https://apify.com/brightgro/ranked-keywords): compare classic Google rankings with AI citations.

# Actor input Schema

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

What people ask Google, up to 100, for example best crm for small business.

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

The Google market to ask, in English.

## `domain` (type: `string`):

For example hubspot.com. Each row then says whether AI Mode cited it and at which source position.

## Actor input object example

```json
{
  "queries": [
    "best crm for small business"
  ],
  "country": "US"
}
```

# Actor output Schema

## `results` (type: `string`):

Give search queries and get the answer Google's AI Mode gives, with every source it cites and their domains. Optionally check whether your domain is cited. 8 English markets. Data from the DataForSEO SERP API.

# 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 = {
    "queries": [
        "best crm for small business"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("brightgro/google-ai-mode").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 = { "queries": ["best crm for small business"] }

# Run the Actor and wait for it to finish
run = client.actor("brightgro/google-ai-mode").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 '{
  "queries": [
    "best crm for small business"
  ]
}' |
apify call brightgro/google-ai-mode --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,brightgro/google-ai-mode"
        }
    }
}
```

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/T2YhR5gWUf1ChDbLs/builds/c8MkcFE7ckk40lddf/openapi.json
