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.

2 Answers 2


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.


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 and acknowledge you have read our privacy policy.

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