Skip to main content

Overview

Lazily loads the Quran text data. This dataset is loaded asynchronously to avoid increasing the initial bundle size.

Signature

Return value

Promise
A Promise that resolves to an array of QuranText objects. Each object represents a single verse from the Quran with metadata.

QuranText structure

Each verse in the returned array contains:
number
Global unique identifier for the verse
number
Chapter (Surah) number (1-114)
number
Verse (Ayah) number within the chapter
string
Display-formatted verse identifier
string
Quranic text in Uthmani script with diacritics (tashkeel)
string
Quranic text in standard Arabic script
string
Full standard text including Bismillah
number
Page number in the Mushaf
number
Juz (part) number (1-30)
string
Chapter name in Arabic
string
Chapter name in English
string
Romanized chapter name

Example

Load once at application startup, then reuse across multiple searches:

Data source

The Quran text data comes from Quranic Arabic Corpus v4.0: https://corpus.quran.com

Error handling

Throws an error if the data file cannot be loaded: