Power Apps Search Series – Suggest API for Intelligent Search Assistance

In the previous post we explored the full power of the Search Query API in Dataverse. Now, let’s shift gears to a more UX-focused capability: the Suggest API.

This feature powers intelligent, type-ahead search experiences that offer suggestions before a full search is even submitted ideal for lookup fields, search bars, and filtering experiences in model-driven apps and custom pages.


What Is the Suggest API?

The Suggest API returns a ranked list of search suggestions based on partial user input. Unlike full Search Query requests that return full records, Suggest responses are lightweight and fast.

Key Characteristics:

  • Lower latency than a full search
  • Supports filtering by entity/table and field
  • Uses indexed fields only
  • Returns up to 5–10 suggestions
  • Includes highlight support for partial matches

Example API Request

POST https://<env>.crm.dynamics.com/api/search/v1.0/suggest
Content-Type: application/json
Authorization: Bearer eyJ0eXAi...

{
  "searchTerm": "con",
  "entities": [
    {
      "name": "account",
      "suggestFields": ["name"]
    }
  ]
}

This suggests matching account names that begin or contain “con”, like “Contoso”, “Converge Inc.”, etc.


Sample Response

{
  "value": [
    {
      "entityName": "account",
      "entityId": "111-222...",
      "suggestedText": "<em>Con</em>toso Corporation"
    }
  ]
}

Fields Explained

FieldDescription
entityNameName of the table/entity
entityIdID of the suggested record
suggestedTextHighlighted suggestion using <em> tags

These values can be rendered as dropdowns or inline hints as users type.


Use Case Scenarios

ScenarioSuggest API?
Autocomplete account name in a form✅ Yes
Typeahead in global search bar✅ Yes
Search for leads created in last month❌ Use SearchQuery API
Suggest values for country picklist❌ Use local config or static cache

🔧 Developer Tips

  • Suggestions only return indexed fields.
  • Use suggestFields wisely too many fields can lead to noisy results.
  • Apply entity-level filters if necessary using the filter parameter (same syntax as SearchQuery API).
  • You can combine suggestedText with entityId to navigate or auto-fill forms.

Suggest vs Query

FeatureSuggest APISearch Query API
ResponseFast, lightweightFull document result
Best forUX, autocompleteFull record search
Result limit5–10Up to 100+
Highlight support✅ Yes✅ Yes
FilteringEntity + Field + ODataExtensive OData, facets

Leave a comment