AI Insite Webpage APIs

  • Updated

Improve your website's search and information discovery experience with AI Insite webpage APIs, helping visitors find what they are looking for quickly. Our webpage APIs enable you to connect elements on your web pages to Insite and generate answers. For example, Insite can :

  • Power AI Search across your website by connecting a search form to Insite.
  • Enable your visitors to learn more about specific topics by linking text or images to Insite.

How It Works

When a user submits a question through the search box or clicks a connected link, a message is sent to Insite using window.postMessage Insite receives the request, processes it, and displays an answer with page links.

Implementation

Step 1. Add a Search Box

To enable users to type and submit queries, add the following search box to your webpage:

<form onsubmit="event.preventDefault(); sendSearchTermToIframe(document.getElementById('searchTerm').value);">
   <input type="text" id="searchTerm" placeholder="Ask me anything..." />
   <button type="submit">Search</button>
</form>

Step 2. Create Clickable AI-Enabled Links

You can define links that send predefined queries to Insite:

<a onclick="sendSearchTermToIframe('What services do you provide?');">
   What services do you provide?
</a>

Example Use Case

If a webpage wants to provide interactive support, it can embed this functionality to let users ask questions directly instead of navigating through static content.

For example, if a support page contains multiple FAQ links, instead of redirecting users to another page, clicking a question can trigger Insite to provide an immediate answer.

Was this article helpful?

Have more questions? Submit a request