Power Apps Search Series – Autocomplete API for Predictive Search Experiences

In Tthe previous post, we covered the Suggest API, ideal for intelligent type-ahead experiences. In this post, we explore another UX enhancement tool the Autocomplete API, which is used to complete partially typed search terms based on indexed data in Dataverse.


What Is the Autocomplete API?

The Autocomplete API is designed to return the most likely completions for a user’s partially entered keyword. Unlike the Suggest API, which returns existing record matches, Autocomplete suggests word completions based on tokenized field values in the index.

Key Differences from Suggest API

FeatureAutocompleteSuggest
PurposeComplete a partial termSuggest known entity matches
OutputText stringsEntity records
Ideal forGuided typing UXDropdown lookups
API availabilityWeb API onlyWeb API only

Sample Request

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

{
  "searchTerm": "mic",
  "entities": [
    {
      "name": "account",
      "autocompleteField": "name"
    }
  ]
}

This request asks Dataverse: “What are the likely full words that begin with ‘mic’ in the name field of accounts?” For example, it might return “Microsoft”, “Micronyx”, or “Mic Drop Inc.”


Sample Response

{
  "value": [
    {
      "text": "Microsoft"
    },
    {
      "text": "Micronyx"
    }
  ]
}

Response Fields

FieldDescription
textSuggested term completion (string)

These values can be used in dropdowns, pill-based input controls, or auto-advancing forms.


Ideal Use Cases

ScenarioUse Autocomplete?
Completing company names as user types✅ Yes
Suggesting record links in a lookup field❌ Use Suggest
Offering predictive location search✅ Yes
Returning search results with scores❌ Use SearchQuery

Developer Tips

  • Use autocompleteField wisely one field per entity.
  • Field must be full-text searchable.
  • Autocomplete is case-insensitive.
  • Useful for tokenized data like names, cities, categories.
  • Combine with local caching for high-responsiveness UX.

Test It Live

You can test autocomplete in a custom Power Apps PCF control or custom page search bar. The response is fast and simple to handle.


Suggest vs Autocomplete Recap

CapabilitySuggest APIAutocomplete API
ReturnsRecordsStrings
Based onEntity contentToken completion
Highlighting✅ Yes❌ No
Use forRecord pickerInput completion

Leave a comment