API Reference

This API reference is organized by resource type. Each resource type has one or more data representations and one or more methods.

Resource types

  1. Search Analytics
  2. Sitemaps
  3. Sites

For Search Analytics Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/webmasters/v3, unless otherwise noted
query POST  /sites/siteUrl/searchAnalytics/query

Query your search traffic data with filters and parameters that you define. The method returns zero or more rows grouped by the row keys (dimensions) that you define. You must define a date range of one or more days.

When date is one of the dimensions, any days without data are omitted from the result list. To learn which days have data, issue a query without filters grouped by date, for the date range of interest.

Results are sorted by click count descending. If two rows have the same click count, they are sorted in an arbitrary way.

See the python sample for calling this method.

JSON POST Example:
POST https://www.googleapis.com/webmasters/v3/sites/https%3A%2F%2Fwww.example.com%2F/searchAnalytics/query?key={MY_API_KEY}
{
  "startDate": "2015-04-01",
  "endDate": "2015-05-01",
  "dimensions": ["country","device"]
}

Sitemaps

For Sitemaps Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/webmasters/v3, unless otherwise noted
delete DELETE  /sites/siteUrl/sitemaps/feedpath Deletes a sitemap from this site.
get GET  /sites/siteUrl/sitemaps/feedpath Retrieves information about a specific sitemap.
list GET  /sites/siteUrl/sitemaps Lists the sitemaps-entries submitted for this site, or included in the sitemap index file (if sitemapIndex is specified in the request).
submit PUT  /sites/siteUrl/sitemaps/feedpath Submits a sitemap for a site.

Sites

For Sites Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/webmasters/v3, unless otherwise noted
add PUT  /sites/siteUrl Adds a site to the set of the user's sites in Search Console.
delete DELETE  /sites/siteUrl Removes a site from the set of the user's Search Console sites.
get GET  /sites/siteUrl Retrieves information about specific site.
list GET  /sites Lists the user's Search Console sites.

URL Crawl Errors Counts

For URL Crawl Errors Counts Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/webmasters/v3, unless otherwise noted
query GET  /sites/siteUrl/urlCrawlErrorsCounts/query Retrieves a time series of the number of URL crawl errors per error category and platform.

URL Crawl Errors Samples

For URL Crawl Errors Samples Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/webmasters/v3, unless otherwise noted
get GET  /sites/siteUrl/urlCrawlErrorsSamples/url Retrieves details about crawl errors for a site's sample URL.

Required query parameters: category, platform

list GET  /sites/siteUrl/urlCrawlErrorsSamples Lists a site's sample URLs for the specified crawl error category and platform.

Required query parameters: category, platform

markAsFixed DELETE  /sites/siteUrl/urlCrawlErrorsSamples/url Marks the provided site's sample URL as fixed, and removes it from the samples list.

Required query parameters: category, platform