Method: index.inspect
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-23。
[null,null,["最后更新时间 (UTC):2024-08-23。"],[[["\u003cp\u003eView the index status of a URL within Google Search Console, but presently only for the version in the Google index.\u003c/p\u003e\n"],["\u003cp\u003eSend an HTTP POST request to \u003ccode\u003ehttps://searchconsole.googleapis.com/v1/urlInspection/index:inspect\u003c/code\u003e with the URL, site URL, and optional language code in the request body.\u003c/p\u003e\n"],["\u003cp\u003eReceive a response with the \u003ccode\u003eUrlInspectionResult\u003c/code\u003e object detailing the URL's index status.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with either the \u003ccode\u003ewebmasters\u003c/code\u003e or \u003ccode\u003ewebmasters.readonly\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This describes how to use a POST request to inspect the indexed status of a URL. The endpoint is `https://searchconsole.googleapis.com/v1/urlInspection/index:inspect`. The request body requires `inspectionUrl` and `siteUrl` strings, with an optional `languageCode`. The response body returns an `inspectionResult` object. This process uses gRPC Transcoding. It needs `https://www.googleapis.com/auth/webmasters` or `https://www.googleapis.com/auth/webmasters.readonly` authorization. The service only provides the status of the version in the Google index, not live URLs.\n"],null,["# Method: index.inspect\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.InspectUrlIndexResponse.SCHEMA_REPRESENTATION)\n- [Authorization Scopes](#body.aspect)\n- [Try it!](#try-it)\n\nView the indexed, or indexable, status of the provided URL. Presently only the status of the version in the Google index is available; you cannot test the indexability of a live URL.\n\n### HTTP request\n\n`POST https://searchconsole.googleapis.com/v1/urlInspection/index:inspect`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation ||\n|--------------------------------------------------------------------------------|---|\n| ``` { \"inspectionUrl\": string, \"siteUrl\": string, \"languageCode\": string } ``` |\n\n| Fields ||\n|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `inspectionUrl` | `string` Required. Fully-qualified URL to inspect. Must be under the property specified in \"siteUrl\". |\n| `siteUrl` | `string` Required. The URL of the property as defined in Search Console. Note that URL-prefix properties must include a trailing / mark. **Examples:** `https://www.example.com/` for a URL-prefix property, or `sc-domain:example.com` for a Domain property. |\n| `languageCode` | `string` Optional. An [IETF BCP-47](https://en.wikipedia.org/wiki/IETF_language_tag) language code representing the requested language for translated issue messages, e.g. \"en-US\", \"or \"de-CH\". Default value is \"en-US\". |\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\nIndex-Status inspection response.\n\n| JSON representation ||\n|----------------------------------------------------------------------------------------------------------|---|\n| ``` { \"inspectionResult\": { object (/webmaster-tools/v1/urlInspection.index/UrlInspectionResult) } } ``` |\n\n| Fields ||\n|--------------------|-------------------------------------------------------------------------------------------------------------------------|\n| `inspectionResult` | `object (`[UrlInspectionResult](/webmaster-tools/v1/urlInspection.index/UrlInspectionResult)`)` URL inspection results. |\n\n### Authorization Scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/webmasters`\n- `https://www.googleapis.com/auth/webmasters.readonly`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]