Forum Discussion

Jedrek96's avatar
Jedrek96
Copper Contributor
Jan 19, 2024

SharePoint Online Filter By URL

 

I am working with the SharePoint API and trying to filter search results based on specific URLs. Currently, I have the following search query:

http://www.test.com/_api/search/query?querytext=%27Hello%27&trimduplicates=false&sortlist=%27Write:descending%27&rowlimit=5000

I want to filter the results from the API results.. based on the following URLs:

https://www.test.com/SiteTest
https://www.test.com/Divisions/Academy
https://www.test.com/Divisions/National

Is there a specific filter or URL parameter that I can use in the SharePoint API to achieve this?
I appreciate any guidance or examples on how to implement this filtering logic?

Resources