Skip to content

Google AI Mode API ​

prod-global
GET
/api/v1/google/ai-mode
API health status
Healthy Available Limited Mostly unavailable No data
Loading health status...

Get Google aI Mode data, including generated answers, follow-up prompts, and cited links, for AI search experience monitoring.

Tags: Google AI

Parameters ​

NameRequiredTypeDefaultDescription
queryYesstringThe search query for Google Search (e.g., 'coffee shops', 'how to bake a cake').
htmlNobooleanfalseSet to true to return the raw HTML of the Google search results page alongside the structured data.
countryNostringusSet the target country code (e.g., 'us', 'uk') to localize results. See Google Countries.
uuleNostringEncoded location string (UULE) used to precisely localize Google search results. This is an advanced/technical parameter β€” if you’re not familiar with it, you can leave it empty and omit it.
locationNostringThe textual location name (e.g., 'New York, NY') to localize the search results.
safeNostringoffSafeSearch filter setting. Set to 'active' to filter adult content, or 'off' to disable it.

Copy Request ​

bash
curl -X GET "https://api.justserpapi.com/api/v1/google/ai-mode?query=coffee" \
  -H "X-API-Key: YOUR_API_KEY"
js
const res = await fetch("https://api.justserpapi.com/api/v1/google/ai-mode?query=coffee", {
  headers: { "X-API-Key": "YOUR_API_KEY" }
});
const data = await res.json();
console.log(data);
python
import requests

url = "https://api.justserpapi.com/api/v1/google/ai-mode"
headers = { "X-API-Key": "YOUR_API_KEY" }
params = {
  "query": "coffee"
}
response = requests.get(url, headers=headers, params=params)
print(response.json())
php
<?php
$url = "https://api.justserpapi.com/api/v1/google/ai-mode?query=coffee";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "X-API-Key: YOUR_API_KEY"
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	client := &http.Client{}
	req, _ := http.NewRequest("GET", "https://api.justserpapi.com/api/v1/google/ai-mode?query=coffee", nil)
	req.Header.Set("X-API-Key", "YOUR_API_KEY")
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}

Response ​

Loading the latest response example...