I was trying to build a search box with suggestions as user typing using this endpoint "/_api/search/suggest" documentation in SharePoint Search REST API overview.

However it doesn't seems work for me, does anyone came across this and know what might went wrong for me? Thanks for help.


1 Answer 1


You have to see if you actually have any query suggestions for the term in question. There is a process that creates the query suggestions and stores them in the Search Service Application. You can use PowerShell to find the Suggestions that you have:

$ssa = Get-SPEnterpriseSearchServiceApplication
$owner = Get-SPEnterpriseSearchOwner -Level Ssa
$manager = New-Object Microsoft.Office.Server.Search.Administration.Query.FederationManager –ArgumentList $ssa
$source = $manager.GetSourceByName("Local SharePoint Results", $owner)

Get-SPEnterpriseSearchLanguageResourcePhrase -SearchApplication $ssa `
-Owner $owner -Language en-US -Type QuerySuggestionAlwaysSuggest

If you find that you don't have any phrases you can add them manually with:


Once you know that is all working your REST request should be (for example "SharePoint":


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.