I'm trying to find a REST API query which shows all HTML, CSS, js ect. all type of pages and documents. I'm trying to get exact same results as SharePoint default search.


Try the following query url, this will give you all the records associated with document content type.


You can also query something like below, where you are trying to find document with specific term

https://yourtenant.sharepoint.com/_api/search/query?querytext='search_data'&querytemplate='{searchterms} IsDocument:true'

By default SP REST API display 10 records. Add row limits to query to include as many result items you desire.

You can also follow MSDN documentation to learn more on SP Search.


Display Template is a new technique introduced in SharePoint 2013 in order to modify the look and feel of the search results by making use of HTML & JavaScript instead of XSLT modifications as we did in the earlier versions.

For details you can reach this article SharePoint 2013: How To Create Custom Display Templates For SharePoint Search .

  • I want something like this _api/search/query?querytext='sharepoint'&trimduplicates=false&rowlimit=400 – Rushabh Master Aug 8 '17 at 6:58

You can use below REST API

To get all Documents/ Pages from site :


To get specific pages/files like CSS,JS,HTML etc :




Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.