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>"aUser=<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
Key | Datatype | Required | Description |
---|---|---|---|
$.xgafv | string | V1 error format. | |
access_token | string | OAuth access token. | |
alt | string | Data format for response. | |
callback | string | JSONP | |
fields | string | Selector specifying which fields to include in a partial response. | |
key | string | API 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_token | string | OAuth 2.0 token for the current user. | |
prettyPrint | string | Returns response with indentations and line breaks. | |
quotaUser | string | Available 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_protocol | string | Upload protocol for media (e.g. "raw", "multipart"). | |
uploadType | string | Legacy 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
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"responseAggregationType":"BY_PROPERTY","rows":[{"clicks":-1821017.5528909415,"ctr":52613558.54157674,"impressions":44931670.59801474,"keys":["minim aliquip","exercitation occaecat"],"position":26118413.657357648},{"clicks":-54597441.335091054,"ctr":-59440014.56621932,"impressions":-79326907.12235755,"keys":["officia ","minim velit aute"],"position":-48266271.69324005}]}