GetPageStats

Gets detailed traffic statistics for your top pages — this is the contents of the Search Performance report in the web interface.

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 for the API. The response from the API (for me at least) shows a series of measures for each Saturday date, and matches the 7 days ending Friday in 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/GetPageStats?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":"http:\/\/help.analyticsedge.com\/shopify\/sh-get-events\/"},
...
{"__type":"QueryStats:#Microsoft.Bing.Webmaster.Api",
"AvgClickPosition":0,
"AvgImpressionPosition":16,
"Clicks":0,
"Date":"\/Date(1401519600000)\/",
"Impressions":1,
"Query":"http:\/\/help.analyticsedge.com\/category\/googleanalytics\/"}
]}