Using the search api to pull content into a mobile app, what's the right way to filter the results to get news from 2 select sites? Is there a way to use the actual site name in the filter or does it have to be the "webId"? Here's the url I'd like to use to illustrate what I mean:

https://xxx.sharepoint.com/_api/search/query?querytext='IsDocument:True AND FileExtension:aspx AND PromotedState:2'&selectproperties='Author,Path,Title,Url,CanvasContent1OWSHTML'&$filter=SiteTitle eq site1 or SiteTitle eq site2

1 Answer 1



 /_api/search/query?querytext='IsDocument=true  FileExtension:aspx  Path:https://contoso.sharepoint.com/sites/dev Path:https://contoso.sharepoint.com/ '

enter image description here

  • Makes sense but I was hoping to avoid using site url paths to limit the character count. This works for now though - thanks!
    – matt
    Commented Jul 1, 2020 at 15:00

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.