npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

holy-bible-api

v1.0.6

Published

OpenAPI Client for Holy Bible API

Readme

Holy Bible API - TypeScript Client

A clean, well-typed TypeScript client for the Holy Bible API.

Installation

npm install holy-bible-api

🚀 Quick Start

import { createBibleApi } from 'holy-bible-api';

// Create API instance
const api = createBibleApi();

// Get all available Bibles
const bibles = await api.getBibles();
console.log(bibles);

📚 Available Methods

Text Bible Methods

getBibles(options?) - Get all available Bibles

// Get all Bibles
const bibles = await api.getBibles();
// Response: { bibles: Array<{ bibleId: number, language: string, version?: string }> }

// Filter by language
const englishBibles = await api.getBibles({ language: "en" });

// Filter by version
const kjvBibles = await api.getBibles({ version: "KJV" });

getBibleBooks({ bibleId }) - Get number of books in a Bible

const books = await api.getBibleBooks({ bibleId: 1 });
// Response: { numBooks: number }
console.log(`Bible has ${books.numBooks} books`);

getBibleChapters({ bibleId, bookNum }) - Get number of chapters in a book

const chapters = await api.getBibleChapters({ bibleId: 1, bookNum: 1 });
// Response: { numChapters: number }
console.log(`Book 1 has ${chapters.numChapters} chapters`);

getBibleVerses({ bibleId, bookNum, chapterNum, start?, end? }) - Get verses from a chapter

// Get all verses from Genesis 1
const verses = await api.getBibleVerses({ 
  bibleId: 1, 
  bookNum: 1, 
  chapterNum: 1 
});
// Response: { verses: Array<{ bibleId: number, book: number, chapter: number, verse: number, text: string }> }

// Get specific verse range (verses 1-5)
const firstFiveVerses = await api.getBibleVerses({ 
  bibleId: 1, 
  bookNum: 1, 
  chapterNum: 1,
  start: 1,
  end: 5
});

getBibleVerseByNumber({ bibleId, bookNum, chapterNum, verseNum }) - Get a specific verse

const verse = await api.getBibleVerseByNumber({ 
  bibleId: 1, 
  bookNum: 1, 
  chapterNum: 1, 
  verseNum: 1 
});
// Response: { bibleId: number, book: number, chapter: number, verse: number, text: string }
console.log(verse.text); // "In the beginning God created the heaven and the earth."

Audio Bible Methods

getAudioBibles(options?) - Get all available audio Bibles

// Get all audio Bibles
const audioBibles = await api.getAudioBibles();
// Response: { audioBibles: Array<{ audioBibleId: number, language: string, version?: string }> }

// Filter by language
const englishAudioBibles = await api.getAudioBibles({ language: "en" });

getAudioBibleBooks({ audioBibleId }) - Get number of books in an audio Bible

const audioBooks = await api.getAudioBibleBooks({ audioBibleId: 1 });
// Response: { numBooks: number }
console.log(`Audio Bible has ${audioBooks.numBooks} books`);

getAudioBibleChapters({ audioBibleId, bookNum }) - Get number of chapters in an audio book

const audioChapters = await api.getAudioBibleChapters({ audioBibleId: 1, bookNum: 1 });
// Response: { numChapters: number }
console.log(`Audio Book 1 has ${audioChapters.numChapters} chapters`);

getAudioChapter({ audioBibleId, bookNum, chapterNum }) - Stream audio for a chapter

// This method streams audio data (returns void)
await api.getAudioChapter({ 
  audioBibleId: 1, 
  bookNum: 1, 
  chapterNum: 1 
});

Health Check

getHealth() - Check API health

const health = await api.getHealth();
// Response: string (e.g., "OK")
console.log(`API Status: ${health}`);

🔧 Configuration

import { createBibleApi } from 'holy-bible-api-typescript';

// Use default endpoint
const api = createBibleApi();

// Use custom endpoint
const api = createBibleApi('https://your-api-endpoint.com');

📝 Complete Example

import { createBibleApi } from 'holy-bible-api-typescript';

async function demonstrateAPI() {
  const api = createBibleApi();
  
  try {
    // Check API health
    const health = await api.getHealth();
    console.log('API Status:', health);
    
    // Get available Bibles
    const bibles = await api.getBibles();
    console.log('Available Bibles:', bibles.bibles.length);
    
    // Get books in first Bible
    const books = await api.getBibleBooks({ bibleId: 1 });
    console.log(`Bible has ${books.numBooks} books`);
    
    // Get chapters in first book
    const chapters = await api.getBibleChapters({ bibleId: 1, bookNum: 1 });
    console.log(`First book has ${chapters.numChapters} chapters`);
    
    // Get verses from first chapter
    const verses = await api.getBibleVerses({ bibleId: 1, bookNum: 1, chapterNum: 1 });
    console.log(`First chapter has ${verses.verses.length} verses`);
    
    // Get a specific verse
    const verse = await api.getBibleVerseByNumber({ 
      bibleId: 1, 
      bookNum: 1, 
      chapterNum: 1, 
      verseNum: 1 
    });
    console.log('First verse:', verse.text);
    
    // Get audio Bibles
    const audioBibles = await api.getAudioBibles();
    console.log('Available Audio Bibles:', audioBibles.audioBibles.length);
    
  } catch (error) {
    console.error('Error:', error);
  }
}

demonstrateAPI();