Google AI 模式 API
API 健康状态
健康 可用 受限 大多不可用 无数据
正在加载健康状态...
获取 Google AI 模式数据,包括生成的答案、后续提示和引用链接,用于 AI 搜索体验监控。
标签: Google AI
请求参数
| 名称 | 必填 | 类型 | 默认值 | 说明 |
|---|---|---|---|---|
query | 是 | string | Google 搜索的查询词(例如 '咖啡店'、'如何烤蛋糕')。 | |
html | 否 | boolean | false | 设置为 true 以返回 Google 搜索结果页面的原始 HTML 以及结构化数据。 |
country | 否 | string | us | 设置目标国家代码(例如 'us'、'uk')以本地化结果。请参阅 Google 国家/地区。 |
uule | 否 | string | 用于精确定位 Google 搜索结果的编码位置字符串 (UULE)。这是一个高级/技术参数——如果您不熟悉,可以留空并省略。 | |
location | 否 | string | 文本位置名称(例如 '纽约,NY'),用于本地化搜索结果。 | |
safe | 否 | string | OFF | SafeSearch 过滤器设置。 可用值: - ACTIVE:过滤成人内容。也接受旧值 active。- OFF:禁用 SafeSearch 过滤。也接受旧值 off。 |
复制请求
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))
}响应
正在加载最新响应示例...
