Overview

Getting Started

Widgets

Categories

Keywords

Reviews

Users

Businesses

Businesses Search

Negotiations

Messages

Requests

Help

Changelog

Terms and Policies

Keywords Use Case: Autocomplete

Follow along with a fully worked use case on how to leverage the Keywords API.

Prerequisites

  • An OAuth2 Client that supports the clientCredentials Flow with the following scopes:
    • demand::keywords.read

Getting Keywords

GET /api/v4/keywords/search?searchQuery=car&limit=15 HTTP/2
authorization: Bearer {{clientCredentials}}
{
"data": [
{
"keywordID": "102906936603224901",
"name": "Carpet Cleaning"
},
{
"keywordID": "102906936594770749",
"name": "Carpenters"
},
{
"keywordID": "102906936768146409",
"name": "Carpet Installation"
},
{
"keywordID": "132477062496627709",
"name": "Carpet Repair"
},
{
"keywordID": "134982787476319115",
"name": "Caricaturists"
},
{
"keywordID": "132477062280964903",
"name": "Career Coach"
},
{
"keywordID": "231800509210282974",
"name": "Carpet Removal Companies"
},
{
"keywordID": "271185276480924593",
"name": "Car Shuttle Services"
},
{
"keywordID": "296100734453031077",
"name": "Carrier AC Repair"
},
{
"keywordID": "233337988314868709",
"name": "Car Upholstery Cleaning Services"
},
{
"keywordID": "296124106468712693",
"name": "Carrier AC Installation"
},
{
"keywordID": "228844785735379881",
"name": "Car Moving"
},
{
"keywordID": "228629850824788914",
"name": "Computer"
},
{
"keywordID": "545253401998893057",
"name": "Automotive Mechanic"
},
{
"keywordID": "543887176519622657",
"name": "Vehicle Towing"
}
]
}

Creating a Search Experience

You can leverage the Keyword Search API when users type a search query into a search bar - to present them with Autocomplete results.
When implementing this endpoint as an autocomplete solution in your app, we strongly discourage hitting this endpoint after every keystroke. Instead, we recommend waiting a specific period of time after a user has finished typing their input before submitting an API request. Typically, a debounce of 250ms to 500ms works well.