Method: index.inspect
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2024-08-27 (UTC).
[null,null,["Zuletzt aktualisiert: 2024-08-27 (UTC)."],[[["\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)."]]