Google Search Console API . urlInspection . index

Instance Methods

close()

Close httplib2 connections.

inspect(body=None, x__xgafv=None)

Index inspection.

Method Details

close()
Close httplib2 connections.
inspect(body=None, x__xgafv=None)
Index inspection.

Args:
  body: object, The request body.
    The object takes the form of:

{ # Index inspection request.
  "inspectionUrl": "A String", # Required. URL to inspect. Must be under the property specified in "site_url".
  "languageCode": "A 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".
  "siteUrl": "A String", # Required. The URL of the property as defined in Search Console. **Examples:** `http://www.example.com/` for a URL-prefix property, or `sc-domain:example.com` for a Domain property.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Index-Status inspection response.
  "inspectionResult": { # URL inspection result, including all inspection results. # URL inspection results.
    "ampResult": { # AMP inspection result of the live page or the current information from Google's index, depending on whether you requested a live inspection or not. # Result of the AMP analysis. Absent if the page is not an AMP page.
      "ampIndexStatusVerdict": "A String", # Index status of the AMP URL.
      "ampUrl": "A String", # URL of the AMP that was inspected. If the submitted URL is a desktop page that refers to an AMP version, the AMP version will be inspected.
      "indexingState": "A String", # Whether or not the page blocks indexing through a noindex rule.
      "issues": [ # A list of zero or more AMP issues found for the inspected URL.
        { # AMP issue.
          "issueMessage": "A String", # Brief description of this issue.
          "severity": "A String", # Severity of this issue: WARNING or ERROR.
        },
      ],
      "lastCrawlTime": "A String", # Last time this AMP version was crawled by Google. Absent if the URL was never crawled successfully.
      "pageFetchState": "A String", # Whether or not Google could fetch the AMP.
      "robotsTxtState": "A String", # Whether or not the page is blocked to Google by a robots.txt rule.
      "verdict": "A String", # The status of the most severe error on the page. If a page has both warnings and errors, the page status is error. Error status means the page cannot be shown in Search results.
    },
    "indexStatusResult": { # Results of index status inspection for either the live page or the version in Google's index, depending on whether you requested a live inspection or not. For more information, see the [Index coverage report documentation](https://support.google.com/webmasters/answer/7440203). # Result of the index status analysis.
      "coverageState": "A String", # Could Google find and index the page. More details about page indexing appear in 'indexing_state'.
      "crawledAs": "A String", # Primary crawler that was used by Google to crawl your site.
      "googleCanonical": "A String", # The URL of the page that Google selected as canonical. If the page was not indexed, this field is absent.
      "indexingState": "A String", # Whether or not the page blocks indexing through a noindex rule.
      "lastCrawlTime": "A String", # Last time this URL was crawled by Google using the [primary crawler](https://support.google.com/webmasters/answer/7440203#primary_crawler). Absent if the URL was never crawled successfully.
      "pageFetchState": "A String", # Whether or not Google could retrieve the page from your server. Equivalent to ["page fetch"](https://support.google.com/webmasters/answer/9012289#index_coverage) in the URL inspection report.
      "referringUrls": [ # URLs that link to the inspected URL, directly and indirectly.
        "A String",
      ],
      "robotsTxtState": "A String", # Whether or not the page is blocked to Google by a robots.txt rule.
      "sitemap": [ # Any sitemaps that this URL was listed in, as known by Google. Not guaranteed to be an exhaustive list, especially if Google did not discover this URL through a sitemap. Absent if no sitemaps were found.
        "A String",
      ],
      "userCanonical": "A String", # The URL that your page or site [declares as canonical](https://developers.google.com/search/docs/advanced/crawling/consolidate-duplicate-urls?#define-canonical). If you did not declare a canonical URL, this field is absent.
      "verdict": "A String", # High level verdict about whether the URL *is* indexed (indexed status), or *can be* indexed (live inspection).
    },
    "inspectionResultLink": "A String", # Link to Search Console URL inspection.
    "mobileUsabilityResult": { # Mobile-usability inspection results. # Result of the Mobile usability analysis.
      "issues": [ # A list of zero or more mobile-usability issues detected for this URL.
        { # Mobile-usability issue.
          "issueType": "A String", # Mobile-usability issue type.
          "message": "A String", # Additional information regarding the issue.
          "severity": "A String", # Not returned; reserved for future use.
        },
      ],
      "verdict": "A String", # High-level mobile-usability inspection result for this URL.
    },
    "richResultsResult": { # Rich-Results inspection result, including any rich results found at this URL. # Result of the Rich Results analysis. Absent if there are no rich results found.
      "detectedItems": [ # A list of zero or more rich results detected on this page. Rich results that cannot even be parsed due to syntactic issues will not be listed here.
        { # Rich Results items grouped by type.
          "items": [ # List of Rich Results items.
            { # A specific rich result found on the page.
              "issues": [ # A list of zero or more rich result issues found for this instance.
                { # Severity and status of a single issue affecting a single rich result instance on a page.
                  "issueMessage": "A String", # Rich Results issue type.
                  "severity": "A String", # Severity of this issue: WARNING, or ERROR. Items with an issue of status ERROR cannot appear with rich result features in Google Search results.
                },
              ],
              "name": "A String", # The user-provided name of this item.
            },
          ],
          "richResultType": "A String", # Rich Results type
        },
      ],
      "verdict": "A String", # High-level rich results inspection result for this URL.
    },
  },
}