Search Results Page

Installing AI Search on a dedicated search page on your site

This guide will show you how to integrate AI Search onto a dedicated search results page on your site, e.g., https://example.com/search. Direqt will automatically redirect user queries to your specified URL and display search results on that page.


1

Create a Search Page

If you don't yet have a dedicated search page on your website, you'll need to create one. Once you're done, keep the URL of this page handy for the next step.

Most CMS platforms have a search page template.

2

Specify Your Search Page URL

On the Installation page of the dashboard, select "Dedicated search page" as your search layout, then enter the full URL of your search results page in the input box.

3

Add Your Embed Script

Click "Get My Installation Instructions", and then copy your personalized embed script, which will look something like this:

<script async src="https://embed.direqt.ai/embed.js?id=YOUR_BOT_ID"></script>

Paste your personalized script in either the <head> or <body> section of your HTML file.

4

Add the Direqt Search Container

On your search results page, paste the following code where you want the AI Search interface to appear on the page:

<direqt-search-results></direqt-search-results>

If you have an existing search bar on your site you'd like to use in conjunction with your search results page, refer to the guide on Integrating Your Search Bar with Direqt.

(Optional) Adding Additional Search Bars

Your search results page will have a Direqt-provided search bar at the top of the page. If you wish to add an additional Direqt search bar to any other location on your site, e.g., your site header, refer to the guide on Embedding the Direqt Search Bar.

Last updated