Search Console API . sitemaps

Instance Methods

close()

Close httplib2 connections.

delete(siteUrl, feedpath)

Deletes a sitemap from this site.

get(siteUrl, feedpath)

Retrieves information about a specific sitemap.

list(siteUrl, sitemapIndex=None)

Lists the sitemaps-entries submitted for this site, or included in the sitemap index file (if sitemapIndex is specified in the request).

submit(siteUrl, feedpath)

Submits a sitemap for a site.

Method Details

close()
Close httplib2 connections.
delete(siteUrl, feedpath)
Deletes a sitemap from this 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)
get(siteUrl, feedpath)
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)

Returns:
  An object of the form:

    { # Contains detailed information about a specific URL submitted as a sitemap.
  "contents": [ # The various content types in the sitemap.
    { # Information about the various content types in the sitemap.
      "indexed": "A String", # The number of URLs from the sitemap that were indexed (of the content type).
      "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)
Lists the sitemaps-entries 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

Returns:
  An object of the form:

    { # List of sitemaps.
  "sitemap": [ # Contains detailed information about a specific URL submitted as a sitemap.
    { # Contains detailed information about a specific URL submitted as a sitemap.
      "contents": [ # The various content types in the sitemap.
        { # Information about the various content types in the sitemap.
          "indexed": "A String", # The number of URLs from the sitemap that were indexed (of the content type).
          "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)
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 sitemap to add. For example: http://www.example.com/sitemap.xml (required)