Hi! Here come’s just a short blog post about how to Query the REST search api in SharePoint 2013, Online or On prem to display most visited sites that could look something like the image below. Take not that you should be able to get something similar with a content search web part with help of a custom display template as well. But if you need to display this in an app part or a script web part I hope this could be in any help.


Let’s try this!

Download my experimental code from here, and please if you found something that can be written better or if you have any other ideas regarding this, drop me a comment!

Take a look at some other posts about REST in SharePoint I’ve written Before, you’ll find them over here

The main parts of this is the search API


And the ViewsLifeTime property