widebible
v0.1.1
Published
TypeScript SDK for WideBible -- Bible verses, people, places, cross-references, and study tools
Maintainers
Readme
widebible
TypeScript SDK for WideBible -- the complete Bible study platform with 66 books, 4 public domain translations (KJV, ASV, BBE, YLT), 3,000+ biblical people, 942 geocoded places, 432K cross-references, and structured study tools. Access verses, people, places, topics, glossary terms, timeline events, and reading plans through a fully typed async API. Zero runtime dependencies -- uses native fetch.
All data is drawn from widebible.com, a scripture reference site covering the Old and New Testaments with cross-references, genealogies, geographical data, and curated reading plans. The REST API is free, requires no authentication, and returns JSON with CORS enabled.
Explore the Bible at widebible.com -- Books | People | Places | Topics | Timeline
Table of Contents
- Install
- Quick Start
- What You'll Find on WideBible
- API Endpoints
- API Reference
- TypeScript Types
- Learn More About the Bible
- Also Available for Python
- WideHoly Scripture Platform
- License
Install
npm install widebibleQuick Start
import { WideBible } from "widebible";
// Initialize the client (no API key required)
const client = new WideBible();
// Get a Bible verse -- John 3:16 in KJV translation
const verse = await client.getVerse("john", 3, 16);
console.log(verse.results[0].text);
// List all 66 books of the Bible with chapter and verse counts
const books = await client.listBooks();
console.log(`${books.count} books`); // 66 books
// Search Bible verses by keyword
const results = await client.search("love", 5);
for (const v of results.results) {
console.log(`${v.reference}: ${v.text.slice(0, 80)}...`);
}
// Look up a biblical person -- Moses, leader of the Exodus
const moses = await client.getPerson("moses");
console.log(`${moses.name}: ${moses.bio}`);
// Get a geocoded biblical place with latitude/longitude
const jerusalem = await client.getPlace("jerusalem");
console.log(`${jerusalem.name}: ${jerusalem.latitude}, ${jerusalem.longitude}`);What You'll Find on WideBible
Bible Books & Translations
The Bible consists of 66 books divided into the Old Testament (39 books, from Genesis through Malachi) and the New Testament (27 books, from Matthew through Revelation). These books span genres including law, history, poetry, prophecy, gospels, and epistles, written over roughly 1,500 years.
WideBible provides 4 public domain English translations, each with a different translation philosophy:
| Translation | Code | Year | Philosophy |
|-------------|------|------|------------|
| King James Version | kjv | 1611 | Formal equivalence, literary English |
| American Standard Version | asv | 1901 | Formal equivalence, updated language |
| Bible in Basic English | bbe | 1949 | Limited vocabulary (850 core words) |
| Young's Literal Translation | ylt | 1862 | Ultra-literal, preserves Hebrew/Greek word order |
Books are organized into 10 groups that reflect the literary and theological structure of the canon:
| Group | Testament | Books | Example | |-------|-----------|-------|---------| | Pentateuch | Old | 5 | Genesis, Exodus, Leviticus | | Historical Books | Old | 12 | Joshua, Judges, Ruth, 1-2 Samuel | | Wisdom Literature | Old | 5 | Job, Psalms, Proverbs, Ecclesiastes | | Major Prophets | Old | 5 | Isaiah, Jeremiah, Ezekiel, Daniel | | Minor Prophets | Old | 12 | Hosea, Joel, Amos, Malachi | | Gospels | New | 4 | Matthew, Mark, Luke, John | | Acts | New | 1 | Acts of the Apostles | | Pauline Epistles | New | 13 | Romans, 1-2 Corinthians, Galatians | | General Epistles | New | 8 | Hebrews, James, 1-2 Peter, 1-3 John | | Apocalyptic | New | 1 | Revelation |
import { WideBible } from "widebible";
const client = new WideBible();
// List all 66 books with chapter and verse counts
const books = await client.listBooks();
console.log(`${books.count} books of the Bible`);
// Get detailed information about a specific book
const genesis = await client.getBook("genesis");
console.log(`${genesis.name}: ${genesis.chapter_count} chapters, ${genesis.verse_count} verses`);
// Retrieve a verse in a specific translation
const verse = await client.getVerse("john", 3, 16, "asv");
console.log(verse.results[0].text);
// Browse book groups to understand canon structure
const groups = await client.listBookGroups();
for (const g of groups.results) {
console.log(`${g.name}: ${g.book_count} books`);
}Learn more: Bible Book Explorer | Translation Comparison | Reading Plans
Biblical People & Genealogies
WideBible catalogs over 3,000 people mentioned in the Bible, from patriarchs and matriarchs through kings, prophets, and apostles. Each person entry includes biographical details, testament association, verse count, and Wikidata cross-references for further research.
The biblical narrative spans 10 major eras:
| Era | Period | Key Figures | |-----|--------|-------------| | Patriarchs | ~2000-1700 BC | Abraham, Isaac, Jacob, Joseph | | Exodus | ~1446-1406 BC | Moses, Aaron, Miriam, Joshua | | Judges | ~1375-1050 BC | Deborah, Gideon, Samson, Samuel | | United Kingdom | ~1050-930 BC | Saul, David, Solomon | | Divided Kingdom | ~930-586 BC | Elijah, Elisha, Isaiah, Jeremiah | | Exile | ~586-538 BC | Daniel, Ezekiel, Esther | | Return | ~538-400 BC | Ezra, Nehemiah, Zerubbabel | | Intertestamental | ~400 BC-5 BC | Maccabees (referenced in NT context) | | Gospel | ~5 BC-33 AD | Jesus, Mary, John the Baptist | | Apostolic | ~33-100 AD | Peter, Paul, James, John |
// Look up a biblical person by slug
const moses = await client.getPerson("moses");
console.log(`${moses.name} -- mentioned in ${moses.verse_count} verses`);
// List all biblical people
const people = await client.listPeople();
console.log(`${people.count} people in the Bible`);
// Explore timeline eras
const eras = await client.listEras();
for (const era of eras.results) {
console.log(`${era.name}: ${era.start_year} to ${era.end_year}`);
}Learn more: Biblical People Directory | Timeline of Biblical History
Places & Geography
WideBible includes 942 geocoded biblical locations spanning the ancient Near East, from Egypt and Mesopotamia to the Greco-Roman world. Each place entry includes latitude/longitude coordinates, description, verse count, and Wikidata references.
| Region | Key Places | Significance | |--------|------------|--------------| | Galilee | Nazareth, Capernaum, Sea of Galilee | Jesus' childhood and early ministry | | Judea | Jerusalem, Bethlehem, Jericho | Temple worship, birth of Jesus | | Egypt | Goshen, Nile, Red Sea | Exodus narrative, Holy Family refuge | | Mesopotamia | Babylon, Ur, Nineveh | Abraham's origin, Exile period | | Asia Minor | Ephesus, Antioch, Galatia | Pauline missionary journeys | | Rome | Rome, Puteoli | Center of the Roman Empire, Paul's trial |
// Get a geocoded biblical place with latitude/longitude
const jerusalem = await client.getPlace("jerusalem");
console.log(`${jerusalem.name}: (${jerusalem.latitude}, ${jerusalem.longitude})`);
// List all 942 biblical places
const places = await client.listPlaces();
console.log(`${places.count} biblical places with coordinates`);Learn more: Biblical Places Map | Glossary of Biblical Terms
Cross-References & Parallel Passages
With 432,000+ cross-references, WideBible maps the internal connections between Bible passages. Cross-references reveal typological links (Old Testament events foreshadowing New Testament fulfillment), direct quotations, thematic parallels, and synoptic gospel parallels.
The most densely cross-referenced books include Psalms, Isaiah, and Matthew, reflecting the deep intertextual web of prophecy, fulfillment, and liturgical usage throughout the biblical canon.
// Find cross-references from Genesis 1:1
const xrefs = await client.listCrossReferences({
from_book: "genesis",
from_chapter: "1",
from_verse: "1",
});
for (const ref of xrefs.results.slice(0, 5)) {
console.log(`${ref.from_ref} -> ${ref.to_ref}: ${ref.explanation}`);
}Learn more: Cross-Reference Explorer | Topic Index
Topics & Study Tools
WideBible organizes verses into thematic topics for structured Bible study. Topics like Love, Faith, Prayer, Salvation, and Forgiveness each aggregate relevant verses across both testaments, providing a topical index for devotional reading and theological research.
Additional study tools include a glossary of biblical terms with Hebrew and Greek original words, a historical timeline with dated events, and curated reading plans for systematic Bible reading.
// Browse all Bible study topics
const topics = await client.listTopics();
// Get verses grouped under a specific topic
const love = await client.getTopic("love");
console.log(`'${love.name}' topic: ${love.verse_count} verses`);
// Look up a biblical term with Hebrew/Greek origins
const covenant = await client.getGlossaryTerm("covenant");
console.log(`${covenant.term}: ${covenant.definition}`);
console.log(`Hebrew: ${covenant.hebrew_word ?? "N/A"}`);
// Browse curated reading plans
const plans = await client.listReadingPlans();
const plan = await client.getReadingPlan("bible-in-a-year");
console.log(`${plan.name}: ${plan.duration_days} days`);Learn more: Topic Index | Biblical Glossary | Reading Plans
API Endpoints
All endpoints are under https://widebible.com/api/v1/bible/. No authentication required. JSON responses with CORS enabled.
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | /books/ | List all 66 books |
| GET | /books/{slug}/ | Book details (chapters, verse count) |
| GET | /book-groups/ | List book groups (Pentateuch, Gospels, etc.) |
| GET | /book-groups/{slug}/ | Book group details |
| GET | /translations/ | List Bible translations |
| GET | /translations/{code}/ | Translation details |
| GET | /chapters/ | List chapters (filter: book__slug) |
| GET | /verses/ | List/search verses (filter: book__slug, chapter, verse, translation__code; search: search) |
| GET | /people/ | List biblical people |
| GET | /people/{slug}/ | Person details |
| GET | /places/ | List biblical places |
| GET | /places/{slug}/ | Place details with coordinates |
| GET | /topics/ | List study topics |
| GET | /topics/{slug}/ | Topic details |
| GET | /cross-references/ | List cross-references (filter: from_book, from_chapter, from_verse) |
| GET | /glossary/ | List glossary terms |
| GET | /glossary/{slug}/ | Glossary term details |
| GET | /timeline-eras/ | List timeline eras |
| GET | /timeline-events/ | List events (filter: era__slug) |
| GET | /reading-plans/ | List reading plans |
| GET | /reading-plans/{slug}/ | Reading plan with daily entries |
Example
curl -s "https://widebible.com/api/v1/bible/books/genesis/"{
"id": 1,
"name": "Genesis",
"slug": "genesis",
"abbreviation": "Gen",
"testament": "Old Testament",
"order": 1,
"chapter_count": 50,
"verse_count": 1533,
"description": "The book of beginnings -- creation, the fall, the flood, and the patriarchs.",
"url": "/books/genesis/"
}Full API documentation at widebible.com/developers/. OpenAPI 3.1.0 spec: widebible.com/api/schema/.
API Reference
| Method | Arguments | Returns | Description |
|--------|-----------|---------|-------------|
| listBooks() | -- | Promise<ApiResponse<Book>> | List all 66 books |
| getBook(slug) | slug: string | Promise<Book> | Book details |
| listBookGroups() | -- | Promise<ApiResponse<BookGroup>> | List book groups |
| getBookGroup(slug) | slug: string | Promise<BookGroup> | Book group details |
| listTranslations() | -- | Promise<ApiResponse<Translation>> | List translations |
| getTranslation(code) | code: string | Promise<Translation> | Translation details |
| listChapters(book?) | book?: string | Promise<ApiResponse<Chapter>> | List chapters |
| getVerse(book, chapter, verse, translation?) | book: string, chapter: number, verse: number, translation?: string | Promise<ApiResponse<Verse>> | Get a specific verse |
| search(query, limit?) | query: string, limit?: number | Promise<ApiResponse<Verse>> | Search verses |
| listPeople() | -- | Promise<ApiResponse<Person>> | List biblical people |
| getPerson(slug) | slug: string | Promise<Person> | Person details |
| listPlaces() | -- | Promise<ApiResponse<Place>> | List biblical places |
| getPlace(slug) | slug: string | Promise<Place> | Place details with coordinates |
| listTopics() | -- | Promise<ApiResponse<Topic>> | List study topics |
| getTopic(slug) | slug: string | Promise<Topic> | Topic details |
| listCrossReferences(params?) | params?: Record<string, string> | Promise<ApiResponse<CrossReference>> | List cross-references |
| listGlossary() | -- | Promise<ApiResponse<GlossaryTerm>> | List glossary terms |
| getGlossaryTerm(slug) | slug: string | Promise<GlossaryTerm> | Glossary term definition |
| listEras() | -- | Promise<ApiResponse<TimelineEra>> | List timeline eras |
| listEvents(era?) | era?: string | Promise<ApiResponse<TimelineEvent>> | List timeline events |
| listReadingPlans() | -- | Promise<ApiResponse<ReadingPlan>> | List reading plans |
| getReadingPlan(slug) | slug: string | Promise<ReadingPlan> | Reading plan with entries |
TypeScript Types
All response types are exported and available for strong typing:
import type {
ApiResponse,
Book,
BookGroup,
Chapter,
CrossReference,
GlossaryTerm,
Person,
Place,
ReadingPlan,
ReadingPlanEntry,
TimelineEra,
TimelineEvent,
Topic,
Translation,
Verse,
} from "widebible";Learn More About the Bible
- Scripture: Bible Books | Bible Translations | Reading Plans
- Reference: Biblical People | Biblical Places | Cross-References
- Study: Topic Index | Biblical Glossary | Timeline
- Tools: Verse Search | Developer Docs
- API: REST API Documentation | OpenAPI Spec
- Python: PyPI Package
Also Available for Python
| Platform | Package | Install |
|----------|---------|---------|
| PyPI | widebible | pip install widebible |
| Go | widebible-go | go get github.com/dobestan/widebible-go |
| Rust | widebible | cargo add widebible |
| Ruby | widebible | gem install widebible |
| MCP | widebible-mcp | uvx --from "widebible[mcp]" python -m widebible.mcp_server |
WideHoly Scripture Platform
Part of the WideHoly multi-religion scripture platform.
| Site | Domain | Focus | |------|--------|-------| | WideBible | widebible.com | 66 books, 4 translations (KJV, ASV, BBE, YLT), 3,000+ people, 942 places, 432K cross-references | | WideQuran | widequran.com | 114 surahs, hadith collections, tafsir commentary, Quranic figures | | WideTorah | widetorah.com | Tanakh, 54 parashot, Talmud tractates, Rashi commentary | | WideGita | widegita.com | 18 Gita chapters, Upanishads, Yoga Sutras, Hindu deities | | WideSutra | widesutra.com | Tipitaka, Mahayana sutras, Buddhist figures, core concepts | | WideHoly | wideholy.com | Cross-religion search, verse comparison, religious calendar |
License
MIT
