# 设置实时“Google Ads 搜索量”任务

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/keywords_data/google_ads/search_volume/live`

**Tags:** DataForSEO

一组 `keywords` 的 Google Ads 搜索量。返回 `keyword`、`location_code`、`language_code`、`search_partners`、`competition`、`competition_index`、`search_volume`、`low_top_of_page_bid`、`high_top_of_page_bid`、`cpc` 和 `monthly_searches`，以及 Google 更正词条时的 `spell`。采用 DataForSEO 的信封结构：数据位于 `tasks[0].result`，结果状态位于 `tasks[0].status_code`——被拒绝的请求仍会返回 HTTP 200。这是经典搜索量数字；若要了解人们向助手提问的频率，请使用 `post_dataforseo_ai_keyword_volume_live`。本端点的提交与获取配套端点会以相同价格异步完成同样的工作，适合大到无法等待的批次。

### 计费参考

- 计量方式：按上报的响应成本计量。
- 参考请求估算：0.09 美元。
- 参考客户倍率：1.0。不得对已结算的客户金额再次应用。

仅供参考的元数据，不是账户报价、保证价格或消费上限。资源额度不同于 Felo 额度。最终扣费以 Felo 计费记录为准。

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Request body

Required: **no**

### application/json

Schema:

```json
{
  "type": "array",
  "items": {
    "type": [
      "object",
      "null"
    ],
    "oneOf": [
      {
        "type": "object",
        "properties": {
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "<em>关键词</em><br><strong>必填字段</strong><br>可指定的关键词数量上限：1000<br>每个关键词的字符数上限：80<br>每个关键词短语的词数上限：10<br>指定的关键词将转换为小写格式<br><strong>注意 1：</strong><a href=\"https://dataforseo.com/help-center/no-search-volume-data-for-some-keywords\" target=\"_blank\" rel=\"noopener noreferrer\">Google Ads 可能对某些关键词组不返回数据</a>；<br><strong>注意 2：</strong><a href=\"https://dataforseo.com/help-center/sv-broad-exact-phrase-match\" target=\"_blank\" rel=\"noopener noreferrer\">Google Ads 会为相似关键词组提供合并的搜索量数值</a><br>要获取相似关键词的搜索量，建议将这些关键词放在单独的请求中提交；<br><strong>注意 3：</strong>Google Ads 不允许使用某些符号和字符（例如 UTF 符号、表情符号），因此设置任务时不能使用这些符号和字符；<br>要了解可以使用哪些符号和字符，请参阅<a href=\"https://dataforseo.com/help-center/using-symbols-in-keywords-when-setting-a-google-ads-task\" target=\"_blank\" rel=\"noopener noreferrer\">这篇文章</a><p>有关 DataForSEO API 中 <code>keyword</code> 和 <code>keywords</code> 字段的规则与限制，请参阅这篇<a href=\"https://dataforseo.com/help-center/rules-and-limitations-of-keyword-and-keywords-fields-in-dataforseo-apis\" rel=\"noopener noreferrer\" target=\"_blank\">帮助中心文章</a>"
          },
          "location_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>搜索引擎地点全名</em><br>可选字段<br>如果未指定地点，你将获得全球结果，即所有可用地点的结果；<br><strong>如果使用此字段，则无需指定 <code>location_code</code> 或 <code>location_coordinate</code></strong><br>可单独向 <code>https://api.dataforseo.com/v3/keywords_data/google_ads/locations</code> 发起请求，获取搜索引擎的可用地点及其 <code>location_name</code> 列表<br>示例：<br><code class=\"long-string\">London,England,United Kingdom</code>"
          },
          "location_code": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>搜索引擎地点代码</em><br>可选字段<br>如果未指定地点，你将获得全球结果，即所有可用地点的结果；<br><strong>如果使用此字段，则无需指定 <code>location_name</code> 或 <code>location_coordinate</code></strong>；<br>可单独向 <code>https://api.dataforseo.com/v3/keywords_data/google_ads/locations</code> 发起请求，获取搜索引擎的可用地点及其 <code>location_code</code> 列表<br>示例：<br><code class=\"long-string\">2840</code>"
          },
          "location_coordinate": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>地点的 GPS 坐标</em><br>可选字段<br>如果未指定地点，你将获得全球结果，即所有可用地点的结果；<br><strong>如果使用此字段，则无需指定 <code>location_name</code> 或 <code>location_code</code></strong>；<br><code>location_coordinate</code> 参数应采用 <em>\"latitude,longitude\"</em> 格式；<br><strong>数据将按指定坐标所属的国家/地区提供</strong>；<br>示例：<br><code class=\"long-string\">52.6178549,-155.352142</code>"
          },
          "language_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>搜索引擎语言全名</em><br>可选字段<br>可单独向 <code>https://api.dataforseo.com/v3/keywords_data/google_ads/languages</code> 发起请求，获取搜索引擎的可用语言及其 <code>language_name</code> 列表<br>示例：<br><code class=\"long-string\">English</code>"
          },
          "language_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>搜索引擎语言代码</em><br>可选字段<br>可单独向 <code>https://api.dataforseo.com/v3/keywords_data/google_ads/languages</code> 发起请求，获取搜索引擎的可用语言及其 <code>language_code</code> 列表<br>示例：<br><code class=\"long-string\">en</code>"
          },
          "search_partners": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>包含 Google 搜索合作伙伴</em><br>可选字段<br>如果指定 <code class=\"prettyprint\">true</code>，结果将覆盖<a href=\"https://support.google.com/google-ads/answer/1722047?hl=en\" target=\"_blank\" rel=\"noopener noreferrer\">Google 及合作伙伴网站</a>中托管 Google 搜索的自有、运营和联合网络；<br>默认值：<code>false</code> - 结果针对 Google 搜索网站返回"
          },
          "date_from": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>时间范围的开始日期</em><br>可选字段<br>日期格式：<code>\"yyyy-mm-dd\"</code><br>最小值：当前日期往前 4 年<br>默认返回过去 12 个月的数据；<br><strong>注意</strong>：指定的日期不得晚于 <code>date_to</code> 中指定的日期和/或昨天的日期；如果 <a href=\"/v3/keywords_data/google_ads/status/\" target=\"_blank\" rel=\"noopener noreferrer\">Status 端点</a> 在 <code>actual_data</code> 字段中返回 <code>false</code>，则 <code>date_from</code> 可设置为上上个月及更早；<br>如果 <a href=\"/v3/keywords_data/google_ads/status/\" target=\"_blank\" rel=\"noopener noreferrer\">Status 端点</a> 在 <code>actual_data</code> 字段中返回 <code>true</code>，则 <code>date_from</code> 可设置为上个月及更早"
          },
          "date_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>时间范围的结束日期</em><br>可选字段<br><strong>注意：</strong>指定的日期不得晚于上个月，Google Ads 不返回当月数据；<br>如果未指定此字段，将默认使用昨天的日期<br>日期格式：<code>\"yyyy-mm-dd\"</code><br>示例：<br><code>\"2022-11-30\"</code>"
          },
          "include_adult_keywords": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>包含与成人内容相关的关键词<br></em>可选字段<br>如果设为 <code>true</code>，响应中将包含成人关键词<br>默认值：<code>false</code><br><strong>注意</strong>：由于<a href=\"https://support.google.com/adspolicy/answer/6008942?hl=en\" target=\"_blank\" rel=\"noopener noreferrer\">Google Ads 的限制</a>，API 可能对此类关键词不返回数据"
          },
          "sort_by": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>结果排序参数</em><br>可选字段<br>使用这些参数可按 <code>relevance</code>、<code>search_volume</code>、<code>competition_index</code>、<code>low_top_of_page_bid</code> 或 <code>high_top_of_page_bid</code> 对结果进行降序排序<br>默认值：<code>relevance</code>"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>用户自定义任务标识符</em><br>可选字段<br><em>字符数上限为 255</em><br>可使用此参数标识任务，并将其与结果对应<br>可在响应的 <code>data</code> 数组中找到指定的 <code>tag</code> 值"
          }
        },
        "example": [
          {
            "location_code": 2840,
            "keywords": [
              "buy laptop",
              "cheap laptops for sale",
              "purchase laptop"
            ],
            "date_from": "2021-08-01",
            "search_partners": true
          }
        ]
      }
    ]
  },
  "example": [
    {
      "location_code": 2840,
      "keywords": [
        "buy laptop",
        "cheap laptops for sale",
        "purchase laptop"
      ],
      "date_from": "2021-08-01",
      "search_partners": true
    }
  ]
}
```

## Responses

### 200 — 操作成功

Headers:
- `X-Request-Id` (string) — 联系 Felo 支持时需提供的请求标识符。

**application/json**

Schema: object | null

```json
{
  "type": [
    "object",
    "null"
  ],
  "oneOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_KeywordsDataGoogleAdsSearchVolumeLiveResponseInfo"
    }
  ]
}
```

### 400 — 无法处理该请求。请检查请求参数。

### 401 — 需要有效的 Felo API 密钥。

### 402 — 由于未满足计费要求，请求无法继续。

### 403 — 该账户无权执行此操作。

### 429 — 已达到请求或支出限额。

### 502 — 服务无法完成该请求。

### 503 — API 或计费服务暂时不可用。

### 504 — 服务在处理请求时超时。

### default — 错误响应；上游透传响应可能采用提供方格式

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_BaseResponseInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseInfo`

