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.