Forum Discussion
Jedrek96
Jan 19, 2024Copper Contributor
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=...
Feb 20, 2024
Hi,
you can use the Path property in order to limit your results to specific sites
(Path:https://xyz.sharepoint.com/sites/site1 OR Path:https://xyz.sharepoint.com/sites/site2/)
You can use this tool in order to test your query https://github.com/pnp/PnP-Tools/blob/master/Solutions/SharePoint.Search.QueryTool/README.md
Cheers,
Federico
you can use the Path property in order to limit your results to specific sites
(Path:https://xyz.sharepoint.com/sites/site1 OR Path:https://xyz.sharepoint.com/sites/site2/)
You can use this tool in order to test your query https://github.com/pnp/PnP-Tools/blob/master/Solutions/SharePoint.Search.QueryTool/README.md
Cheers,
Federico