I have multiple subsites in single site collection. All of these subsites have document library with same name. So is it possible using JSOM to read data from multiple document libraries with same name and display it to the user?

If so I would appreciate if I can be pointed out to any reference on how to do it. I know that we can do it by Content search webpart, but I want to know if it can be done programmatically using JSOM.



For such scenarios SharePoint 2013 search Query APIs probably is the best bet, where the following APIs are available:


The following query returns the all the documents using REST endpoint:



Understanding result sources for search in SharePoint Server 2013


use SPSiteDataQuery for querying the lists and libraries on each site from SiteCollection level by setting its Webs property to

"<Webs Scope=\"SiteCollection\" />";

on the Below MSDN Link, their is example how to fetch it.


  • I am working on SharePoint online . SO cannot use server object model. I can only use Client object model.
    – user117048
    Jun 11 '14 at 16:55

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.