Resources API
The Resources API provides metadata about translations, tafsirs, reciters, and other Quranic resources.
Recitations​
Get All Recitations​
const recitations = await client.resources.findAllRecitations();
recitations.forEach((r) => {
console.log(`${r.id}. ${r.reciterName ?? "Unknown"} (${r.style ?? "N/A"})`);
});
RecitationResource Type​
Field | Type | Notes |
---|---|---|
id | number | Unique identifier for the recitation. |
reciterName | string | Reciter's full name. |
style | string | Recitation style such as murattal . |
translatedName | TranslatedName | Localized display names. |
TranslatedName
objects include languageName
, name
, and optional localization metadata from the SDK.
Get Recitation Details​
const info = await client.resources.findRecitationInfo("2");
console.log(info.info); // Rich text/HTML describing the recitation
RecitationInfoResource Type​
Field | Type | Notes |
---|---|---|
id | number | Recitation identifier. |
info | string | Biography or extended information about the reciter. |
Translations​
Get All Translations​
const translations = await client.resources.findAllTranslations();
const english = translations.filter((t) => t.languageName === "english");
const urdu = translations.filter((t) => t.languageName === "urdu");
TranslationResource Type​
Field | Type | Notes |
---|---|---|
id | number | Translation identifier. |
name | string | Translation title. |
authorName | string | Translator's name. |
slug | string | URL-friendly slug. |
languageName | string | Language of the translation. |
translatedName | TranslatedName | Localized names and language metadata. |
Get Translation Details​
const info = await client.resources.findTranslationInfo("131");
console.log(info.info); // Information about the translation (HTML/string)
TranslationInfoResource Type​
Field | Type | Notes |
---|---|---|
id | number | Translation identifier. |
info | string | Extended translation details or biography. |
Tafsirs​
Get All Tafsirs​
const tafsirs = await client.resources.findAllTafsirs();
tafsirs.forEach((t) => {
console.log(`${t.name} by ${t.authorName}`);
});
TafsirResource Type​
Field | Type | Notes |
---|---|---|
id | number | Tafsir identifier. |
name | string | Tafsir title. |
authorName | string | Author of the tafsir. |
slug | string | URL-friendly identifier. |
languageName | string | Language of the tafsir. |
translatedName | TranslatedName | Localized name entries. |
Get Tafsir Details​
const info = await client.resources.findTafsirInfo("171");
console.log(info.name); // "Tafsir Ibn Kathir"
console.log(info.authorName); // "Ibn Kathir"
console.log(info.bio);
TafsirInfoResource Type​
Field | Type | Notes |
---|---|---|
id | number | Tafsir identifier. |
info | string | Detailed description or biography. |
Languages​
const languages = await client.resources.findAllLanguages();
languages.forEach((lang) => {
console.log(`${lang.name} (${lang.isoCode}) - native: ${lang.nativeName}`);
});
LanguageResource Type​
Field | Type | Notes |
---|---|---|
id | number | Language identifier. |
name | string | English name of the language. |
nativeName | string | Native script name. |
isoCode | string | ISO code (e.g., en ). |
direction | string | Text direction such as ltr or rtl . |
translatedNames | TranslatedName[] | Available localized names. |
Chapter Resources​
Chapter Information​
const chapterInfos = await client.resources.findAllChapterInfos();
chapterInfos.forEach((info) => {
console.log(`${info.name} - ${info.languageName}`);
});
ChapterInfoResource Type​
Field | Type | Notes |
---|---|---|
id | number | Resource identifier. |
name | string | Title of the chapter info resource. |
authorName | string | Author attribution. |
slug | string | URL-friendly identifier. |
languageName | string | Language of the chapter info. |
translatedName | TranslatedName | Localized names for the resource. |
Chapter Reciters​
const reciters = await client.resources.findAllChapterReciters();
reciters.forEach((r) => {
console.log(`${r.name} (${r.arabicName ?? "n/a"})`);
});
ChapterReciterResource Type​
Field | Type | Notes |
---|---|---|
id | number | Reciter identifier. |
name | string | Reciter name. |
arabicName | string | Arabic display name. |
relativePath | string | Relative file path for audio. |
format | string | Audio format, e.g., mp3 . |
filesSize | number | Total file size in kilobytes. |
Recitation Styles​
const styles = await client.resources.findAllRecitationStyles();
console.log(styles.murattal); // Murattal reciters
console.log(styles.mujawwad); // Mujawwad reciters
RecitationStylesResource Type​
Field | Type | Notes |
---|---|---|
mujawwad | string | Label for Mujawwad-style recitations. |
murattal | string | Label for Murattal-style recitations. |
muallim | string | Label for teaching-style recitations. |
Verse Media​
const media = await client.resources.findVerseMedia();
console.log(media.name); // Resource name
console.log(media.languageName); // Language associated with the resource
VerseMediaResource Type​
Field | Type | Notes |
---|---|---|
id | number | Media identifier. |
name | string | Media name. |
authorName | string | Author or curator name. |
languageName | string | Language associated with the resource. |