Embeds
Add a scripture search widget or AI chatbot to any web page with two lines of HTML.
Search widget
The widget renders a search bar that queries /v1/bible/search using your API key:
<script src="https://platform.godfocus.io/widget/v1/embed.js"></script>
<godfocus-search data-api-key="YOUR_KEY"></godfocus-search>
Place both lines wherever you want the widget to appear. The script registers the custom element and injects the UI.
Replace YOUR_KEY with your real API key. The demo key shown above will return 401 โ this is expected.
Chatbot
The chatbot embed adds a floating chat button that opens a conversation powered by /v1/bible/ask:
<script src="https://platform.godfocus.io/widget/v1/embed.js"></script>
<div data-godfocus-chatbot data-api-key="YOUR_KEY"></div>
Place the div anywhere in your page body โ the script replaces it with the chatbot trigger button.
Customization
Both embeds support data attributes for customization:
| Attribute | Description | Default |
|---|---|---|
data-api-key | Your API key (required) | โ |
data-theme | Filter to a biblical theme | none |
data-top-k | Max results (search widget) | 5 |
data-placeholder | Search input placeholder | "Search scripture..." |
data-accent | CSS color for brand elements | #C4892A |
Example with customization:
<godfocus-search
data-api-key="YOUR_KEY"
data-theme="hope"
data-top-k="3"
data-placeholder="Find a verse about hope..."
data-accent="#8B5CF6"
></godfocus-search>
Security note
The embed scripts send requests directly from the browser using your API key. Use a restricted key (widget-only scope) for embeds, not your main server key. Widget keys can be created from the Dashboard.