结构化 AI 输出
每次调用都会返回整齐解析好的答案区块,以及 Google 展示给用户的引用列表,可直接使用。
Google AI Mode 抓取 API 可让你将 Google AI Mode 的搜索结果提取为结构化 JSON。一次 API 请求即可获取 AI 生成的答案、引用来源、来源网址、网页标题、摘要、图片、视频、参考资料和相关搜索信息。
"text_blocks": [
{
"type": "paragraph",
"snippet": "Scrapingdog is a web scraping API that handles proxies, headless browsers, and CAPTCHAs, returning structured JSON from complex sites."
},
{
"type": "list",
"items": [
{
"type": "list_item",
"snippet": "Real Browser Rendering for JavaScript-heavy pages.",
"links": []
}
]
}
]"references": [
{
"title": "Scrapingdog: Scalable Web Scraping API for Data Extraction.",
"link": "https://www.scrapingdog.com/",
"snippet": "Real Browser Rendering. We use headless Chrome, so every JavaScript-heavy or lazy-loaded page opens just like it does ...",
"source": "Scrapingdog",
"thumbnail": "https://serpapi.com/...",
"favicon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAA...",
"index": 0
}
]"inline_images": [
{
"title": "Scrapingdog dashboard preview",
"link": "https://www.scrapingdog.com/",
"thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=...",
"source": "Scrapingdog"
}
]import requests
api_key = "APIKEY"
url = "https://api.scrapingdog.com/google/ai_mode"
params = {
"api_key": api_key,
"query": "scrapingdog",
"country": "us",
"html": "true"
}
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}")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 = "APIKEY";
String query = "scrapingdog";
String country = "us";
String html = "true";
// Construct the API endpoint URL
String apiUrl = "https://api.scrapingdog.com/google/ai_mode?api_key=" + apiKey
+ "&query=" + query
+ "&country=" + country
+ "&html=" + html;
URL url = new URL(apiUrl);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
int responseCode = connection.getResponseCode();
if (responseCode == 200) {
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder response = new StringBuilder();
while ((inputLine = reader.readLine()) != null) {
response.append(inputLine);
}
reader.close();
System.out.println(response.toString());
} else {
System.out.println("HTTP request failed with response code: " + responseCode);
}
connection.disconnect();
} catch (IOException e) {
e.printStackTrace();
}
}
}<?php
// Set the API key and request parameters
$api_key = 'APIKEY';
$query = 'scrapingdog';
$country = 'us';
$html = 'true';
// Set the API endpoint
$url = 'https://api.scrapingdog.com/google/ai_mode?api_key=' . $api_key . '&query=' . $query . '&country=' . $country . '&html=' . $html;
// 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 {
echo $response;
}
// Close the cURL session
curl_close($ch);require 'net/http'
require 'uri'
# Set the API key and request parameters
api_key = 'APIKEY'
query = 'scrapingdog'
country = 'us'
html = 'true'
# Construct the API endpoint URL
url = URI.parse("https://api.scrapingdog.com/google/ai_mode?api_key=#{api_key}&query=#{query}&country=#{country}&html=#{html}")
# 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
else
puts "HTTP request failed with code: #{response.code}, message: #{response.message}"
endconst axios = require('axios');
const api_key = 'APIKEY';
const url = 'https://api.scrapingdog.com/google/ai_mode';
const params = {
api_key: api_key,
query: 'scrapingdog',
country: 'us',
html: 'true',
};
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);
});text_blockstypeparagraphsnippetitemsreferencestitlelinksnippetsourceindexlistlist_itemsnippetlinkssourcethumbnailfaviconinline_imagestitlelinkthumbnailsourcequerycountryhtmlapi_key每次调用都会返回整齐解析好的答案区块,以及 Google 展示给用户的引用列表,可直接使用。
告诉 API 你想模拟的国家或城市,查看 AI 摘要在当地用户眼中的真实呈现效果。
追踪你的品牌在各类查询的 AI 答案中被提及和引用的情况,管理品牌声誉。
发现 Google AI 突出强调的关键事实、角度和来源,快速启动博客大纲和常见问题板块的创作。
轮换代理、无头渲染和反爬虫绕过均由我们代为处理,答案数据不会因 IP 被封而中断。
AI Mode 响应将摘要和来源一次性打包返回,减少了你需要抓取的页面数量。
发现哪些关键词触发了 AI Mode 页面,以及 Google 在答案中将哪些链接列为来源。
发布内容后重新抓取 AI Mode,检查你的网站是否随时间进入引用列表。
解析 AI 回答中的问答内容,自动在你的 CMS 中生成 FAQ 区块和结构化数据。
将完整的 AI 答案及其来源插入你的向量数据库,为聊天机器人和检索场景提供更丰富的上下文。
对比 Google 为你和竞品展示的答案文本与引用来源。
为敏感词设定按地区的定时调用,在答案出现违规信号时触发提醒。
注册即可获得免费额度,开始测试 AI Mode API。
从仪表盘获取你的专属 API 密钥,用它来抓取数据。
调用 GET /google/ai_mode,传入查询关键词、国家代码,并设置 html=true。
获取解析好的 text_blocks、引用来源的 references 数组,以及任何 inline_images。
用 200 免费额度开启你的网页抓取之旅。免费测试我们的服务,随时升级到以下任一套餐,也可随时取消。

I got the free trial and in less than a minute I already integrated with their API to scrape Google, matter of fact they had all the plug-and-play codes ready for me, It was seamless. I am about to upgrade as I have used up my trial credits.
United States
I love how you can use it to scrape data from Google.
Oslo, Norway
Scrapingdog is an awesome service. I use it with my Local Leads Sniper system and thanks to it I have been able to land a few clients since it gave me all the info that my client's Google Business Profile was missing. Great service!
Mexico
Reliable, and simple to use! It is also inexpensive and has packaged solutions for every need (Google, LinkedIn). Highly recommend.
France
是的,API 会根据你所选的订阅套餐设置速率限制。有关请求限制及如何高效管理的详细信息,请参阅文档或通过在线客服联系我们。
是的,除了 AI Mode 数据外,我们还提供 Google 搜索、Google AI 摘要、Google Lens 等专用 API。如果你想抓取 Bing,我们也提供 Bing 搜索 API。
我们的开发团队持续监控 Google AI Mode 页面结构的变化,并相应更新,以确保数据提取的一致性和可靠性。
每次 API 请求会根据你所使用的专用 API 消耗一定数量的额度。例如,Google 搜索 API 每次请求费用为 5 个额度。也就是说,你每向 Google 搜索 API 发起一次请求,账户中的可用额度就会被扣除 5 个。