Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
SharePoint onPremise - 2013. I'm attempting to use the following string, and get errors.
'contentclass:"STS_Web" OR contentclass:"STS_List_DocumentLibrary"';
It works perfectly if I specify a single contentclass.
I have tested your scenario and seems working fine with below syntax.
<<site url>>/_api/search/query?querytext='(contentclass="STS_Web" OR contentclass="STS_List_DocumentLibrary")'
See if this works for you
Required, but never shown