Forum Discussion
Nigel Witherdin
Aug 11, 2019Iron Contributor
SharePoint Online Hub Search - How do you call the search API and limit results to content contained
I am writing a web part that is surfacing all news pages on sites associated to a hub which have been tagged with a particular category (through page properties). How do I limit the results of my...
Beau Cameron
Aug 12, 2019MVP
Nigel Witherdin Check out the Hub Site API.
You'll want to call
_api/Hubsites?filter=SiteUrl eq "<Your hubsite url>"
It will return the ID. This ID you can use in your Search Query as the DepartmentId to search within your hub.