Skip to content

Embedding the search page

The search page component provides a full search interface with AI-generated answers, search results, and a text input — suitable for a dedicated search page on your site. Unlike the chat widget, which floats over your content, the search page embeds directly into your page layout.

Add a container element and the search page script to your HTML:

<div id="quant-search"></div>
<script
src="https://ai.quantcdn.io/v1/search-page.js"
data-site-id="YOUR_SITE_ID"
data-container="quant-search"
data-theme="light"
data-show-ai-answer="true"
data-results-limit="10">
</script>

Replace YOUR_SITE_ID with your project’s site ID.

Customise the search page using data attributes on the script tag:

AttributeRequiredDefaultDescription
data-site-idYesYour project’s site ID
data-containerYesID of the container element
data-themeNolightColour theme: light or dark
data-show-ai-answerNotrueShow AI-generated summary above results
data-results-limitNo10Maximum number of search results to display

When enabled, the search page displays an AI-generated summary above the traditional search results, synthesised from your indexed content. This gives visitors a direct answer to their query without needing to click through to individual pages.

To disable AI answers, set data-show-ai-answer="false":

<script
src="https://ai.quantcdn.io/v1/search-page.js"
data-site-id="YOUR_SITE_ID"
data-container="quant-search"
data-show-ai-answer="false">
</script>

When AI answers are disabled, the search page functions as a traditional search results page.

  • Chat widget — Add a floating chat button for conversational search
  • Managing the index — View, search, and manage indexed pages
  • Settings — Configure allowed domains and rate limits