Method: projects.locations.obtainCrawlRate

获取自然抓取率或专用抓取率的时序数据以进行监控。如果未设置专用抓取速率,则返回 Vertex AI 的自然抓取速率时序。自然抓取是指 Google 会在自己方便的时候自动抓取互联网。设置专用抓取速率后,系统将返回 Vertex AI 的专用抓取速率时序。

HTTP 请求

POST https://discoveryengine.googleapis.com/v1alpha/{location=projects/*/locations/*}:obtainCrawlRate

网址采用 gRPC 转码语法。

路径参数

参数
location

string

必需。将执行抓取速率管理的位置资源。格式:projects/{project}/locations/{location}

请求正文

请求正文中包含结构如下的数据:

JSON 表示法
{
  "crawlRateScope": string
}
字段
crawlRateScope

string

必需。用户要监控的抓取率范围。目前,仅支持网域和主机名。域名示例:example.com。主机名示例:www.example.com。请勿在域名或主机名中添加 /

响应正文

针对 CrawlRateManagementService.ObtainCrawlRate 方法的响应消息。响应包含用于监控的自然抓取速率或专用抓取速率时序数据,具体取决于是否设置了专用抓取速率。

如果成功,响应正文将包含结构如下的数据:

JSON 表示法
{
  "state": enum (State),
  "error": {
    object (Status)
  },

  // Union field crawl_rate_time_series can be only one of the following:
  "organicCrawlRateTimeSeries": {
    object (OrganicCrawlRateTimeSeries)
  },
  "dedicatedCrawlRateTimeSeries": {
    object (DedicatedCrawlRateTimeSeries)
  }
  // End of list of possible types for union field crawl_rate_time_series.
}
字段
state

enum (State)

仅限输出。响应的状态。

error

object (Status)

处理请求时服务返回的错误。

联合字段 crawl_rate_time_series。用户设置专用抓取速度后,系统会返回专用抓取速度时序;否则,系统会返回自然抓取速度时序。crawl_rate_time_series 只能是下列其中一项:
organicCrawlRateTimeSeries

object (OrganicCrawlRateTimeSeries)

用于监控的历史自然抓取率时间序列数据。

dedicatedCrawlRateTimeSeries

object (DedicatedCrawlRateTimeSeries)

用于监控的历史专用抓取率时间序列数据。

授权范围

需要以下 OAuth 范围之一:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/discoveryengine.readwrite

如需了解详情,请参阅 Authentication Overview

OrganicCrawlRateTimeSeries

用于监控的历史自然抓取率时间序列数据。如果未设置专用抓取,Google 会自动确定是否进行自然抓取,以抓取用户的网站。抓取速率是指 Google 向用户网站发送的抓取请求的每秒查询次数 (QPS)。

JSON 表示法
{
  "googleOrganicCrawlRate": {
    object (CrawlRateTimeSeries)
  },
  "vertexAiOrganicCrawlRate": {
    object (CrawlRateTimeSeries)
  }
}
字段
googleOrganicCrawlRate

object (CrawlRateTimeSeries)

Google 的自然抓取速度时序,即所有 Googlebot 的抓取速度之和。如需详细了解 Googlebot,请参阅 https://developers.google.com/search/docs/crawling-indexing/overview-google-crawlers

vertexAiOrganicCrawlRate

object (CrawlRateTimeSeries)

Vertex AI 的自然抓取率时序,即未设置专用抓取时 Google-CloudVertexBot 的抓取率。如需详细了解 Google-CloudVertexBot,请参阅 https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers#google-cloudvertexbot

CrawlRateTimeSeries

用于监控的历史抓取率时间序列数据。

JSON 表示法
{
  "qpsTimeSeries": {
    object (TimeSeries)
  }
}
字段
qpsTimeSeries

object (TimeSeries)

抓取速率的 QPS。

DedicatedCrawlRateTimeSeries

用于监控的历史专用抓取率时间序列数据。专用抓取功能由 Vertex AI 用于在设置专用抓取时抓取用户的网站。

JSON 表示法
{
  "userTriggeredCrawlRate": {
    object (CrawlRateTimeSeries)
  },
  "autoRefreshCrawlRate": {
    object (CrawlRateTimeSeries)
  },
  "userTriggeredCrawlErrorRate": {
    object (CrawlRateTimeSeries)
  },
  "autoRefreshCrawlErrorRate": {
    object (CrawlRateTimeSeries)
  }
}
字段
userTriggeredCrawlRate

object (CrawlRateTimeSeries)

Vertex AI 的专用抓取速率时序(用户触发的抓取),即 Google-CloudVertexBot 在设置专用抓取时的抓取速率,用户触发的抓取速率适用于确定性用例,例如抓取用户指定的网址或站点地图。

autoRefreshCrawlRate

object (CrawlRateTimeSeries)

Vertex AI 的专用抓取速率自动刷新时序,即 Google-CloudVertexBot 在设置专用抓取时的抓取速率,该抓取速率适用于尽力而为的用例,例如定期刷新网址。

userTriggeredCrawlErrorRate

object (CrawlRateTimeSeries)

用户触发的专用抓取的 Vertex AI 错误率时序。

autoRefreshCrawlErrorRate

object (CrawlRateTimeSeries)

自动刷新专用抓取的 Vertex AI 错误率时序。

响应的不同状态。

枚举
STATE_UNSPECIFIED 状态未指定。
SUCCEEDED 状态为成功。
FAILED 状态为“失败”。