Book Search
Search with AI-powered discovery. Toggle AI search on or off. When enabled, pressing the AI Search button or hitting Enter opens the discovery widget.
Embed code
Add the following snippet to your website. Configure with your own clientId,
trigger element IDs, and optional enable/disable controls.
Configuration Reference
All available ZendyConfig options for discovery mode:
| Option | Type | Description |
|---|---|---|
clientId | string | Required. Your client identifier. |
mode | "discovery" | Required. Set to "discovery" for search modal. |
apiBaseUrl | string | Optional. Override the API base URL. |
iframeBaseUrl | string | Optional. Override the iframe base URL. |
discovery.triggerId | string | Required. ID of the button/element that triggers the search. |
discovery.promptSourceId | string | Optional. ID of the input to read the search query from. |
discovery.enabledFlagId | string | Optional. ID of a checkbox to toggle AI search. |
discovery.isEnabled | function | Optional. Custom function returning boolean. |
discovery.showFullscreenButton | boolean | Optional. Show fullscreen toggle (default: true). |
iframe.maxWidth | number | string | Optional. Max width of the modal iframe. |
iframe.maxHeight | number | string | Optional. Max height of the modal iframe. |