> ## Documentation Index
> Fetch the complete documentation index at: https://help.decodo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Ads

> Web Scraping API Google Ads 模板

<Danger>
  核心版和高级版套餐已停止销售。请考虑迁移到一体化网络爬虫 API；[请点击此处查看指南](https://help.decodo.com/docs/cn/web-scraping-api-migration-guide).
</Danger>

`google_ads` 模板旨在获取 Google 搜索和 Google AI 概览结果,优先显示付费广告,并以最高的广告展示率为目标。它将输出限制为每页十个结果,最大化付费广告出现的可能性。

<Note>
  ### 有用链接

  * 有关优化 **AI 概览率** 的更多信息,请参阅 [**此处**](https://help.decodo.com/docs/ai-overview)。
  * 此目标可通过 [**Web API Advanced 计划**](https://dashboard.decodo.com/register?page=scrapers/pricing?plan=907766) 使用。
  * 此模板支持 [**实时**](https://help.decodo.com/docs/cn/web-scraping-api-real-time-requests) 和 [**异步**](https://help.decodo.com/docs/cn/web-scraping-api-asynchronous-requests) 集成方法。
  * 还支持 [**批量**](https://help.decodo.com/docs/cn/web-scraping-api-asynchronous-requests#queue-multiple-tasks) 请求。
</Note>

## 输入参数

Google Ads 模板可用的请求参数:

| 参数                        | 类型      | 必需 | 描述                                                                                                                                                                                                                                     |
| ------------------------- | ------- | -- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `target`                  | string  | ✅  | 目标类型必须设置为 `google_ads`。                                                                                                                                                                                                                |
| `query`                   | string  | ✅  | 搜索查询。                                                                                                                                                                                                                                  |
| `headless`                | string  |    | `html` 值启用 JavaScript 渲染。[**了解更多。**](https://help.decodo.com/docs/cn/web-scraping-api-javascript-rendering-deprecated)<br />`png` 值启用截图响应。[**了解更多。**](https://help.decodo.com/docs/cn/web-scraping-api-screenshot-response-deprecated) |
| `parse`                   | boolean |    | 设置为 `true` 时自动解析结果。<br />默认值为 `false`。                                                                                                                                                                                                 |
| `geo`                     | string  |    | 设置提交查询时使用的国家/地区。                                                                                                                                                                                                                       |
| `locale`                  | string  |    | 设置此值以更改 Google 搜索页面的网页界面语言。[**了解更多。**](https://help.decodo.com/docs/cn/web-scraping-api-google-interface-localization-deprecated)                                                                                                      |
| `device_type`             | string  |    | 指定设备类型和浏览器。[**了解更多。**](https://help.decodo.com/docs/cn/web-scraping-api-device-types-deprecated)                                                                                                                                       |
| `page_from`               | string  |    | 自定义起始页码,范围为 `1` 到 `10`。<br />默认值为 `1`。                                                                                                                                                                                                 |
| `page_count`              | integer |    | 自定义所需的页数,范围为 `1` 到 `10`。<br />每页提供 10 个搜索结果。<br />默认值为 `1`。                                                                                                                                                                            |
| `google_results_language` | string  |    | 以指定语言返回结果。查看所有选项 [**此处**](https://help.decodo.com/docs/cn/web-scraping-api-results-language-list-deprecated)。                                                                                                                          |
| `google_tbm`              | string  |    | 筛选特定类型内容的搜索结果(新闻、应用、视频等)。更多信息 [**此处**](https://stenevang.wordpress.com/2013/02/22/google-advanced-power-search-url-request-parameters/)。示例值:`app`。                                                                                     |
| `google_tbs`              | string  |    | 此参数包含按日期限制/排序结果等参数。更多信息 [**此处**](https://stenevang.wordpress.com/2013/02/22/google-advanced-power-search-url-request-parameters/)。示例:`qdr:w`(上周的结果)。                                                                                   |
| `google_nfpr`             | boolean |    | 设置为 `true` 时关闭拼写自动更正。<br />默认值为 `false`。                                                                                                                                                                                               |
| `xhr`                     | boolean |    | 设置为 `true` 以检索 XHR 和 fetch 请求列表。[**了解更多。**](https://help.decodo.com/docs/cn/web-scraping-api-fetch-and-xhr-deprecated)<br />默认值为 `false`。                                                                                              |
| `markdown`                | boolean |    | 设置为 `true` 以接收 Markdown 响应。[**了解更多。**](https://help.decodo.com/docs/cn/web-scraping-api-markdown-response-deprecated)<br />默认值为 `false`。                                                                                               |

### 请求示例

<CodeGroup>
  ```shellscript cURL theme={null}
  # 将 'TOKEN VALUE' 更新为您的授权令牌
  curl --request 'POST' \
          --url 'https://scraper-api.decodo.com/v2/scrape' \
          --header 'Accept: application/json' \
          --header 'Authorization: Basic TOKEN VALUE' \
          --header 'Content-Type: application/json' \
          --data '
      {
        "target": "google_ads",
        "query": "laptop",
        "headless": "html",
        "page_from": "1",
        "google_results_language": "en",
        "parse": true
      }
  '
  ```

  ```javascript Node theme={null}

  const scrape = async() => {
    const response = await fetch("https://scraper-api.decodo.com/v2/scrape", {
      method: "POST",
      body: JSON.stringify({
        "target": "google_ads",
        "query": "pizza",
        "headless": "html",
        "page_from": "1",
        "google_results_language": "en",
        "parse": true
      }),
      headers: {
        "Content-Type": "application/json",
        "Authorization": "Basic TOKEN VALUE" // 更新为您的授权令牌
      },
    }).catch(error => console.log(error));

    console.log(await response.json())
  }

  scrape()
  ```

  ```python Python theme={null}
  import requests
    
  url = "https://scraper-api.decodo.com/v2/scrape"
    
  payload = {
        "target": "google_ads",
        "query": "pizza",
        "headless": "html",
        "page_from": "1",
        "google_results_language": "en",
        "parse": True
  }
    
  headers = {
      "accept": "application/json",
      "content-type": "application/json",
      "authorization": "Basic TOKEN VALUE" # 更新为您的授权令牌
  }
    
  response = requests.post(url, json=payload, headers=headers)
    
  print(response.text)
  ```
</CodeGroup>

## 输出

下表提供了解析后的 `JSON` `results` 部分中字段的描述。请注意,字段数量可能会根据提供的搜索查询而有所不同。

| 结果键                      | 描述                                          |
| ------------------------ | ------------------------------------------- |
| `pla`                    | 产品广告及其详细信息的对象。                              |
| `paid`                   | 赞助结果及其详细信息的数组。                              |
| `images`                 | 图片结果及其详细信息的对象。                              |
| `flights`                | 航班及其详细信息的对象。                                |
| `organic`                | 自然列表及其详细信息的数组。                              |
| `organic_videos`         | 自然视频及其详细信息的数组。                              |
| `top_sights`             | 地标或景点及其详细信息的数组。                             |
| `jobs`                   | 职位及其详细信息的对象。                                |
| `local_service_ads`      | 赞助本地服务提供商的对象。                               |
| `video_box`              | 视频项目及其详细信息的对象。                              |
| `recipes`                | 食谱及其详细信息的对象。                                |
| `twitter`                | X(以前的 Twitter)结果及其详细信息的数组。                  |
| `knowledge`              | 从知识面板收集的信息对象。                               |
| `local_pack`             | 与查询相关的本地商家列表对象。                             |
| `item_carousel`          | 信息查询的说明性项目及其详细信息的对象。                        |
| `videos`                 | 视频及其详细信息的对象。                                |
| `hotels`                 | 与查询位置相关的酒店对象。                               |
| `apps`                   | 应用程序及其详细信息的数组。                              |
| `finance`                | 公司财务数据对象,包括股票价格、市值和其他重要指标。                  |
| `sports_games`           | 最近体育赛事的对象,包括比分、球队、比赛类型和关键亮点。                |
| `discussions_and_forums` | 讨论主题和论坛帖子的对象,包括其 URL、标题、来源和评论数。             |
| `featured_snippet`       | 从结果页面的自然部分检索的特定结果数组。                        |
| `top_stories`            | 当查询被识别为新闻导向时,文章及其详细信息的对象。                   |
| `popular_products`       | Google 购物产品列表的自然展示及其详细信息的对象。                |
| `related_searches`       | 在搜索结果页面的不同位置显示的一个或多个相关搜索块的数组。               |
| `related_questions`      | 相关基于问题的搜索查询及其详细信息的对象。                       |
| `what_people_are_saying` | 讨论主题和论坛帖子的数组,包括其 URL、标题、来源、热门评论、参与度指标和时间范围。 |
| `search_information`     | 与提交的搜索查询相关的信息对象。                            |

#### 响应示例

<CodeGroup>
  ```json JSON expandable theme={null}
  {
    "results": [
        {
            "content": {
                "results": {
                    "last_visible_page": 10,
                    "page": 1,
                    "parse_status_code": 12000,
                    "results": {
                        "ai_overviews": [
                            {
                                "answer_text": [
                                    {
                                        "pos": 1,
                                        "text": [
                                            "Laptops (ou notebooks) são computadores portáteis projetados para uso pessoal, alimentados por bateria e menores que computadores de mesa. Ideais para trabalho, estudos e lazer, variam de modelos básicos com processadores Intel Celeron a máquinas de alto desempenho para jogos (ex: Lenovo LOQ, Acer Nitro), geralmente com 8GB-16GB RAM e SSD."
                                        ]
                                    },
                                    {
                                        "pos": 2,
                                        "text": [
                                            "Principais Aspectos:"
                                        ]
                                    },
                                    {
                                        "pos": 3,
                                        "text": [
                                            "Para compra, modelos atuais focam em processadores Intel Core 13ª Ger ou Ryzen, focando em SSDs de 256GB256 cap G cap B256𝐺𝐵 a 512GB512 cap G cap B512𝐺𝐵 para maior velocidade."
                                        ]
                                    }
                                ],
                                "bullet_list": [
                                    {
                                        "list_title": "Principais características:",
                                        "points": [
                                            "Portabilidade: Projetado para ser transportado facilmente, pesando menos que um computador de mesa.",
                                            "Design Integrado: Tela, teclado, touchpad (mouse integrado) e bateria são parte de uma única unidade.",
                                            "Bateria Recarregável: Permite o uso sem estar conectado à energia por um período.",
                                            "Funcionalidade Completa: Executa softwares, navega na web, edita textos, assiste vídeos e joga, como um computador de mesa."
                                        ],
                                        "pos": 1
                                    },
                                    {
                                        "list_title": "Laptop vs.",
                                        "points": [
                                            "Origem: \"Laptop\" (colo) surgiu para diferenciar do \"desktop\" (mesa), e \"notebook\" (caderno) referia-se a modelos menores e mais leves, como cadernos universitários.",
                                            "Uso Atual: Hoje, os termos são usados como sinônimos no Brasil e no mundo para o mesmo tipo de computador portátil, sem distinção prática para o consumidor."
                                        ],
                                        "pos": 2
                                    }
                                ],
                                "pos_overall": 5,
                                "source_panel": {
                                    "items": [
                                        {
                                            "pos": 1,
                                            "source": "lenovo.com",
                                            "url": "https://www.lenovo.com/br/pt/glossary/what-is-laptop/"
                                        },
                                        {
                                            "pos": 2,
                                            "source": "pt.wikipedia.org",
                                            "url": "https://pt.wikipedia.org/wiki/Laptop"
                                        },
                                        {
                                            "pos": 3,
                                            "source": "magazineluiza.com.br",
                                            "url": "https://www.magazineluiza.com.br/busca/laptop/"
                                        },
                                        {
                                            "description": "Com tradução",
                                            "pos": 4,
                                            "source": "hp.com",
                                            "url": "https://translate.google.com/translate?u=https://www.hp.com/us-en/shop/tech-takes/laptop-vs-notebook&hl=pt&sl=en&tl=pt&client=sge"
                                        },
                                        {
                                            "pos": 5,
                                            "source": "amazon.com.br",
                                            "url": "https://www.amazon.com.br/b?ie=UTF8&node=16364755011"
                                        },
                                        {
                                            "pos": 6,
                                            "source": "tecnoblog.net",
                                            "url": "https://tecnoblog.net/responde/laptop-ou-notebook-entenda-a-confusao-em-torno-da-nomenclatura-do-portatil/"
                                        },
                                        {
                                            "pos": 7,
                                            "source": "tecmobile.com.br",
                                            "url": "https://www.tecmobile.com.br/blog/melhores-notebooks-para-trabalho/"
                                        },
                                        {
                                            "pos": 8,
                                            "source": "saldaodainformatica.com.br",
                                            "url": "https://www.saldaodainformatica.com.br/notebook"
                                        },
                                        {
                                            "pos": 9,
                                            "source": "techtudo.com.br",
                                            "url": "https://www.techtudo.com.br/guia/2025/12/vai-trocar-de-notebook-veja-o-que-realmente-importa-antes-de-gastar-edinfoeletro.ghtml"
                                        }
                                    ]
                                }
                            }
                        ],
                        "organic": [
                            {
                                "additional_info": [
                                    "4,7 classificação da loja (1,1 mil)",
                                    "Devolução em até 7 dia(s)"
                                ],
                                "desc": "Notebook 2 em 1 Positivo Duo Intel Celeron N4500 4GB RAM 128GB de Armazenamento Tela 11\" HD IPS touch com caneta capacitiva, Windows 11 Home – Cinza – C4128E.",
                                "favicon_text": "Amazon",
                                "pos": 1,
                                "pos_overall": 8,
                                "rating": 4.7,
                                "title": "Laptop Na Amazon.com.br",
                                "url": "https://www.amazon.com.br/laptop/s?k=laptop",
                                "url_shown": "https://www.amazon.com.br› laptop › k=laptop"
                            }
                        ],
                        "paid": [
                            {
                                "data_pcu": [
                                    "https://www.dell.com/",
                                    "https://ad.doubleclick.net/"
                                ],
                                "data_rw": "https://www.google.com/aclk?sa=L&ai=DChsSEwjlh4LK9rySAxW7a0gAHeyQMXcYACICCAEQAxoCY2U&co=1&ase=2&gclid=EAIaIQobChMI5YeCyva8kgMVu2tIAB3skDF3EAAYASAAEgIGJfD_BwE&category=acrcp_v1_37&sig=AOD64_1aRNCQCXSGs9ASkr5dkPTj58CGow&q&nis=4&adurl",
                                "desc": "Notebook Dell Com Processadores Intel® Core™ Ultra. Aproveite as promoções...",
                                "pos": 1,
                                "pos_overall": 1,
                                "sitelinks": {
                                    "expanded": [
                                        {
                                            "desc": "Confira nossas promoções no Site Aproveite Descontos em Notebooks",
                                            "title": "Ofertas em Notebooks Dell",
                                            "url": "https://www.dell.com/pt-br/shop/deals/promocao-notebook?sa=X&ved=2ahUKEwjo3_3J9rySAxUGD7kGHUy-OwUQqyQoAXoECBQQFw"
                                        }
                                    ]
                                },
                                "title": "Oferta Exclusiva Notebook Dell | Compre em até 12x Sem Juros",
                                "url": "https://www.dell.com/pt-br/shop/deals/promocao-notebook",
                                "url_shown": "https://www.dell.com"
                            }
                        ],
                        "search_information": {
                            "geo_location": "38305, Ituiutaba - MG",
                            "no_results_for_original_query_found": false,
                            "query": "laptop",
                            "showing_results_for": "laptop",
                            "time_taken_displayed": null,
                            "total_results_count": 2180000000
                        },
                        "total_results_count": 2180000000
                    },
                    "url": "https://www.google.com/search?q=laptop&sei=z7SBaYmJKrWB5OUP6IaCkQs"
                },
                "errors": [],
                "status_code": 12000,
                "task_id": "7424371505015820289"
            },
            "headers": {},
            "status_code": 200,
            "query": "laptop",
            "task_id": "7424371505015820289",
            "created_at": "2026-02-03 08:41:44",
            "updated_at": "2026-02-03 08:42:04"
        }
    ]
  }
  ```
</CodeGroup>

***

<Columns cols={2}>
  <Card title="支持" href="https://direct.lc.chat/12092754" cta="让我们聊聊！">
    需要帮助或只是想打个招呼？我们的支持团队全天候为您服务。 \
    您也可以随时通过电子邮件 [support@decodo.com](mailto:support@decodo.com) 联系我们。
  </Card>

  <Card title="反馈" href="mailto:feedback@decodo.com" cta="分享反馈">
    找不到您要找的内容？请求一篇文章！ \
    有反馈意见？分享您对我们如何改进的想法。
  </Card>
</Columns>
