Get detailed traffic statistics for top queries. This is data from the Search Performance report in the web interface.
Like many of the API commands, there is only one parameter:
siteUrl – one of your verified websites
Notes:
- Although the web interface allows you to select date ranges by date, the numbers appear to be updated in weekly buckets. The response from the API (for me at least) shows a series of measures for each Saturday date, and this aligns with the 7 days ending the Friday from the Search Performance report.
- There are no date range or limit parameters for the call; you get all the data they have, every time, whether you want it or not.
Example:
https://ssl.bing.com/webmaster/api.svc/json/GetQueryStats?siteUrl=http%3A%2F%2Fhelp.analyticsedge.com%2F&apikey=...
This returns an array of values, under the node “d”. For each entry, there are values for:
- __type (you can ignore this)
- AvgClickPosition, AvgImpressionPosition (average position)
- Clicks, Impressions (total count)
- Date (see date format article)
- Impressions (total count for the day)
- Query (the web page URL)
Typical response:
{"d":[ {"__type":"QueryStats:#Microsoft.Bing.Webmaster.Api", "AvgClickPosition":0, "AvgImpressionPosition":27, "Clicks":0, "Date":"\/Date(1399100400000)\/", "Impressions":1, "Query":"www.getevents.co"}, ... {"__type":"QueryStats:#Microsoft.Bing.Webmaster.Api", "AvgClickPosition":0, "AvgImpressionPosition":47, "Clicks":0, "Date":"\/Date(1401519600000)\/", "Impressions":2, "Query":"add a link to facebook"}]}