Skip to main content

Chapters API

The Chapters API provides access to information about the 114 chapters (surahs) of the Quran.

Get All Chapters​

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

chapters.forEach((chapter) => {
console.log(`${chapter.id}. ${chapter.nameSimple} (${chapter.nameArabic})`);
console.log(` Verses: ${chapter.versesCount}`);
console.log(` Revelation: ${chapter.revelationPlace}`);
});

Chapter Type​

FieldTypeNotes
idnumberSequential chapter identifier.
versesCountnumberTotal verses in the chapter.
bismillahPrebooleanIndicates if Bismillah precedes the chapter.
revelationOrdernumberOrder of revelation.
revelationPlacestringmeccan or medinan.
pagesnumber[]Mushaf page range for the chapter.
nameComplexstringFull transliterated name (e.g., Al-Baqarah).
nameSimplestringCommon English name.
transliteratedNamestringTransliteration suitable for URLs.
nameArabicstringArabic chapter name.
translatedNameTranslatedNameLocalized name with language metadata.

With Language Options​

import { Language } from "@quranjs/api";

const arabicChapters = await client.chapters.findAll({
language: Language.ARABIC,
});

const urduChapters = await client.chapters.findAll({
language: Language.URDU,
});

Get Chapter by ID​

const alFatiha = await client.chapters.findById("1");
const alBaqarah = await client.chapters.findById("2");
const anNas = await client.chapters.findById("114");

Get Chapter Info​

const info = await client.chapters.findInfoById("1");

console.log(info.shortText); // Brief description
console.log(info.text); // Full description
console.log(info.source); // Source attribution

ChapterInfo Type​

FieldTypeNotes
idnumberUnique identifier for the info record.
chapterIdnumberChapter the info is associated with.
textstringFull descriptive text.
shortTextstringCondensed overview for quick display.
sourcestringAttribution for the content.
languageNamestringLanguage of the info text (e.g., english).