# Google AI Mode API Documentation

Each successful request will cost you `10` API credits.

You have to send a GET request to **`https://api.scrapingdog.com/google/ai_mode`** with the below-given parameters.

Google AI Mode API pricing is available [here](https://www.scrapingdog.com/google-ai-mode-api/#pricing).

{% hint style="info" %}
**Note:** Various countries still don’t support Google AI Mode publicly (i.e., without logging into Google). So, you may encounter errors there.&#x20;
{% endhint %}

### Parameters <a href="#parameters" id="parameters"></a>

#### **Scrapingdog Parameters**

| Parameters                                                         | Description                                                                                                                                                                |
| ------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>api\_key<br></p><p><mark style="color:red;">required</mark></p> | <p>Your personal API key. Available on your dashboard <br><br>Type: <em><strong>String</strong></em></p>                                                                   |
| html                                                               | <p>This will return the full HTML of the Google page. <br><br>Default Value - <strong><code>false</code></strong> <br><br>Type - <strong><code>Boolean</code></strong></p> |

#### Search Query

| Parameters                                                      | Description                                                                                  |
| --------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| <p>query<br></p><p><mark style="color:red;">required</mark></p> | <p>The query you want to search in Google AI Mode.<br><br>Type - <strong>String</strong></p> |

#### Geographic Location and Localization

| Parameters | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| country    | <p>This parameter specifies the country for the Google search using a two-letter country code (e.g., US for the United States, UK for the United Kingdom, or FR for France). For a complete list of supported countries, visit the <a href="https://docs.scrapingdog.com/google-search-scraper-api/google-country-parameter-supported-google-countries">Google countries page</a>. <br><br>Default Value - <strong><code>us</code></strong> <br><br>Type - <strong>String</strong></p> |
| uule       | <p>It is a parameter that specifies the geographic location or locale for which the search results should be tailored. Possible Value could be <strong><code>w+CAIQIFJlbGF5IFN0YXRlcw==</code></strong></p><p><br>Type - <strong>String</strong></p>                                                                                                                                                                                                                                   |
| location   | <p>This parameter specifies the origin location of the search. It cannot be used in combination with the <code>uule</code> parameter. For best results and to closely mimic a real user's search behavior, it's recommended to set the location at the city level. <br><br>Type - <strong>String</strong></p>                                                                                                                                                                          |

#### Advanced Filters

| Parameters | Description                                                                                                                                                                         |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| safe       | <p>To filter the adult content set <code>safe</code> to <code>active</code> or to disable it set <code>off</code>. <br><br>Default: <code>off</code> </p><p></p><p>Type: String</p> |

### API Example

{% tabs %}
{% tab title="cURL" %}

```bash
curl "https://api.scrapingdog.com/google/ai_mode/?api_key=5eaa61a6e562fc52fe763tr516e4653&query=scrapingdog"
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

api_key = "5eaa61a6e562fc52fe763tr516e4653"
url = "https://api.scrapingdog.com/google/ai_mode/"

params = {
    "api_key": api_key,
    "query": "scrapingdog"
}

response = requests.get(url, params=params)

if response.status_code == 200:
    data = response.json()
    print(data)
else:
    print(f"Request failed with status code: {response.status_code}")

```

{% endtab %}

{% tab title="Node JS" %}

```javascript
const axios = require('axios');

const api_key = '5eaa61a6e562fc52fe763tr516e4653';
const url = 'https://api.scrapingdog.com/google/ai_mode/';

const params = {
  api_key: api_key,
  query: 'scrapingdog'
};

axios
  .get(url, { params: params })
  .then(function (response) {
    if (response.status === 200) {
      const data = response.data;
      console.log(data)
    } else {
      console.log('Request failed with status code: ' + response.status);
    }
  })
  .catch(function (error) {
    console.error('Error making the request: ' + error.message);
  });

```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

// Set the API key and request parameters
$api_key = '5eaa61a6e562fc52fe763tr516e4653';
$query = 'scrapingdog';

// Set the API endpoint
$url = 'https://api.scrapingdog.com/google/ai_mode/?api_key=' . $api_key . '&query=' . $query;

// Initialize cURL session
$ch = curl_init($url);

// Set cURL options
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Execute the cURL request
$response = curl_exec($ch);

// Check if the request was successful
if ($response === false) {
    echo 'cURL error: ' . curl_error($ch);
} else {
    // Process the response data as needed
    echo $response;
}

// Close the cURL session
curl_close($ch);

```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
require 'uri'

# Set the API key and request parameters
api_key = '5eaa61a6e562fc52fe763tr516e4653'
query = 'scrapingdog'

# Construct the API endpoint URL
url = URI.parse("https://api.scrapingdog.com/google/ai_mode/?api_key=#{api_key}&query=#{query}")

# Create an HTTP GET request
request = Net::HTTP::Get.new(url)

# Create an HTTP client
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true # Enable SSL (https)

# Send the request and get the response
response = http.request(request)

# Check if the request was successful
if response.is_a?(Net::HTTPSuccess)
  puts response.body # Process the response data as needed
else
  puts "HTTP request failed with code: #{response.code}, message: #{response.message}"
end

```

{% endtab %}

{% tab title="Java" %}

```java
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.IOException;

public class Main {
    public static void main(String[] args) {
        try {
            // Set the API key and request parameters
            String apiKey = "5eaa61a6e562fc52fe763tr516e4653";
            String query = "scrapingdog";

            // Construct the API endpoint URL
            String apiUrl = "https://api.scrapingdog.com/google/ai_mode/?api_key=" + apiKey
                    + "&query=" + query

            // Create a URL object from the API URL string
            URL url = new URL(apiUrl);

            // Open a connection to the URL
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();

            // Set the request method to GET
            connection.setRequestMethod("GET");

            // Get the response code
            int responseCode = connection.getResponseCode();

            if (responseCode == 200) {
                // Read the response from the connection
                BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                String inputLine;
                StringBuilder response = new StringBuilder();

                while ((inputLine = reader.readLine()) != null) {
                    response.append(inputLine);
                }
                reader.close();

                // Process the response data as needed
                System.out.println(response.toString());
            } else {
                System.out.println("HTTP request failed with response code: " + responseCode);
            }

            // Close the connection
            connection.disconnect();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

```

{% endtab %}
{% endtabs %}

### API Response

```json
{
  "references": [
    {
      "link": "https://www.scrapingdog.com/#:~:text=Scrapingdog%20is%20a%20web%20scraping,output%20in%20parsed%20JSON%20format.",
      "title": "Scrapingdog: Best Web Scraping API",
      "snippet": "Struggling with Blocked Scraping Attempts? Our web scraping API takes care of rotating proxies, headless browsers, and CAPTCHAs, making web scraping effortless ...",
      "source": "Scrapingdog",
      "index": 1
    },
    {
      "link": "https://www.scrapingdog.com/",
      "title": "Scrapingdog: Best Web Scraping API",
      "snippet": "Struggling with Blocked Scraping Attempts? Our web scraping API takes care of rotating proxies, headless browsers, and CAPTCHAs, making web scraping effortless ...",
      "source": "Scrapingdog",
      "index": 2
    },
    {
      "link": "https://www.scrapingdog.com/#:~:text=Scrapingdog%20is%20a%20web%20scraping,in%20your%20account%20remain%20intact.",
      "title": "Scrapingdog: Best Web Scraping API",
      "snippet": "Features of scrapingdog for hassle-free data collection * Render websites with Headless Chrome. We use multiple instances of headless browsers to let you scrape...",
      "source": "Scrapingdog",
      "index": 3
    },
    {
      "link": "https://docs.scrapingdog.com/#:~:text=You%20can%20start%20scraping%20any,will%20receive%20a%20403%20error.",
      "title": "Scrapingdog: Documentation",
      "snippet": "Jun 18, 2025 — Documentation. You can start scraping any website in literally 1 minute. Our Web Scraping API will provide you with a seamless data pipeline that is almost 99.9...",
      "source": "Scrapingdog",
      "index": 4
    },
    {
      "link": "https://serp.co/products/scrapingdog.com/reviews/#:~:text=Scrapingdog%20provides%20three%20subscription%20plans,are%20available%20across%20all%20tiers.",
      "title": "Scrapingdog - Reviews, Pricing, Features, Alternatives & Deals",
      "snippet": "API Features and Usage. The primary APIs offered by Scrapingdog include dedicated services for Amazon Reviews, Google Searches, LinkedIn Profiles, and Jobs. Eac...",
      "source": "serp.co",
      "index": 5
    },
    {
      "link": "https://serp.ai/products/scrapingdog.com/reviews/#:~:text=Plan%20Options%20and%20Pricing&text=The%20fundamental%20credit%20structure%20operates,enhance%20scraping%20efficiency%20and%20accuracy.",
      "title": "Scrapingdog - Reviews, Pricing, Features - SERP AI",
      "snippet": "We'll explore the platform's capabilities, pricing structure, and technical features to help you determine if Scrapingdog can meet your data extraction needs. *",
      "source": "SERP AI",
      "index": 6
    },
    {
      "link": "https://serp.ai/products/scrapingdog.com/reviews/#:~:text=The%20fundamental%20credit%20structure%20operates,enhance%20scraping%20efficiency%20and%20accuracy.",
      "title": "Scrapingdog - Reviews, Pricing, Features - SERP AI",
      "snippet": "Scrapingdog. ... Scrapingdog's comprehensive API suite extracts data from LinkedIn, Google, Amazon, Walmart, and social media platforms with 99.99% reliability,",
      "source": "SERP AI",
      "index": 7
    },
    {
      "link": "https://serp.co/products/scrapingdog.com/reviews/#:~:text=MediaAlternativesDiscussion-,Overview,while%20offering%20flexible%20subscription%20plans.",
      "title": "Scrapingdog - Reviews, Pricing, Features, Alternatives & Deals - SERP",
      "snippet": "Scrapingdog * Overview. Web scraping service Scrapingdog offers sophisticated rendering capabilities and a large proxy pool to extract data from dynamic website...",
      "source": "serp.co",
      "index": 8
    },
    {
      "link": "https://www.scrapingdog.com/blog/web-scraping-use-cases/#:~:text=You%20can%20constantly%20keep%20track,help%20businesses%20reach%20additional%20customers.",
      "title": "9 Use Cases of Web Scraping for Businesses in 2025",
      "snippet": "Aug 27, 2024 — 9 Use Cases of Web Scraping for Businesses in 2025 * Web Scraping Use Cases & Applications in Different Areas. Public Relations. Data Science and Analytics. Mar...",
      "source": "Scrapingdog",
      "index": 9
    },
    {
      "link": "https://www.scrapingdog.com/blog/best-web-scraping-apis/#:~:text=I%20have%20concluded%20my%20results,Stability%20Over%20Hype:",
      "title": "5 Best Web Scraping APIs in 2025 (Fast, Scalable & Easy to ...",
      "snippet": "May 1, 2025 — Scrapingdog * Once you sign up, you get 1000 free credits for testing. * Per scrape cost starts from $0.0002 and drops below $0.000063 with a higher volume. * S...",
      "source": "Scrapingdog",
      "index": 10
    },
    {
      "link": "https://www.g2.com/products/scraping-dog/competitors/alternatives#:~:text=If%20you%20are%20considering%20Scraping,SmythOS",
      "title": "Top 10 Scraping Dog Alternatives & Competitors in 2025 - G2",
      "snippet": "Top 10 Scraping Dog Alternatives & Competitors. ... If you are considering Scraping Dog, you may also want to investigate similar alternatives or competitors to...",
      "source": "G2",
      "index": 11
    },
    {
      "link": "https://www.youtube.com/watch?v=GOxYIfnvB-w",
      "title": "What is Scrapingdog | Introduction Video | How To Use ...",
      "snippet": "and then second we have dedicated APIs like we have APIs for LinkedIn uh LinkedIn job Amazon Amazon reviews Twitter Zillow data center we have data center proxi...",
      "source": "YouTube·Scrapingdog",
      "index": 12
    },
    {
      "link": "https://scrapeway.com/web-scraping-api/scrapingdog",
      "title": "Scrapingdog review, overview and benchmarks - Scrapeway",
      "snippet": "Plan, Price, Credits, Concurrency. Lite, $40, 200,000, 5. Standard, $90, 1,000,000, 50. Pro, $200, 3,000,000, 100. Enterprise, $500, 8,000,000, 200. Custom, -, ...",
      "source": "Scrapeway",
      "index": 13
    },
    {
      "link": "https://www.g2.com/products/scraping-dog/reviews#:~:text=Scraping%20Dog%20Product%20Details,a%20Developer%20or%20Non%2DDeveloper.",
      "title": "Scraping Dog Reviews 2025: Details, Pricing, & Features - G2",
      "snippet": "Well, we are confident that this web scraping tool will help you boost your productivity. You can subscribe at our website (https://www.scrapingdog.com) to get ...",
      "source": "G2",
      "index": 14
    },
    {
      "link": "https://medium.com/@RenderAnalytics/high-value-web-scraping-use-cases-86334ba24e5c#:~:text=Automate%20Repetitive%20Tasks,streamlining%20the%20lead%20generation%20process.",
      "title": "High-Value Web Scraping Use Cases | by Charles Render - Medium",
      "snippet": "Jan 5, 2024 — Automate Repetitive Tasks Automating Reports: Financial analysts often rely on specific datasets from particular websites for their daily or weekly reports. Web...",
      "source": "Medium",
      "index": 15
    },
    {
      "link": "https://www.youtube.com/watch?v=mJeo3_8TlOU",
      "title": "How to use Scrapingdog for Web Scraping?",
      "snippet": "hi welcome to Scraping Dog tutorials i am Manhan your guide to scraping dog. and in today's video I'll show you how to scrape any website in just few simple ste...",
      "source": "YouTube·Scrapingdog",
      "index": 16
    },
    {
      "link": "https://dataforest.ai/blog/top-web-scraping-use-cases",
      "title": "Web Scraping Use Cases in 2025: How to Get Started? - Dataforest",
      "snippet": "May 26, 2025 — In short, use cases of web scraping give businesses power when understanding markets and making smart decisions. Keeping tabs on competitors: Web scraping makes...",
      "source": "Dataforest",
      "index": 17
    },
    {
      "link": "https://www.crunchbase.com/organization/scrapingdog#:~:text=About%20the%20Company,Upgrade%20to%20Business",
      "title": "Scrapingdog - Crunchbase Company Profile & Funding",
      "snippet": "About Scrapingdog. ... Scrapingdog provides web scraping tools, APIs, and extensions. ... Details. ... Fastest Web Scraping Extension for Everyone. Scrapingdog ...",
      "source": "Crunchbase",
      "index": 18
    },
    {
      "link": "https://slashdot.org/software/comparison/Local-Scraper-vs-Scrapingdog/",
      "title": "Compare Local Scraper vs. Scrapingdog in 2025 - Slashdot",
      "snippet": "Similar Products * Identity Matrix. Identity Matrix helps you increase revenue while spending less. The platform identifies 70% of US web visitors at a person-l...",
      "source": "Slashdot",
      "index": 19
    },
    {
      "link": "https://proxyway.com/best/best-web-scraping-apis#:~:text=1.,best%20overall%20web%20scraping%20API.&text=2.,feature%2Drich%20web%20scraping%20APIs.&text=3.,for%20quality%20web%20scraping%20APIs.&text=4.,AI%2Dbased%20web%20scraping%20API.&text=5.,most%20versatile%20web%20scraping%20APIs.",
      "title": "The Best Web Scraping APIs for 2025 - Proxyway",
      "snippet": "The Best Web Scraping APIs for 2025 * Zyte API – the best overall web scraping API. Visit Zyte> * Oxylabs – performant and feature-rich web scraping APIs. Use t...",
      "source": "Proxyway",
      "index": 20
    }
  ],
  "textBlocks": [
    {
      "type": "paragraph",
      "snippet": "Quick results from the web:"
    },
    {
      "type": "paragraph",
      "snippet": "Scrapingdog is a web scraping API designed to extract data from websites at scale. It aims to simplify the scraping process by handling complexities like rotating proxies, headless browsers, CAPTCHA solving, and JavaScript rendering.",
      "referenceIndexes": [
        1
      ]
    },
    {
      "type": "list",
      "list": [
        {
          "snippet": "Headless Chrome Rendering: Uses multiple instances of headless browsers to scrape data from websites that rely on JavaScript for content rendering."
        },
        {
          "snippet": "Rotating Proxy Pool: Maintains a pool of over 40 million proxies to overcome rate limiting and prevent blocking, ensuring a high success rate."
        },
        {
          "snippet": "High Success Rate and Speed: Claiming to be one of the fastest web scraping APIs, Scrapingdog boasts a high success rate, particularly for top-level domains.",
          "links": [
            {
              "anchor": "Scrapingdog",
              "url": "https://www.scrapingdog.com/"
            }
          ]
        },
        {
          "snippet": "Dedicated APIs: Offers specialized APIs for common scraping tasks on platforms like Google Search, LinkedIn Profiles and Jobs, and Amazon Product Data."
        },
        {
          "snippet": "Structured Data Output: Delivers scraped data in readily usable formats like JSON and HTML."
        },
        {
          "snippet": "LLM-Ready Output: Can convert scraped webpages into clean, structured Markdown or JSON suitable for large language models, according to Scrapingdog.",
          "links": [
            {
              "anchor": "according to Scrapingdog",
              "url": "https://www.scrapingdog.com/"
            }
          ]
        },
        {
          "snippet": "User-Friendly for Developers and Non-Developers: Provides a dashboard and extensions for non-developers to scrape data with ease, while offering API documentation and code snippets for developers in various languages like Python, NodeJS, and Java."
        },
        {
          "snippet": "Credit-Based Pricing: Operates on a credit system, where each API request consumes a specific number of credits depending on the complexity of the data and the API used."
        },
        {
          "snippet": "Free Trial: Offers 1,000 free credits for new users to test the service.",
          "referenceIndexes": [
            0,
            2,
            7,
            3,
            17,
            4
          ]
        }
      ]
    },
    {
      "type": "list",
      "list": [
        {
          "snippet": "Price and Stock Monitoring: Tracking competitors' prices, product availability, and other e-commerce data for dynamic pricing strategies."
        },
        {
          "snippet": "Market Research and Sentiment Analysis: Collecting market trends, competitor information, customer reviews, and social media data for competitive analysis and product development."
        },
        {
          "snippet": "Lead Generation: Building targeted lead lists and enriching existing data with contact details and other information."
        },
        {
          "snippet": "SEO Monitoring: Tracking keyword performance, competitor strategies, and content gaps."
        },
        {
          "snippet": "Data Enrichment: Updating and improving existing datasets with new information."
        },
        {
          "snippet": "Automating Reports: Extracting specific datasets from websites for daily or weekly reports.",
          "referenceIndexes": [
            16,
            8,
            14
          ]
        }
      ]
    },
    {
      "type": "paragraph",
      "snippet": "Scrapingdog offers tiered pricing plans based on the number of credits and concurrency levels. Pricing starts with a free plan for 1,000 requests, and paid plans range from $40 to $500+ per month, with enterprise solutions available for high-volume users.",
      "referenceIndexes": [
        12,
        5
      ]
    },
    {
      "type": "paragraph",
      "snippet": "Note:Scrapingdog is just one of many web scraping APIs available. Users should research alternatives like Zyte, Oxylabs, and ScraperAPI to find the solution that best fits their specific needs and budget. Some user reviews have reported negative experiences with Scrapingdog's customer service and performance, particularly for complex scraping tasks.",
      "snippetHighlightedWords": [
        "Note:"
      ],
      "referenceIndexes": [
        10,
        18,
        19,
        9,
        13
      ]
    }
  ]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.scrapingdog.com/google-ai-mode-api-documentation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
