Method: projects.locations.obtainCrawlRate

获取自然抓取速度或专用抓取速度的时序数据,以供监控。如果未设置专用抓取速度,则会返回 Vertex AI 的自然抓取速度时序。自然抓取意味着 Google 会根据自身的便利性自动抓取互联网内容。如果设置了专用抓取速度,则会返回 Vertex AI 的专用抓取速度时序。

HTTP 请求

POST https://discoveryengine.googleapis.com/v1beta/{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 状态为“失败”。