Skip to content

Direqt | Search Integration Guide

Enhance your existing search experience with AI. With an existing Direqt chatbot embed and one simple change to your searchbar your user's search queries can be redirected to AI chat to provide more accurate and relevant search results.

Adding The Embed Script and Container

Before you can add our AI search, you need to include the standard embed script and chat container on your site. This will create a chatbot on your website that will be used to display search results.

For instructions on how to add the embed script and container, please refer to the Direqt Embed documentation.

Note

The only container attribute required for search to work is data-bot-id, but we recommend setting data-layout to modal as well for the best search experience.

Modifying the Existing Search Input

Add a new CSS class of direqt-search-input to your existing search input. Direqt will use this class to identify the search input to take over the search functionality from.

Existing New
<input type="text" placeholder="Search"> <input type="text" placeholder="Search" class="direqt-search-input">

That's it! You have successfully implemented AI search on your website. Our script does the rest in transforming your traditional search experience into one powered by AI. You'll know search is working when the placeholder text of your search input has been replaced by our script with "Ask [Your Bot Name]".

Note

To further enhance and customize your AI search experience refer to the documentation on Configuring the Embed and Custom Elements.