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

api-islam

v1.0.1

Published

The official TypeScript & JavaScript SDK for API_ISLAM — Quran with 9 Qiraat, Tajweed rules, Prayer times, Hijri calendar, Azkar, 99 Names of Allah, Zakat calculator and Islamic Radios.

Readme

api-islam

npm version License: MIT

Official, fully-typed TypeScript & JavaScript SDK for API_ISLAM — The Ultimate Open-Source Islamic Platform API.

Works seamlessly in Node.js, Browser, Next.js, React, Vue, Svelte, Angular, React Native, and Electron.


🌟 Features

  • 📖 Holy Quran with 9 Qira'at: Hafs, Warsh, Qaloon, Doori, Soosi, Shouba, Bazzi, Qumbul, Hafs Smart.
  • 🎨 Tajweed Colored Rules: Rules categorization and segment breakdown for recitation.
  • 🕌 Prayer Times & Qibla: Highly accurate timings calculation and Kaaba compass bearing & distance.
  • 📅 Hijri Calendar: Accurate Gregorian to Islamic Hijri conversion.
  • 📿 Azkar & Duas: Daily fortress of the Muslim (Hisn al-Muslim) supplications.
  • 🤲 40 Rabbana Duas: Quranic supplications with English meanings and references.
  • ✨ 99 Names of Allah: Asma' Allah Al-Husna with transliterations and meanings.
  • 🛡️ Ruqyah Shariah: Comprehensive Islamic healing verses and supplications.
  • 💰 Zakat Calculator: Instant Nisab and Zakat calculation on Cash, Gold, Silver, and Trade goods.
  • 📻 Live Islamic Radios: Global Quran and Islamic radio streams.
  • 🖼️ Mushaf Page Images: High-resolution Mushaf page images (1–604) with CDN fallback.

📦 Installation

npm install api-islam
# or
yarn add api-islam
# or
pnpm add api-islam
# or
bun add api-islam

🚀 Quick Start

import { ApiIslam } from 'api-islam';

const api = new ApiIslam({
  baseUrl: 'https://your-api-islam-instance.com', // or 'http://localhost:8000'
});

async function run() {
  // 1. Get Surah Al-Fatihah with Warsh recitation
  const surah = await api.quran.getSurah(1, 'warsh');
  console.log(`Surah: ${surah.info.name} (${surah.qiraah})`);
  surah.verses.forEach(v => console.log(`[${v.verse_number}] ${v.text}`));

  // 2. Get Prayer Times for Tunis (36.8065, 10.1815)
  const times = await api.prayers.getPrayerTimes({
    latitude: 36.8065,
    longitude: 10.1815,
  });
  console.log(`Fajr: ${times.timings.Fajr}, Maghrib: ${times.timings.Maghrib}`);

  // 3. Get Qibla Direction
  const qibla = await api.prayers.getQibla(36.8065, 10.1815);
  console.log(`Qibla: ${qibla.direction}° (${qibla.compass_direction})`);

  // 4. Calculate Zakat for $10,000 Cash
  const zakat = await api.tools.calculateZakat({ cash: 10000 });
  console.log(`Zakat Due: ${zakat.zakat_due} ${zakat.currency}`);
}

run();

💡 Code Examples

🎨 Tajweed Colored Breakdown

const rules = await api.tajweed.getRules();
const surahTajweed = await api.tajweed.getSurahTajweed(1);

surahTajweed.forEach(ayah => {
  ayah.segments.forEach(seg => {
    console.log(`${seg.text} -> Color: ${seg.color} (${seg.rule})`);
  });
});

📿 Morning & Evening Azkar

const morningAzkar = await api.azkar.getByCategory('morning');
const namesOfAllah = await api.azkar.getNamesOfAllah();
const rabbanaDuas = await api.azkar.getRabbanaDuas();

📻 Islamic Radios & Mushaf Pages

// Live Radios
const radios = await api.media.getRadios();

// Mushaf Page Direct Image URL
const imageUrl = api.media.getMushafPageImageUrl(1);

📄 License

MIT License © 2026 Louay Gharsalli