A TypeScript SDK for accessing various resources related to the Quran, including verses, chapters, audio recitations, translations, and more. This SDK provides a comprehensive set of APIs to interact with Quran data and resources efficiently.
To install the SDK, use npm or yarn or pnpm:
npm install al-quran-sdk
# or
yarn add al-quran-sdk
# or
pnpm install al-quran-sdk
Provides methods to fetch verses based on various criteria.
Fetches verses by chapter number.
Fetches verses by page number.
Fetches verses by Juz number.
Fetches verses by Hizb number.
Fetches verses by Rub el Hizb number.
Fetches a specific verse by its key.
Fetches a random verse.
Provides methods to fetch resource information.
Fetches information about a specific recitation.
Fetches information about a specific translation.
Fetches translations based on language.
Fetches Tafsirs based on language.
Fetches information about a specific Tafsir.
Fetches available recitation styles.
Fetches available languages.
Fetches information about chapters.
Fetches media associated with verses.
Provides methods to fetch Quranic text in various scripts.
Fetches the Indo-Pak script of an Ayah.
Fetches the Uthmani Tajweed script of an Ayah.
Fetches the Uthmani script of an Ayah.
Fetches the Uthmani simple script of an Ayah.
Fetches the Imlaei simple text of an Ayah.
getASingleTranslation(translation_id: string, query?: TranslationQuery): Promise<SingleTranslationResponse>
Fetches a single translation.
Fetches a single Tafsir.
Fetches glyph codes of an Ayah (version 1).
Fetches glyph codes of an Ayah (version 2).
Provides methods to fetch information about Juz.
Fetches all Juz.
Provides methods to fetch chapter information.
Fetches a list of chapters based on language.
Fetches information about a specific chapter.
Fetches detailed information about a specific chapter.
Provides methods to fetch audio recitations and related data.
Fetches audio recordings of a specific chapter by a particular reciter.
Fetches all chapter recordings by a specific reciter.
Fetches recitations based on language.
getAllAudioFilesofARecitation(recitation_id: number, query?: AudioQueryParams): Promise<ISingleRecitation>
Fetches all audio files of a specific recitation.
Fetches a list of chapter reciters based on language.
getAyahRecitationsForSpecificSurah(recitation_id: number, chapter_number: number): Promise<IAyahRecitationSpecificSurah>
Fetches Ayah recitations for a specific Surah.
getAyahRecitationsForSpecificJuz(recitation_id: number, juz_number: number): Promise<IAyahRecitationSpecificJuz>
Fetches Ayah recitations for a specific Juz.
getAyahRecitationForSpecificMadaniMushafPage(recitation_id: number, page_number: number): Promise<IAyahRecitationSpecificMadaniMushafPage>
Fetches Ayah recitations for a specific Madani Mushaf page.
getAyahRecitationForSpecificRubelHizb(recitation_id: number, rub_el_hizb_number: number): Promise<IAyahRecitationSpecificRubelHizb>
Fetches Ayah recitations for a specific Rub el Hizb.
getAyahRecitationForSpecificHizb(recitation_id: number, hizb_number: number): Promise<IAyahRecitationSpecificHizb>
Fetches Ayah recitations for a specific Hizb.
getAyahRecitationForSpecificAyah(recitation_id: number, ayah_key: string): Promise<IAyahRecitationSpecificAyah>
Fetches Ayah recitations for a specific Ayah.
Here's a basic example of how to use the SDK:
const { chapter } = require("al-quran-sdk");
chapter.listChapters('en')
.then((res) => console.log(res))
.catch((err) => console.error(err));
import { chapter } from "al-quran-sdk";
chapter.listChapters('en')
.then((res) => console.log(res))
.catch((err) => console.error(err));
Contributions are welcome! Please follow the standard GitHub fork-and-pull request workflow. If you have suggestions or improvements, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
This SDK aims to be inclusive and respectful of all religions and beliefs. The Quran is a central text in Islam, and this SDK is designed to provide access to Quranic data for educational and informational purposes. I strive to present facts and information neutrally and inclusively, and welcome feedback to improve my approach.