```json
{
  "properties": {
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "API 的当前版本"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "通用状态码\n完整响应码列表见此处"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "通用信息性消息\n完整的一般信息性消息列表见此处"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "总执行时间，秒"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "任务总费用，美元",
      "format": "double"
    },
    "tasks_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "tasks 数组中的任务数",
      "format": "int64"
    },
    "tasks_error": {
      "type": [
        "integer",
        "null"
      ],
      "description": "tasks 数组中返回错误的任务数",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseTaskInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo`

```json
{
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "任务标识符\n我们系统中 UUID 格式的唯一任务标识符"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "任务的状态码\n由 DataForSEO 生成，范围如下：10000-60000\n完整响应码列表见此处"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "任务的信息性消息\n完整的一般信息性消息列表见此处"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "执行时间，秒"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "任务总费用，美元",
      "format": "double"
    },
    "result_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "result 数组中的元素数",
      "format": "int64"
    },
    "path": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "URL 路径"
    },
    "data": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "object",
          "null"
        ]
      },
      "description": "包含你在 POST 请求中指定的相同参数"
    }
  }
}
```

### Response36Afe1097B20_KeywordsDataGoogleAdsSearchVolumeLiveResponseInfo

`#/components/schemas/Response36Afe1097B20_KeywordsDataGoogleAdsSearchVolumeLiveResponseInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseInfo"
    },
    {
      "type": "object",
      "properties": {
        "tasks": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_KeywordsDataGoogleAdsSearchVolumeLiveTaskInfo"
              }
            ]
          },
          "description": "<em>任务数组</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_KeywordsDataGoogleAdsSearchVolumeLiveResultInfo

`#/components/schemas/Response36Afe1097B20_KeywordsDataGoogleAdsSearchVolumeLiveResultInfo`

