# AI Overviews

The `google_search` 和 `google_ads` 来源可以从 Google Search 结果中返回 AI Overviews，适用于所有受支持的全球区域。 `ai_overviews` 结果数组支持在单个响应中包含多个 AI 块，包括“People also ask”和“Things to know”等部分。

要尽可能提高获取完整渲染的 AI Overviews 内容的概率，必须包含以下参数：

| 参数                | 值                              |
| ----------------- | ------------------------------ |
| `source`          | `google_search` 或 `google_ads` |
| `render`          | `html`                         |
| `user_agent_type` | `desktop` 或 `mobile`           |

使用这些参数后，你可以通过一次请求同时获取通用响应和 AI Overviews 内容。

{% hint style="danger" %}
Google 会动态生成此内容或加载缓存版本，因此即使参数相同，AI 生成的答案也可能随时间变化。
{% endhint %}

{% hint style="success" %}
探索[ **数据字典**](#data-dictionary) 了解部分 AI Overviews SERP 功能。
{% endhint %}

## AI Overviews 地区可用性

Google AI Overviews 在大多数国家/地区都可用，少数例外除外。目前被排除的主要国家/地区是：

* 法国
* 摩纳哥
* 中国
* 伊朗
* 苏丹
* 叙利亚
* 古巴
* 朝鲜

{% hint style="warning" %}
Google AI Overviews 功能正在持续推出，并会随着时间加入更多国家/地区。
{% endhint %}

## 请求示例

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

```shell
curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
        "source": "google_search",
        "query": "how to sell on amazon",
        "render": "html",
        "user_agent_type": "desktop",
        "parse": true
        
    }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
from pprint import pprint

# Updated payload.
payload = {
    'source': 'google_search',
    'query': 'how to sell on amazon',
    'render': 'html',
    'user_agent_type': 'desktop',
}

# Get response.
response = requests.request(
    'POST',
    'https://realtime.oxylabs.io/v1/queries',
    auth=('user', 'pass1'),
    json=payload,
)

# Print prettified response to stdout.
pprint(response.json())
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$params = [
    'source' => 'google_search',
    'query' => 'how to sell on amazon',
    'render' => 'html',
    'user_agent_type' => 'desktop',
];

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://realtime.oxylabs.io/v1/queries");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, "user" . ":" . "pass1");

$headers = [];
$headers[] = "Content-Type: application/json";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);
```

{% endtab %}

{% tab title="HTTP" %}

```http
https://realtime.oxylabs.io/v1/queries?source=google_search&query=Emporio%20Armani%20EA3192&render=html&user_agent_type=desktop&access_token=12345abcde
```

{% endtab %}

{% tab title="JSON" %}

```json
{
    "source": "google_search",
    "query": "how to sell on amazon",
    "render": "html",
    "user_agent_type": "desktop"
}
```

{% endtab %}
{% endtabs %}

我们的示例使用同步 [**Realtime**](https://developers.oxylabs.io/documentation/cn/zhua-qu-jie-jue-fang-an/web-scraper-api/integration-methods/realtime) 集成方式。如果你想使用 [**Proxy Endpoint**](https://developers.oxylabs.io/documentation/cn/zhua-qu-jie-jue-fang-an/web-scraper-api/integration-methods/proxy-endpoint) 或异步 [**Push-Pull**](https://developers.oxylabs.io/documentation/cn/zhua-qu-jie-jue-fang-an/web-scraper-api/integration-methods/push-pull) 集成，请参考 [**集成方式**](https://developers.oxylabs.io/documentation/cn/zhua-qu-jie-jue-fang-an/web-scraper-api/integration-methods) 部分。

## 请求参数值

### 通用

使用 AI Overviews 抓取 Google Web 搜索结果的基础设置和自定义选项。

<table><thead><tr><th width="191">参数</th><th width="377.3333333333333">描述</th><th>默认值</th></tr></thead><tbody><tr><td><mark style="background-color:green;"><strong>source</strong></mark></td><td>设置爬虫。使用 <code>google_search</code> 或 <code>google_ads</code>.</td><td><code>google_search</code></td></tr><tr><td><mark style="background-color:green;"><strong>query</strong></mark></td><td>要搜索的关键词或短语。</td><td>-</td></tr><tr><td><code>render</code></td><td>设置为时启用 JavaScript 渲染 <code>html</code>. <a href="../../features/js-rendering-and-browser-control/javascript-rendering"><strong>更多信息</strong></a><strong>.</strong></td><td>-</td></tr><tr><td><code>context</code>:<br><code>expand_aio</code></td><td>设置为 <code>true</code> 以展开 Google AI Overviews（需启用 JavaScript 渲染）。</td><td><code>false</code></td></tr><tr><td><code>parse</code></td><td>设置为时返回解析后的数据 <code>true</code>.</td><td><code>false</code></td></tr><tr><td><code>callback_url</code></td><td>回调端点的 URL。 <a href="../../../integration-methods/push-pull#callback"><strong>更多信息</strong></a>.</td><td>-</td></tr><tr><td><code>user_agent_type</code></td><td>设备类型和浏览器。使用 <code>desktop</code> 或 <code>mobile</code>.</td><td><code>desktop</code></td></tr></tbody></table>

&#x20;   \- 必填参数

#### Google 高级搜索运算符

在抓取时，将 Google 高级搜索运算符与查询结合使用会很有帮助。这样可以自定义搜索范围，确保结果更相关、更聚焦。了解这些特殊命令 [**这里**](https://ahrefs.com/blog/google-advanced-search-operators/) 和 [**这里**](https://www.semrush.com/kb/831-how-to-use-google-advanced-search-operators)。请参见下面的示例查询。

```json
{
    "source": "google_search",
    "query": "iphone 15 launch inurl:apple", 
    "render": "html",
    "user_agent_type": "desktop"
}
```

### 本地化

将搜索结果适配到特定地理位置和语言。

<table><thead><tr><th width="222">参数</th><th width="350.3333333333333">描述</th><th>默认值</th></tr></thead><tbody><tr><td><code>geo_location</code></td><td>结果应适配的地理位置。正确使用此参数对获取正确数据极其重要。更多信息请阅读我们建议的 <code>geo_location</code> 参数结构 <a href="../../../features/localization/serp-localization#google"><strong>这里。</strong></a></td><td>-</td></tr><tr><td><code>locale</code></td><td><code>Accept-Language</code> header 值，用于更改 Google 搜索页面 Web 界面的语言。 <a href="../../../features/localization/domain-locale-results-language#locale-1"><strong>更多信息</strong></a>.</td><td>-</td></tr><tr><td><code>context</code>:<br><code>results_language</code></td><td>结果语言。受支持的 Google 语言列表可在此查看 <a href="../../../features/localization/domain-locale-results-language#results-language"><strong>这里</strong></a>。<br>了解如何使用上下文参数 <a href="#context-parameters"><strong>这里</strong></a>.</td><td>-</td></tr></tbody></table>

### 分页

用于管理搜索结果分页和获取的控制项。

<table><thead><tr><th width="222">参数</th><th width="350.3333333333333">描述</th><th width="167">默认值</th></tr></thead><tbody><tr><td><code>start_page</code></td><td>起始页码。</td><td><code>1</code></td></tr><tr><td><code>pages</code></td><td>要获取的页数。</td><td><code>1</code></td></tr><tr><td><code>limit</code></td><td>每页要获取的结果数量。</td><td><code>10</code></td></tr><tr><td><code>context</code>:<code>limit_per_page</code></td><td>使用相同的 IP 地址和会话（Cookie 集）抓取多页。通过在 JSON 数组中使用 <code>page</code> 键指定页码，并使用 <code>limit</code> 键指明每页的自然搜索结果数量，可以尽量减少跨页出现重复自然搜索结果的可能性（例如第一页最后一个自然搜索结果与第二页第一个自然搜索结果相同）。 <a href="#request-sample"><strong>查看示例</strong></a><strong>.</strong></td><td>-</td></tr></tbody></table>

#### 支持连续滚动

Web Scraper API 完全支持 Google Search 连续滚动。它会自动检测连续滚动布局，高效加载请求的自然搜索结果，无需任何额外参数。

#### 每页限制

{% hint style="warning" %}
由于 Google 最近的限制变更，我们已调整 Web Scraper API 的行为。每页最大结果数将与 Google 的自然搜索输出一致，通常为 10 条结果。
{% endhint %}

要使用此功能，请包含一个 JSON 数组，其中包含带有以下数据的 JSON 对象：

<table><thead><tr><th width="142">参数</th><th width="446.3333333333333">描述</th><th>示例</th></tr></thead><tbody><tr><td><code>page</code></td><td>你想抓取的页面编号。任何大于 <code>0</code> 的整数值都可以</td><td><code>1</code></td></tr><tr><td><code>limit</code></td><td>该页面上的结果数量。任何介于 <code>1</code> 和 <code>100</code> （含）之间的整数值都可以。</td><td><code>90</code></td></tr></tbody></table>

#### 请求示例

```json
{
    "source": "google_search",
    "query": "how to sell on amazon",
    "render": "html",
    "user_agent_type": "dekstop",
    "parse": true,
    "context": [
        {
            "key": "limit_per_page",
            "value": [
                {"page": 1, "limit": 10},
                {"page": 2, "limit": 90}
                    ]
        }]
}
```

### 过滤

根据各种条件过滤和细化搜索结果的选项。了解如何使用上下文参数 [**这里**](#context-parameters).

<table><thead><tr><th width="245">参数</th><th width="350.3333333333333">描述</th><th>默认值</th></tr></thead><tbody><tr><td><code>context</code>:<br><code>filter</code></td><td>将此参数的值设置为 <code>0</code> 后，你可以看到原本会因与其他结果相似而被排除的结果。</td><td><code>1</code></td></tr><tr><td><code>context</code>:<br><code>safe_search</code></td><td>安全搜索。设置为 <code>true</code> 以启用它。</td><td><code>false</code></td></tr><tr><td><code>context</code>:<br><code>udm</code></td><td><code>udm</code> 参数允许在不同搜索标签之间切换，例如图片、地点或视频，以自定义显示的结果类型。查找可接受的值 <a href="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrXw45naRpCZ0Ku9AjY1%2Fuploads%2FeoShpvYuZlb4hGpCIXNG%2Fudm_values%20(eu%2Bus).json?alt=media&#x26;token=a6b77fab-b170-478c-b06f-b8fbf7ab64c7"><strong>这里</strong></a>.</td><td>-</td></tr><tr><td><code>context</code>:<br><code>tbm</code></td><td>待匹配或 <code>tbm</code> 参数。可接受的值为： <code>app</code>, <code>blg</code>, <code>bks</code>, <code>dsc</code>, <code>isch</code>, <code>nws</code>, <code>pts</code>, <code>plcs</code>, <code>rcp</code>, <code>lcl</code></td><td>-</td></tr><tr><td><code>context</code>:<br><code>tbs</code></td><td>此参数类似于一个容器，用于承载更隐蔽的 Google 参数，例如按日期限制/排序结果以及其他筛选条件，其中一些取决于 <code>tbm</code> 参数（例如 <code>tbs=app_os:1</code> 仅在 <code>tbm</code> 值下可用 <code>app</code>）。更多信息 <a href="https://stenevang.wordpress.com/2013/02/22/google-advanced-power-search-url-request-parameters/"><strong>这里</strong></a>.</td><td>-</td></tr></tbody></table>

{% hint style="warning" %}
`udm` 和 `tbm` 上下文参数不能在同一次抓取请求中一起使用；请只选择一个。同时使用可能会导致冲突或意外行为。
{% endhint %}

### 其他

用于特殊需求的附加高级设置和控制。

<table><thead><tr><th width="222">参数</th><th width="350.3333333333333">描述</th><th>默认值</th></tr></thead><tbody><tr><td><code>context</code>:<br><code>fpstate</code></td><td>将 <code>fpstate</code> 值设置为 <code>aig</code> 会让 Google 加载更多应用。此参数仅在与 <code>render</code> 参数一起使用时才有用。</td><td>-</td></tr><tr><td><code>context</code>:<br><code>nfpr</code></td><td><code>true</code> 将关闭拼写自动更正</td><td><code>false</code></td></tr></tbody></table>

### 上下文参数

所有上下文参数都应作为对象添加到 `context` 数组中，并带有 `key` 和 `值下可用` 对，例如：

```json
...
"context": [
    {
        "key": "filter",
        "value": "0"
    }
]
...
```

## 数据结构与处理

### 数据字典

AI Overviews SERP 功能中可用的所有键都在下表中定义：

<table><thead><tr><th width="249">键（results.ai_overview）</th><th width="383">描述</th><th>类型</th></tr></thead><tbody><tr><td><code>answer_text</code></td><td>有关 Google Search 查询词的通用信息。</td><td>数组</td></tr><tr><td><code>bullet_list</code></td><td>表示 AI Overviews SERP 功能中以项目符号列表渲染的条目相关信息。</td><td>数组</td></tr><tr><td><code>products</code></td><td>带有各自详情的产品列表。</td><td>对象</td></tr><tr><td><code>source_panel</code></td><td>用于在 Google SERP 功能中生成 AI Overviews 结果的来源列表。</td><td>对象</td></tr><tr><td><code>additional_questions</code></td><td>带有各自详情的附加问题列表。</td><td>对象</td></tr><tr><td><code>recipes</code></td><td>带有各自详情的食谱列表。</td><td>对象</td></tr><tr><td><code>info_list</code></td><td>最常用于表示与搜索查询相关流程步骤的信息列表。</td><td>数组</td></tr><tr><td><code>pos_overall</code></td><td>表示 AI Overviews SERP 功能结果在所有可用 Google SERP 结果中的位置。</td><td>整数</td></tr></tbody></table>

### 处理多个 AI Overviews

由于 AI Overviews 现在以数组形式返回，你需要遍历它们：

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

```javascript
// 处理响应中的所有 AI Overviews
response.results.ai_overviews.forEach((aiOverview, index) => {
  console.log(`Processing AI Overview #${index + 1}`);
  // 处理各个组件
  if (aiOverview.answer_text) {
    // 处理答案文本
  }
  if (aiOverview.bullet_list) {
    // 处理项目符号列表
  }
  // 依此类推...
});
```

{% endtab %}

{% tab title="Python" %}

```python
# 处理响应中的所有 AI Overviews
for index, ai_overview in enumerate(response['results']['ai_overviews']):
    print(f"Processing AI Overview #{index + 1}")
    # 处理各个组件
    if 'answer_text' in ai_overview:
        answer_texts = ai_overview['answer_text']
        for answer in answer_texts:
            # 处理每个答案文本
            if 'text' in answer:
                for text_item in answer['text']:
                    print(f"Answer text: {text_item}")
    
    if 'bullet_list' in ai_overview:
        bullet_lists = ai_overview['bullet_list']
        for bullet_list in bullet_lists:
            if 'list_title' in bullet_list:
                print(f"List title: {bullet_list['list_title']}")
            if 'points' in bullet_list:
                for point in bullet_list['points']:
                    print(f"- {point}")
    # 继续处理其他元素...
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
// 处理响应中的所有 AI Overviews
if (isset($response['results']['ai_overviews']) && is_array($response['results']['ai_overviews'])) {
    foreach ($response['results']['ai_overviews'] as $index => $aiOverview) {
        $indexNumber = $index + 1;
        echo "Processing AI Overview #{$indexNumber}\n";
        
        // 处理答案文本
        if (isset($aiOverview['answer_text']) && is_array($aiOverview['answer_text'])) {
            foreach ($aiOverview['answer_text'] as $answer) {
                if (isset($answer['text']) && is_array($answer['text'])) {
                    foreach ($answer['text'] as $textItem) {
                        echo "Answer text: {$textItem}\n";
                    }
                }
            }
        }
        
        // 处理项目符号列表
        if (isset($aiOverview['bullet_list']) && is_array($aiOverview['bullet_list'])) {
            foreach ($aiOverview['bullet_list'] as $bulletList) {
                if (isset($bulletList['list_title'])) {
                    echo "List title: {$bulletList['list_title']}\n";
                }
                if (isset($bulletList['points']) && is_array($bulletList['points'])) {
                    foreach ($bulletList['points'] as $point) {
                        echo "- {$point}\n";
                    }
                }
            }
        }
        // 继续处理其他元素...
    }
}
?>
```

{% endtab %}
{% endtabs %}

在大多数情况下，只会有一个 AI Overview，但你的代码应准备好处理多个条目。

下面按不同搜索查询分类，探索 AI Overviews 结果示例： [**项目**](#item), [**食谱**](#recipe), [**说明**](#instruction).

### 项目

以下示例使用了“Emporio Armani EA3192”查询。

<figure><img src="https://lh7-us.googleusercontent.com/Ecp6t0NHm0ZDg2qopAN4uLilI5onTqfLK8i_GdT_NTeEawPopV-CFGMqHwfi7mX3sTRgD7PnWGks1gsn3yu5Ekmo5tadyQQyMgGpbx0qSwhHlnWSs4RO9_Y7f-0Bww8SIaF4uD9X3z8xO4tIfd948rY" alt=""><figcaption></figcaption></figure>

```json
...
  "ai_overviews": [
    {
      "answer_text": [
        {
          "text": [
            "Emporio Armani 是一个以永恒设计和对意大利工艺的坚持而闻名的奢侈品牌。",
            "Emporio Armani EA3192 是一副为男士设计的处方眼镜。",
            "它们采用矩形镜框，由低致敏、轻质塑料制成。",
            "镜片具有防紫外线和防反射功能。",
            "以下是一些来自评论的见解："
          ],
          "pos": 1
        }
      ],
      "bullet_list": [
        {
          "list_title": "优点",
          "points": [
            "舒适",
            "品牌标识极简"
          ],
          "pos": 1
        }
      ],
      "products": {
        "items": [
          {
            "product_name": "Emporio Armani 男士眼镜 闪亮黑 尺寸：53",
            "price": "$163.00",
            "previous_price": null,
            "seller": "Lenscrafters",
            "shipping": "免费送货",
            "url": "https://www.lenscrafters.com/lc-us/emporio-armani/8056597975810?srsltid=AfmBOoqWO55KIJevhQp_c5OAp0JOM_8Uza3_gCvn9S4x4Vz342AUSQewzJI",
            "pos": 1
          }
        ]
      },
      "source_panel": {
        "items": [
          {
            "url": "https://www.italist.com/magazine/what-is-emporio-armani/#:~:text=Emporio%20Armani%20is%20a%20luxury,reinforce%20the%20perception%20of%20luxury.",
            "source": "italist.com",
            "date": "2023年5月5日",
            "title": "什么是 Emporio Armani，Emporio Armani 是奢侈品牌吗？",
            "pos": 1
          },
        ...
        ]
      },
      "additional_questions": {
        "items": [
          {
           "question": "Emporio Armani 和 Giorgio Armani 是一样的吗？",
           "pos": 1
          }
        ]
      },
      "pos_overall": 1
    }
  ],
...
```

#### 答案文本

<table><thead><tr><th width="273">键（results.ai_overviews.answer_text）</th><th width="368">描述</th><th>类型</th></tr></thead><tbody><tr><td><code>text</code></td><td>Google Search 查询的简短答案。</td><td>数组</td></tr><tr><td><code>pos</code></td><td>表示某个项目在所有 AI Overviews 答案结果中的位置。</td><td>整数</td></tr></tbody></table>

**项目符号列表**

<table><thead><tr><th width="268">键（results.ai_overviews.bullet_list）</th><th width="364">描述</th><th>类型</th></tr></thead><tbody><tr><td><code>list_title</code></td><td>项目符号列表的标题。</td><td>字符串</td></tr><tr><td><code>points</code></td><td>项目符号列表中渲染的条目。所有条目以逗号分隔。</td><td>数组</td></tr><tr><td><code>pos</code></td><td>表示某个项目在所有 AI Overviews 项目符号列表结果中的位置。</td><td>整数</td></tr></tbody></table>

**产品**

<table><thead><tr><th width="271">键（results.ai_overviews.products）</th><th width="364">描述</th><th>类型</th></tr></thead><tbody><tr><td><code>items</code></td><td>带有各自详情的产品列表。</td><td>数组</td></tr><tr><td><code>items.product_name</code></td><td>产品名称。</td><td>字符串</td></tr><tr><td><code>items.price</code></td><td>产品当前价格。</td><td>字符串</td></tr><tr><td><code>items.previous_price</code></td><td>产品初始价格（如适用）。</td><td>字符串</td></tr><tr><td><code>items.seller</code></td><td>产品卖家。</td><td>字符串</td></tr><tr><td><code>items.shipping</code></td><td>产品可用的配送类型。</td><td>字符串</td></tr><tr><td><code>items.url</code></td><td>产品的 URL。</td><td>字符串</td></tr><tr><td><code>items.pos</code></td><td>表示某个项目在所有 AI Overviews 产品结果中的位置。</td><td>整数</td></tr></tbody></table>

#### 来源面板

<table><thead><tr><th width="274">键（results.ai_overviews.source_panel）</th><th width="353">描述</th><th>类型</th></tr></thead><tbody><tr><td><code>items</code></td><td>用于在 Google SERP 功能中生成 AI Overviews 结果的来源列表。</td><td>对象</td></tr><tr><td><code>items.url</code></td><td>网站的 URL。</td><td>字符串</td></tr><tr><td><code>items.source</code></td><td>网站名称。</td><td>字符串</td></tr><tr><td><code>items.date</code></td><td>文章发布的日期。</td><td>字符串</td></tr><tr><td><code>items.title</code></td><td>文章标题。</td><td>字符串</td></tr><tr><td><code>items.pos</code></td><td>表示某个项目在所有 AI Overviews 来源面板结果中的位置。</td><td>整数</td></tr></tbody></table>

#### 附加问题

<table><thead><tr><th width="275">键（results.ai_overviews.additional_questions）</th><th width="343">描述</th><th>类型</th></tr></thead><tbody><tr><td><code>items.question</code></td><td>与原始搜索查询相关的、以逗号分隔的附加问题列表。</td><td>数组</td></tr><tr><td><code>items.pos</code></td><td>表示某个项目在所有 AI Overviews 附加问题结果中的位置。</td><td>整数</td></tr></tbody></table>

### 食谱

以下示例使用了“apple pie 的食谱”查询。

<figure><img src="https://2655358775-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrXw45naRpCZ0Ku9AjY1%2Fuploads%2FBqo3YSylUPTuTuoo5wPH%2Frecipe_for_an_apple_pie.png?alt=media&#x26;token=fba1b0f9-4ac8-4421-abb8-f35b03e542b1" alt=""><figcaption></figcaption></figure>

```json
...  
 "ai_overviews": [
   {
      "recipes": {
        "items": [
          {
            "description": "这个简单食谱包括自制派皮、Granny Smith 苹果和温暖香料。",
            "image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/...",
            "source": "Allrecipes",
            "rating": "4.8",
            "rating_count": "13K",
            "duration": "90 min",
            "url": "https://www.allrecipes.com/recipe/12682/apple-pie-by-grandma-ople/",
            "title": "Grandma Ople 的苹果派"
          },
...
        ]
      }
    }
  ],
...
```

**食谱**

<table><thead><tr><th width="234">键（results.ai_overviews.recipes）</th><th width="375">描述</th><th>类型</th></tr></thead><tbody><tr><td><code>items</code></td><td>带有各自详情的食谱列表。</td><td>数组</td></tr><tr><td><code>items.description</code></td><td>食谱的简短描述。</td><td>字符串</td></tr><tr><td><code>items.image</code></td><td>食谱的 base64 编码缩略图。</td><td>字符串</td></tr><tr><td><code>items.source</code></td><td>发布该食谱的网站名称。</td><td>字符串</td></tr><tr><td><code>items.rating</code></td><td>食谱评分。</td><td>字符串</td></tr><tr><td><code>items.rating_count</code></td><td>评分数量。</td><td>字符串</td></tr><tr><td><code>items.duration</code></td><td>准备这道菜所需的时间。</td><td>字符串</td></tr><tr><td><code>items.url</code></td><td>完整食谱的 URL。</td><td>字符串</td></tr><tr><td><code>items.title</code></td><td>食谱标题。</td><td>字符串</td></tr></tbody></table>

以下示例使用了“多汁嫩牛排的食谱”查询。

<figure><img src="https://2655358775-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrXw45naRpCZ0Ku9AjY1%2Fuploads%2FnSGAvuTLJoNsEKNxZaa6%2Frecipe_of_a_juicy_succulent_steak.png?alt=media&#x26;token=709025b4-80a5-4a43-8d9f-7429bc4da446" alt=""><figcaption></figcaption></figure>

#### 信息列表

<table><thead><tr><th width="276">键（results.ai_overviews.info_list）</th><th width="353">描述</th><th>类型</th></tr></thead><tbody><tr><td><code>list_title</code></td><td>列表的标题。</td><td>字符串</td></tr><tr><td><code>list_items</code></td><td>包含带有各自详细信息的项目列表。</td><td>数组</td></tr><tr><td><code>list_items.title</code></td><td>列表中该部分的标题。</td><td>字符串</td></tr><tr><td><code>list_items.content</code></td><td>该部分的简短描述。</td><td>数组</td></tr><tr><td><code>list_item.pos</code></td><td>表示某个项目在所有 AI Overviews 信息列表结果中的位置的指示器。</td><td>整数</td></tr></tbody></table>

### 说明

在以下示例中，使用了“docker exec commands explained”查询。

<figure><img src="https://2655358775-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrXw45naRpCZ0Ku9AjY1%2Fuploads%2Fb3YBmQk5cYVULbAAPokZ%2Fdocker_exec_command_explained.png?alt=media&#x26;token=bf50d5e7-b4f1-48a0-ab76-80475d2323fa" alt=""><figcaption></figcaption></figure>

```json
...
  "ai_overviews": [
    {
      "answer_text": [
        {
          "text": [
            “The docker execExecIn computing, exec 是操作系统的一项功能，它会在已存在进程的上下文中运行一个可执行文件，替换之前的可执行文件...”，
            “它是一个强大的工具，可用于多种任务，例如排查容器问题、运行脚本或安装软件。”
          ],
          "pos": 1
        },
        {
          "text": [
            “docker exec 命令的语法如下：”
          ],
          “command": [
            “docker exec [OPTIONS] CONTAINER COMMAND [ARG...]”
          ],
          “pos": 2
        },
        ...
        }
      ]
    }
  ],
...
```

**答案文本命令**

{% hint style="info" %}
注意：详细信息以与以下内容相同的数组形式渲染 [**项目相关搜索查询**](#answer-text)，不过，对于指令相关类型的查询，会出现一种新的键类型（command）
{% endhint %}

<table><thead><tr><th width="268">键（results.ai_overviews.answer_text）</th><th width="342">描述</th><th>类型</th></tr></thead><tbody><tr><td><code>command</code></td><td>给计算机或软件的、用于执行特定任务的指令。</td><td>字符串</td></tr></tbody></table>


---

# 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://developers.oxylabs.io/documentation/cn/zhua-qu-jie-jue-fang-an/web-scraper-api/targets/google/ai-overviews.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.
