I would like to replicate the SharePoint search box behaviour in a custom web part, particularly displaying the instant/suggested search results (when the search box displays suggested sites, files, and people when the user has not typed anything in the search box yet).
But these APIs only partially replicate instant search results from the out-of-the-box SharePoint search experience we are after. We would love for some support on the best way to get these zero-term suggestions
What type of issue is this?
Question
What SharePoint development model, framework, SDK or API is this about?
SharePoint REST API
Target SharePoint environment
SharePoint Online
What browser(s) / client(s) have you tested
Additional environment details
Issue description
Following the removal of SPHome APIs from SharePoint Online, we are seeking alternatives to fit with behaviour in our SPFx web part.
I would like to replicate the SharePoint search box behaviour in a custom web part, particularly displaying the instant/suggested search results (when the search box displays suggested sites, files, and people when the user has not typed anything in the search box yet).
The endpoint we currently use gets activities from the feed, as posted here: https://medium.com/maxali/sharepoint-home-service-apis-4b7474f2defd, but it gets a token from SharePoint SPHome Service API, which is due to be closed in November.
Some alternative APIs that I have discovered are:
Documents used by a user - https://learn.microsoft.com/en-us/graph/api/insights-list-used?view=graph-rest-1.0&tabs=http Trending documents - https://learn.microsoft.com/en-us/graph/api/insights-list-trending?view=graph-rest-1.0
But these APIs only partially replicate instant search results from the out-of-the-box SharePoint search experience we are after. We would love for some support on the best way to get these zero-term suggestions