```json
{
  "type": "object",
  "properties": {
    "keyword": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>关键词<br></em><strong>返回的关键词已解码 %##（加号 '+' 将解码为空格字符）</strong>"
    },
    "spell": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>关键词的正确拼写</em><br><strong>注意：</strong>如果 POST 数组中的关键词拼写有误，将返回拼写正确的关键词的数据；<br>我们使用 Google Ads API 的功能来检查和验证关键词拼写，<a href=\"https://support.google.com/google-ads/answer/7476658\" target=\"_blank\" rel=\"noopener noreferrer\">通过此链接了解更多</a>"
    },
    "location_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>POST 数组中的地点代码</em><br>若没有数据，则该值为 <code>null</code>"
    },
    "language_code": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>POST 数组中的语言代码</em><br>若没有数据，则该值为 <code>null</code>"
    },
    "search_partners": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "<em>表示响应中是否包含来自合作伙伴网络的数据</em>"
    },
    "competition": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>竞争</em><br>仅表示指定关键词在付费 SERP 中的相对竞争程度；<br>该值基于 Google Ads 数据，可取以下值：<code>HIGH</code>、<code>MEDIUM</code>、<code>LOW</code>；<br>若没有数据，该值为 <code>null</code>；<br>在<a href=\"https://dataforseo.com/help-center/what-is-competition\" target=\"_blank\" rel=\"noopener noreferrer\">这篇帮助中心文章</a>中了解该指标的更多信息"
    },
    "competition_index": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>竞争</em><br>仅表示指定关键词在付费 SERP 中的相对竞争程度；<br>该值基于 Google Ads 数据，介于 0 和 100 之间（含 0 和 100）；<br>若没有数据，该值为 <code>null</code>；<br>在<a href=\"https://dataforseo.com/help-center/what-is-competition\" target=\"_blank\" rel=\"noopener noreferrer\">这篇帮助中心文章</a>中了解该指标的更多信息"
    },
    "search_volume": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>每月平均搜索量；<br></em>表示针对给定关键词创意在 google.com 或 google.com 及合作伙伴网站上的（近似）搜索次数，具体取决于用户的定位；<br>若没有数据，则值为 <code>null</code>",
      "format": "int64"
    },
    "low_top_of_page_bid": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>广告展示在首页顶部的最低出价</em><br>表示高于约 20% 的广告获得展示所需最低出价的值（基于 Google Ads 的广告主统计数据）；<br>该值可能因 POST 请求中指定的地点而异"
    },
    "high_top_of_page_bid": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>广告展示在首页顶部的最高出价</em><br>表示高于约 80% 的广告获得展示所需最低出价的值（基于 Google Ads 的广告主统计数据）；<br>该值可能因 POST 请求中指定的地点而异"
    },
    "cpc": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>每次点击费用</em><br>表示给定关键词所展示广告每次点击支付的金额（美元）"
    },
    "monthly_searches": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_MonthlySearchesInfo"
          }
        ]
      },
      "description": "<em>每月搜索次数</em><br>表示针对指定地点、该关键词创意的（近似）搜索次数（默认为过去十二个月可用的数据）；<br>若没有数据，则值为 <code>null</code>"
    }
  }
}
```

### Response36Afe1097B20_KeywordsDataGoogleAdsSearchVolumeLiveTaskInfo

`#/components/schemas/Response36Afe1097B20_KeywordsDataGoogleAdsSearchVolumeLiveTaskInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo"
    },
    {
      "type": "object",
      "properties": {
        "result": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_KeywordsDataGoogleAdsSearchVolumeLiveResultInfo"
              }
            ]
          },
          "description": "<em>结果数组</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_MonthlySearchesInfo

`#/components/schemas/Response36Afe1097B20_MonthlySearchesInfo`

```json
{
  "type": "object",
  "properties": {
    "year": {
      "type": [
        "integer",
        "null"
      ],
      "description": "年"
    },
    "month": {
      "type": [
        "integer",
        "null"
      ],
      "description": "月"
    },
    "search_volume": {
      "type": [
        "integer",
        "null"
      ],
      "description": "每月平均搜索量"
    }
  }
}
```
