AI Discovery Demo

Open access book discovery, powered by AI

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.

<script> window.ZendyConfig = { clientId: "doab_demo", mode: "discovery", // apiBaseUrl: "https://api.b2b.zendy.io", // optional, override API // iframeBaseUrl: "https://admin.b2b.zendy.io/iframe", // optional, override iframe discovery: { triggerId: "discovery-search-button", // required: button/element ID promptSourceId: "discovery-search-input", // optional: input element ID // Enable/disable AI search (pick one): enabledFlagId: "ai-search-toggle", // Option A: checkbox element ID // isEnabled: function() { return true; }, // Option B: custom function // (omit both for always-on) // Option C: always enabled showFullscreenButton: true // optional (default: true) }, // iframe: { // optional dimension overrides // maxWidth: 1274, // number (px) or string ("90vw") // maxHeight: 878, // width: "90vw", // height: "90vh" // } }; </script> <script src="https://admin.b2b.zendy.io/zendy-loader.js" async></script>

Configuration Reference

All available ZendyConfig options for discovery mode:

OptionTypeDescription
clientIdstringRequired. Your client identifier.
mode"discovery"Required. Set to "discovery" for search modal.
apiBaseUrlstringOptional. Override the API base URL.
iframeBaseUrlstringOptional. Override the iframe base URL.
discovery.triggerIdstringRequired. ID of the button/element that triggers the search.
discovery.promptSourceIdstringOptional. ID of the input to read the search query from.
discovery.enabledFlagIdstringOptional. ID of a checkbox to toggle AI search.
discovery.isEnabledfunctionOptional. Custom function returning boolean.
discovery.showFullscreenButtonbooleanOptional. Show fullscreen toggle (default: true).
iframe.maxWidthnumber | stringOptional. Max width of the modal iframe.
iframe.maxHeightnumber | stringOptional. Max height of the modal iframe.