Site search helps visitors locate published pages and can generate a summary of relevant content. The current embed connects to existing page controls; setting site_search.enabled does not create a complete search interface on its own.
Check the selected site's search availability first. Managed standalone sites require Pro for search. An unavailable feature and a broken selector need different fixes.
Prepare an external website#
Add an accessible form, input, and results region to the page:
<form id="site-search-form" role="search">
<label for="site-search-input">Search this site</label>
<input id="site-search-input" type="search" name="q">
<button type="submit">Search</button>
</form>
<div id="site-search-results" aria-live="polite"></div>
In the existing external embed configuration, use selectors that match those elements:
<script>
window.aeoSettings = {
organization_id: 123,
site_id: 456,
site_search: {
enabled: true,
form_selector: "#site-search-form",
input_selector: "#site-search-input",
results_selector: "#site-search-results",
limit: 10
}
};
</script>
<script src="https://app.answer.cloud/embed.js" defer></script>
Replace the IDs with the real target. If the embed already exists, merge these settings into that one installation. Keep the elements present when initialization runs. The bundle resolves its backend from the script origin unless you intentionally configure a supported override.
Understand the interaction#
The inline integration can show keyword matches while typing a query of at least two characters. Submitting the form or pressing Enter starts the semantic search and summary flow. The embed sends the selected organization, site ID, current page origin, query, mode, and result limit to /api/site_searches.
Keyword results, semantic matches, and a generated summary are different outputs. A successful keyword match does not establish that summary generation works. The current control behavior is implemented by the embed; keep your visible label and results region usable without assuming a particular overlay exists.
Hosted sites#
Hosted pages already receive a generated integration. Do not paste the external snippet into Astro to add a second installation. The general widget configuration currently does not pass arbitrary site_search settings through to hosted page settings. Use the site's supported search setup or contact support about the required integration path.
Verify and troubleshoot#
Search for a distinctive phrase from a known published page, then try a natural-language question. Check returned titles, links, hostname, summary accuracy, empty results, and failure behavior. Test keyboard submission and narrow screens.
If nothing responds, confirm selectors match the live DOM, the script loads, and search is enabled for the site. For wrong results, inspect site targeting and publication. See embed reference and search troubleshooting.