Skip to main content

Juzs API

The Juzs API provides information about the 30 Juzs, which are traditional divisions of the Quran.

Get All Juzs

const juzs = await client.juzs.findAll();

console.log(juzs[0]); // First Juz
// {
// id: 1,
// juzNumber: 1,
// verseMapping: {
// "1:1": "1:7",
// "2:1": "2:141"
// },
// firstVerseId: 1,
// lastVerseId: 148,
// versesCount: 148
// }

Juz Type

FieldTypeNotes
idnumberUnique identifier for the Juz.
juzNumbernumberJuz sequence from 1 to 30.
verseMappingRecord<string, string>Maps start/end verse keys for each section within the Juz.
firstVerseIdnumberIdentifier of the first verse in the Juz.
lastVerseIdnumberIdentifier of the last verse in the Juz.
versesCountnumberTotal verses contained in the Juz.

Understanding Verse Mapping

const juz = juzs[0];

Object.entries(juz.verseMapping).forEach(([start, end]) => {
console.log(`${start} to ${end}`);
});

// Output:
// 1:1 to 1:7 (Al-Fatiha complete)
// 2:1 to 2:141 (First part of Al-Baqarah)