A unified Bible data SDK, with optional drop-in Scripture components for web pages.
A community project. Bible text from HelloAO's Free Use Bible API, with no API key. YouVersion and fetch.bible are optional adapters. Use the DOM-free data API on its own, or add the reference finder and web components.
Bible data SDK
Discover versions, books, and chapters, and retrieve Scripture with attribution and display guidance. The data SDK works in a browser, Node, or Bun without components, DOM access, CSS injection, or page-wide component defaults.
Import /data for async/await, or /data/effect for native Effect programs. Both use the same Effect v4 implementation, validation, errors, and caching. HelloAO is the default; choose a provider to use fetch.bible or YouVersion.
Install the package. You do not need to import or directly install Effect for async/await. Effect remains a transitive runtime dependency and contributes to bundle size.
The example returns John 3:16–18 as passage.text, with separate attribution and instructions. See the passage data reference for result fields and supported passage IDs.
Native Effect API
If your application uses Effect, install effect@^4 directly and import from /data/effect. Methods return lazy Effects with the same results and ScriptureError in the failure channel.
The same discovery and passage example, composed as one Effect program:
Use Effect.catchTag("ScriptureError", ...) for expected failures. Layers, RequestPolicy, and service-based scripture programs are exported from /data/effect, not /data. See Effect configuration and custom providers for composition and testing.
Choose a Bible provider
Use HelloAO by default, or select fetch.bible or YouVersion. All three support the same data API. Each client uses one provider; it never substitutes a translation or falls back to another source.
| Provider | Setup | Default version ID |
|---|---|---|
| HelloAO | No API key. Default provider. | BSB |
| fetch.bible | No API key. Declare your usage. | eng_bsb |
| YouVersion | Requires a public app key. | 3034 |
Version IDs belong to one provider: BSB, eng_bsb, and 3034 are not interchangeable. Review the selected translation's license before use. Free access and usage filters do not grant commercial, redistribution, or offline rights.
YouVersion has additional paid-app and AI-use conditions. Review the YouVersion requirements before using that adapter.
HelloAO: use the default
HelloAO preserves headings, poetry, and words-of-Jesus formatting in native HTML when supplied by the translation. Its license notice, or the translation name linked to the license, appears below the displayed text. To create a separate provider instance, import createHelloAOProvider from @faith-tools/scripture-inline/providers/helloao.
fetch.bible: declare your usage
Set usage.commercial to your application's actual use. The example declares noncommercial use. The derivatives, attributionless, and limitless filters default to false, false, and true. Filters are not legal permission; review each translation's terms. The adapter uses the official collection.
YouVersion: add a public app key
Get a public app key from YouVersion Platform. Replace YOUR_PUBLIC_APP_KEY in this example:
YouVersion requirements
YouVersion has no commercial-use flag. Its Platform terms do not grant Bible-content rights. Check the selected publisher's license and applicable Tool terms.
- Paid applications are permitted subject to conditions, including conspicuously stating that the YouVersion Bible App is free. This is neither blanket permission nor a blanket commercial prohibition.
- The terms prohibit using Tools with AI for open-ended user chat except to retrieve and display Scripture verbatim.
- The terms prohibit using Tools to train, develop, refine, or improve AI. Cases beyond expressly permitted uses need prior written YouVersion approval.
- AI-assisted engineering and content generation have separate permissions and conditions in those terms.
These requirements also appear in returned YouVersion instructions.
Use providers with browser components
With a bundler, pass the same provider object to the components and reference finder. This example uses fetch.bible; use a HelloAO or YouVersion provider object in the same way:
For an individual passage or translation picker, assign element.bibleProvider = provider. Remove any provider attribute because it takes precedence. fetch.bible requires a bundler import; it is not a script-tag provider name.
Script tags support HelloAO by default and YouVersion through explicit settings: