webmasters.searchanalytics.query

POST {{baseUrl}}/webmasters/v3/sites/:siteUrl/searchAnalytics/query?$.xgafv=<string>&access_token=<string>&alt=<string>&callback=<string>&fields=<string>&key=<string>&oauth_token=<string>&prettyPrint=<boolean>&quotaUser=<string>&upload_protocol=<string>&uploadType=<string>

Query your data with filters and parameters that you define. Returns zero or more rows grouped by the row keys that you define. You must define a date range of one or more days. When date is one of the group by values, any days without data are omitted from the result list. If you need to know which days have data, issue a broad date range query grouped by date for any metric, and see which day rows are returned.

Request Params

KeyDatatypeRequiredDescription
$.xgafvstringV1 error format.
access_tokenstringOAuth access token.
altstringData format for response.
callbackstringJSONP
fieldsstringSelector specifying which fields to include in a partial response.
keystringAPI key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
oauth_tokenstringOAuth 2.0 token for the current user.
prettyPrintstringReturns response with indentations and line breaks.
quotaUserstringAvailable to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
upload_protocolstringUpload protocol for media (e.g. "raw", "multipart").
uploadTypestringLegacy upload protocol for media (e.g. "media", "multipart").

Request Body

{"aggregationType"=>"<string>", "dimensionFilterGroups"=>[{"filters"=>[{"dimension"=>"<string>", "expression"=>"<string>", "operator"=>"<string>"}, {"dimension"=>"<string>", "expression"=>"<string>", "operator"=>"<string>"}], "groupType"=>"<string>"}, {"filters"=>[{"dimension"=>"<string>", "expression"=>"<string>", "operator"=>"<string>"}, {"dimension"=>"<string>", "expression"=>"<string>", "operator"=>"<string>"}], "groupType"=>"<string>"}], "dimensions"=>["<string>", "<string>"], "endDate"=>"<string>", "rowLimit"=>"<integer>", "searchType"=>"<string>", "startDate"=>"<string>", "startRow"=>"<integer>"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{&quot;responseAggregationType&quot;:&quot;BY_PROPERTY&quot;,&quot;rows&quot;:[{&quot;clicks&quot;:-1821017.5528909415,&quot;ctr&quot;:52613558.54157674,&quot;impressions&quot;:44931670.59801474,&quot;keys&quot;:[&quot;minim aliquip&quot;,&quot;exercitation occaecat&quot;],&quot;position&quot;:26118413.657357648},{&quot;clicks&quot;:-54597441.335091054,&quot;ctr&quot;:-59440014.56621932,&quot;impressions&quot;:-79326907.12235755,&quot;keys&quot;:[&quot;officia &quot;,&quot;minim velit aute&quot;],&quot;position&quot;:-48266271.69324005}]}