Islam.js
A comprehensive JavaScript/TypeScript library designed for Islamic applications. It provides functionalities related to the Quran, Hadith, Dua & Azkar, Prayer Timings, and Hijri Calendar.
Tech Stack :

is a comprehensive JavaScript/TypeScript library designed for Islamic applications. It provides functionalities related to the Quran, Hadith, Dua & Azkar, Prayer Timings, and Hijri Calendar. This package offers multilingual support, a wide range of Tafseers, Hadith collections, and tools to enhance the development of Islamic software solutions.
Features
-
- Support for Dialects: Hafs and Warsh
- 20 Language Translations
- 28 Tafseers (Commentaries) in different languages
-
- Collections: Kutub al-Sittah (Six Authentic Books) with 5+ Translations
-
- 134 categories with over 360 Azkars (supplications)
-
- Accurate prayer timings for any location worldwide
-
- Hijri date conversion and calendar utilities
Installation
To install , use npm or yarn:
Getting Started
Import the library into your JavaScript or TypeScript project and start using the available features.
Usage
1. Quran
Get a chapter by index
Get a chapter by name
By default the dialect will be but we can change it to as well.
Get a verse by chapterNo and verseNo
Get multiple verses with translation
We can specify a different language for translation as well.
Get random verse with translation
Get a verse with translation and tafseer
2. Hadith
Get a hadith by book and hadithNo
Get a complete section from a book by sectionNo
By default the language will be English but We can specify a different language as well.
3. Dua & Azkar
Get a random supplication
Get a random supplication by category
Get all supplications by category
Get all supplications
4. Prayer Timings
Get prayer timing by location
Get prayer timing by city
5. Hijri Calander
Get hijri calander date by location
Get hijri calander date by city
Disclaimer
islam.js is an open-source package created to provide easy access to various Islamic resources such as Quran, Hadith, Dua, and Azkar. This package is not an authoritative source on Islam and should not be taken as a definitive representation of the religion.
I have made every effort to use authentic sources, but as with any human endeavor, there may be mistakes or inaccuracies. Users are encouraged to consult scholars or authentic religious sources for comprehensive understanding and verification.
By using this package, you acknowledge that it is provided as-is, and you agree to use it responsibly.
License
This package is freely available for everyone to use. If you find it beneficial, please remember me in your prayers.
May Allah forgive my sins and have mercy on all of us. Ameen.
May Allah forgive my sins and have mercy on all of us. Ameen.
Credits
This package utilizes the following resources:
- Quran and Translations: Surah Quran
- Tafseer (Commentaries): Tafsir API by spa5k
- Hadith Collections: Hadith API by fawazahmed
- Hijri Calendar and Prayer Times: Aladhan Prayer Times API
I am grateful to these resources for making their data available for public use.