Continue on a page you host

Three widget controls can send people to a page on your own site: the Search Bar submit, the AI Overview button, and the Compare products control. They all work the same way — the widget appends query parameters to the URL you configured and opens it, and on that page the widget runs full-page and picks the conversation or comparison up from the URL. One hosted page can serve all three.

yoursite.com/ask
Search Bar to your page

The question travels in the address as prompt and autoSubmit=true.

yoursite.com/search/ask
AI Overview to your page

The conversation travels in the address as userId and conversationId.

In both cases the page you host runs the Full Page widget. That widget starts from what your page passes to init(). It does not read the address by itself, so your page copies the parameters across.

What each control sends

ControlYou setThe widget appendsAlso removed firstOpens in
Search Bar submitdisplay.action.url (action.type: 'external-url')prompt (the search text), autoSubmit=trueany prompt, autoSubmit, conversationId already on the URLnew tab unless action.newTab: false
AI Overview buttondisplay.ctaUrluserId (when known), conversationId (when a chat is active)any prompt, autoSubmit, aiModeConfig already on the URLnew tab unless ctaNewTab: false
AI Overview quote and askdisplay.ctaUrluserId, conversationId, prompt (the quoted text), autoSubmit=falseany prompt, autoSubmit, aiModeConfig already on the URLnew tab unless ctaNewTab: false
Compare productsdisplay.productCompareUrlcatalogId, productIds (JSON array), displayMode=productCompare, plus table presentation keys—new tab

Every other query parameter already on your URL is kept. The URL must be absolute http(s). If it is not, the Search Bar's Send button and Enter reopen the current page with the parameters added (only starter prompt chips do nothing), the AI Overview button also falls back to the current page, and the comparison opens inside the widget.

To resume a conversation, the page needs the same API key as the page that started it and a matching userId. If they do not match, the visitor sees an error. If you do not pass a userId, the widget makes an anonymous one from the visitor's browser and your site's host, so a page on a different host cannot resume an anonymous conversation. The AI Overview button always sends the conversation's own userId for this reason.

The page you host

Mount the Full Page Widget in a flex-column container (see Container layout). What the page passes into init() depends on which control sent the visitor:

<div id="rapidflare-agent" style="display: flex; flex-direction: column;"></div>
<script src="https://cloud.rapidflare.ai/storage/v1/object/public/rapidflare-embed-sdk/latest/agent.js"></script>
<script>
    const searchParams = new URLSearchParams(window.location.search);
    window.rapidflare.init({
        apiKey: 'YOUR_API_KEY',
        display: {
            type: 'full-page',
            container: '#rapidflare-agent'
        },
        // Search Bar: pre-fill and submit the question.
        prompt: searchParams.get('prompt') || undefined,
        autoSubmit: searchParams.get('autoSubmit') === 'true',
        // AI Overview: resume the same chat. For the quote and ask path,
        // autoSubmit is false, so the text is placed in the box and not sent.
        userId: searchParams.get('userId') || undefined,
        conversationId: searchParams.get('conversationId') || undefined
    });
</script>

For Compare products, mount with agent: 'product-selection' instead and pass nothing from the query string — the widget reads catalogId and productIds itself:

<div id="compare-mount" style="display: flex; flex-direction: column;"></div>
<script src="https://cloud.rapidflare.ai/storage/v1/object/public/rapidflare-embed-sdk/latest/agent.js"></script>
<script>
    window.rapidflare.init({
        apiKey: 'YOUR_API_KEY',
        agent: 'product-selection',
        display: {
            type: 'full-page',
            container: '#compare-mount'
        }
    });
</script>

A single page can do both: read agent from the query string, or route the Compare products URL to a dedicated path such as /compare. Keys the widget does not set for a given control are simply absent, and undefined values are ignored by init().