Webmaster Tools API . sitemaps

Instance Methods

delete(siteUrl, feedpath)

Deletes a sitemap from this site.

get(siteUrl, feedpath)

Retrieves information about a specific sitemap.

list(siteUrl, sitemapIndex=None)

Lists sitemaps uploaded to the site.

submit(siteUrl, feedpath)

Submits a sitemap for a site.

Method Details

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:

    {
    "errors": "A String", # Number of errors in the sitemap - issues with the sitemap itself, that needs to be fixed before it can be processed correctly.
    "warnings": "A String", # Number of warnings for the sitemap - issues with URLs in the sitemaps.
    "isPending": True or False, # If true, the sitemap has not been processed.
    "lastSubmitted": "A String", # Date & time in which this sitemap was submitted. Date format is in RFC 3339 format (yyyy-mm-dd).
    "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).
    "path": "A String", # The url of the sitemap.
    "type": "A String", # The type of the sitemap (for example "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).
        "type": "A String", # The specific type of content in this sitemap (for example "web", "images").
        "submitted": "A String", # The number of URLs in the sitemap (of the content type).
      },
    ],
  }
list(siteUrl, sitemapIndex=None)
Lists sitemaps uploaded to the site.

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.

Returns:
  An object of the form:

    { # List of sitemaps.
    "sitemap": [ # Information about a sitemap entry.
      {
        "errors": "A String", # Number of errors in the sitemap - issues with the sitemap itself, that needs to be fixed before it can be processed correctly.
        "warnings": "A String", # Number of warnings for the sitemap - issues with URLs in the sitemaps.
        "isPending": True or False, # If true, the sitemap has not been processed.
        "lastSubmitted": "A String", # Date & time in which this sitemap was submitted. Date format is in RFC 3339 format (yyyy-mm-dd).
        "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).
        "path": "A String", # The url of the sitemap.
        "type": "A String", # The type of the sitemap (for example "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).
            "type": "A String", # The specific type of content in this sitemap (for example "web", "images").
            "submitted": "A String", # The number of URLs in the sitemap (of the content type).
          },
        ],
      },
    ],
  }
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. (required)