Google Search Console API . sitemaps

Instance Methods

close()

Close httplib2 connections.

delete(siteUrl, feedpath, x__xgafv=None)

Deletes a sitemap from the Sitemaps report. Does not stop Google from crawling this sitemap or the URLs that were previously crawled in the deleted sitemap.

get(siteUrl, feedpath, x__xgafv=None)

Retrieves information about a specific sitemap.

list(siteUrl, sitemapIndex=None, x__xgafv=None)

Lists the [sitemaps-entries](/webmaster-tools/v3/sitemaps) submitted for this site, or included in the sitemap index file (if `sitemapIndex` is specified in the request).

submit(siteUrl, feedpath, x__xgafv=None)

Submits a sitemap for a site.

Method Details

close()
Close httplib2 connections.
delete(siteUrl, feedpath, x__xgafv=None)
Deletes a sitemap from the Sitemaps report. Does not stop Google from crawling this sitemap or the URLs that were previously crawled in the deleted sitemap.

Args:
  siteUrl: string, The site's URL, including protocol. For example: `http://www.example.com/`. (required)
  feedpath: string, The URL of the actual sitemap. For example: `http://www.example.com/sitemap.xml`. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format
get(siteUrl, feedpath, x__xgafv=None)
Retrieves information about a specific sitemap.

Args:
  siteUrl: string, The site's URL, including protocol. For example: `http://www.example.com/`. (required)
  feedpath: string, The URL of the actual sitemap. For example: `http://www.example.com/sitemap.xml`. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Contains detailed information about a specific URL submitted as a [sitemap](https://support.google.com/webmasters/answer/156184).
  "contents": [ # The various content types in the sitemap.
    { # Information about the various content types in the sitemap.
      "indexed": "A String", # *Deprecated; do not use.*
      "submitted": "A String", # The number of URLs in the sitemap (of the content type).
      "type": "A String", # The specific type of content in this sitemap. For example: `web`.
    },
  ],
  "errors": "A String", # Number of errors in the sitemap. These are issues with the sitemap itself that need to be fixed before it can be processed correctly.
  "isPending": True or False, # If true, the sitemap has not been processed.
  "isSitemapsIndex": True or False, # If true, the sitemap is a collection of sitemaps.
  "lastDownloaded": "A String", # Date & time in which this sitemap was last downloaded. Date format is in RFC 3339 format (yyyy-mm-dd).
  "lastSubmitted": "A String", # Date & time in which this sitemap was submitted. Date format is in RFC 3339 format (yyyy-mm-dd).
  "path": "A String", # The url of the sitemap.
  "type": "A String", # The type of the sitemap. For example: `rssFeed`.
  "warnings": "A String", # Number of warnings for the sitemap. These are generally non-critical issues with URLs in the sitemaps.
}
list(siteUrl, sitemapIndex=None, x__xgafv=None)
 Lists the [sitemaps-entries](/webmaster-tools/v3/sitemaps) submitted for this site, or included in the sitemap index file (if `sitemapIndex` is specified in the request).

Args:
  siteUrl: string, The site's URL, including protocol. For example: `http://www.example.com/`. (required)
  sitemapIndex: string,  A URL of a site's sitemap index. For example: `http://www.example.com/sitemapindex.xml`.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # List of sitemaps.
  "sitemap": [ # Contains detailed information about a specific URL submitted as a [sitemap](https://support.google.com/webmasters/answer/156184).
    { # Contains detailed information about a specific URL submitted as a [sitemap](https://support.google.com/webmasters/answer/156184).
      "contents": [ # The various content types in the sitemap.
        { # Information about the various content types in the sitemap.
          "indexed": "A String", # *Deprecated; do not use.*
          "submitted": "A String", # The number of URLs in the sitemap (of the content type).
          "type": "A String", # The specific type of content in this sitemap. For example: `web`.
        },
      ],
      "errors": "A String", # Number of errors in the sitemap. These are issues with the sitemap itself that need to be fixed before it can be processed correctly.
      "isPending": True or False, # If true, the sitemap has not been processed.
      "isSitemapsIndex": True or False, # If true, the sitemap is a collection of sitemaps.
      "lastDownloaded": "A String", # Date & time in which this sitemap was last downloaded. Date format is in RFC 3339 format (yyyy-mm-dd).
      "lastSubmitted": "A String", # Date & time in which this sitemap was submitted. Date format is in RFC 3339 format (yyyy-mm-dd).
      "path": "A String", # The url of the sitemap.
      "type": "A String", # The type of the sitemap. For example: `rssFeed`.
      "warnings": "A String", # Number of warnings for the sitemap. These are generally non-critical issues with URLs in the sitemaps.
    },
  ],
}
submit(siteUrl, feedpath, x__xgafv=None)
Submits a sitemap for a site.

Args:
  siteUrl: string, The site's URL, including protocol. For example: `http://www.example.com/`. (required)
  feedpath: string, The URL of the actual sitemap. For example: `http://www.example.com/sitemap.xml`. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format