### Example JSON Response for Surahs API Source: https://github.com/the-quran-project/quran-api/blob/main/pages/getting-started/list-of-chapters.mdx This snippet shows the structure and example data returned by the `/api/surah.json` endpoint. It illustrates the format of the array containing Surah information objects, including names, translation, revelation place, and verse count. ```JSON [ { "surahName": "Al-Faatiha", "surahNameArabic": "الفاتحة", "surahNameArabicLong": "سُورَةُ ٱلْفَاتِحَةِ", "surahNameTranslation": "The Opening", "revelationPlace": "Mecca", "totalAyah": 7 }, { "surahName": "Al-Baqara", "surahNameArabic": "البقرة", "surahNameArabicLong": "سورة البقرة", "surahNameTranslation": "The Cow", "revelationPlace": "Madina", "totalAyah": 286 }, { "surahName": "Aal-i-Imraan", "surahNameArabic": "آل عمران", "surahNameArabicLong": "سورة آل عمران", "surahNameTranslation": "The Family of Imraan", "revelationPlace": "Madina", "totalAyah": 200 }, ... ] ``` -------------------------------- ### Self-Hosting with Node.js - Bash Source: https://github.com/the-quran-project/quran-api/blob/main/README.md Outlines the steps to clone the repository, navigate into the directory, install Node.js dependencies, run a Python script (likely for data processing), build the project, and serve the output directory using npx serve. ```bash git clone https://github.com/The-Quran-Project/Quran-API/ --depth 1 cd Quran-API npm i --loglevel=error python public/main.py npm run build npx -y serve@latest out ``` -------------------------------- ### Self-Hosting with Node.js (One Line) - Bash Source: https://github.com/the-quran-project/quran-api/blob/main/README.md Provides a single command string that executes the sequence of operations required to clone, install dependencies, process data, build, and serve the project using Node.js. ```bash git clone https://github.com/The-Quran-Project/Quran-API/ --depth 1 && cd Quran-API && npm i --loglevel=error && python public/main.py && npm run build && npx -y serve@latest out ``` -------------------------------- ### Example Response for Quran Verse API (JSON) Source: https://github.com/the-quran-project/quran-api/blob/main/public/templates/get-a-verse.mdx An example JSON object representing the response returned by the API when requesting a specific verse. It contains information about the requested Ayah. ```json VERSE_2_RESPONSE ``` -------------------------------- ### Example JSON Response for Reciters API Source: https://github.com/the-quran-project/quran-api/blob/main/public/templates/available-reciters.mdx An example of the JSON object returned by the `/reciters.json` endpoint, showing the structure of the reciter list. ```json RECITER_LIST ``` -------------------------------- ### Example Response for Quran API Chapter Endpoint - JSON Source: https://github.com/the-quran-project/quran-api/blob/main/pages/getting-started/get-a-chapter.mdx This JSON object shows the structure and content of the response returned by the Quran API when requesting a specific Surah (chapter). It includes the Surah's name in various forms, revelation place, total verses, Surah number, audio links for different reciters, and translations of the verses in English, Arabic, Bengali, and Urdu. ```json { "surahName": "Al-Ikhlaas", "surahNameArabic": "الإخلاص", "surahNameArabicLong": "سورة الإخلاص", "surahNameTranslation": "Sincerity", "revelationPlace": "Mecca", "totalAyah": 4, "surahNo": 112, "audio": { "1": { "reciter": "Mishary Rashid Al Afasy", "url": "https://github.com/The-Quran-Project/Quran-Audio-Chapters/raw/refs/heads/main/Data/1/112.mp3", "originalUrl": "https://server8.mp3quran.net/afs/112.mp3" }, "2": { "reciter": "Abu Bakr Al Shatri", "url": "https://github.com/The-Quran-Project/Quran-Audio-Chapters/raw/refs/heads/main/Data/2/112.mp3", "originalUrl": "https://server11.mp3quran.net/shatri/112.mp3" }, "3": { "reciter": "Nasser Al Qatami", "url": "https://github.com/The-Quran-Project/Quran-Audio-Chapters/raw/refs/heads/main/Data/3/112.mp3", "originalUrl": "https://server6.mp3quran.net/qtm/112.mp3" }, "4": { "reciter": "Yasser Al Dosari", "url": "https://github.com/The-Quran-Project/Quran-Audio-Chapters/raw/refs/heads/main/Data/4/112.mp3", "originalUrl": "https://server11.mp3quran.net/yasser/112.mp3" }, "5": { "reciter": "Hani Ar Rifai", "url": "https://github.com/The-Quran-Project/Quran-Audio-Chapters/raw/refs/heads/main/Data/5/112.mp3", "originalUrl": "https://server8.mp3quran.net/hani/112.mp3" } }, "english": [ "Say, ˹O Prophet,˺ “He is Allah—One ˹and Indivisible˺;", "Allah—the Sustainer ˹needed by all˺.", "He has never had offspring, nor was He born.", "And there is none comparable to Him.”" ], "arabic1": [ " قُلْ هُوَ ٱللَّهُ أَحَدٌ ``` -------------------------------- ### Example Response JSON for Quran Verse API Source: https://github.com/the-quran-project/quran-api/blob/main/pages/getting-started/get-a-verse.mdx This JSON object represents a successful response from the Quran API for a specific verse (Surah 1, Ayah 2). It includes details such as the Surah name, Ayah number, multiple audio links with different reciters, and translations in English, Arabic (with and without Tashkeel), Bengali, and Urdu. ```json { "surahName": "Al-Faatiha", "surahNameArabic": "الفاتحة", "surahNameArabicLong": "سُورَةُ ٱلْفَاتِحَةِ", "surahNameTranslation": "The Opening", "revelationPlace": "Mecca", "totalAyah": 7, "surahNo": 1, "ayahNo": 2, "audio": { "1": { "reciter": "Mishary Rashid Al Afasy", "url": "https://the-quran-project.github.io/Quran-Audio/Data/1/1_2.mp3", "originalUrl": "https://everyayah.com/data/Alafasy_128kbps/001002.mp3" }, "2": { "reciter": "Abu Bakr Al Shatri", "url": "https://the-quran-project.github.io/Quran-Audio/Data/2/1_2.mp3", "originalUrl": "https://everyayah.com/data/Abu_Bakr_Ash-Shaatree_128kbps/001002.mp3" }, "3": { "reciter": "Nasser Al Qatami", "url": "https://the-quran-project.github.io/Quran-Audio/Data/3/1_2.mp3", "originalUrl": "https://everyayah.com/data/Nasser_Alqatami_128kbps/001002.mp3" }, "4": { "reciter": "Yasser Al Dosari", "url": "https://the-quran-project.github.io/Quran-Audio/Data/4/1_2.mp3", "originalUrl": "https://everyayah.com/data/Yasser_Ad-Dussary_128kbps/001002.mp3" }, "5": { "reciter": "Hani Ar Rifai", "url": "https://the-quran-project.github.io/Quran-Audio/Data/5/1_2.mp3", "originalUrl": "https://everyayah.com/data/Hani_Rifai_192kbps/001002.mp3" } }, "english": "All praise is for Allah—Lord of all worlds", "arabic1": "ٱلْحَمْدُ لِلَّهِ رَبِّ ٱلْعَـٰلَمِينَ", "arabic2": "الحمد لله رب العالمين", "bengali": "সমস্ত প্রশংসা আল্লাহর জন্য, যিনি সৃষ্টিকুলের রব।", "urdu": "سب طرح کی تعریف خدا ہی کو (سزاوار) ہے جو تمام مخلوقات کا پروردگار ہے" } ``` -------------------------------- ### Example JSON Response for Full Quran Translation Source: https://github.com/the-quran-project/quran-api/blob/main/pages/getting-started/get-full-quran-translation.mdx This snippet shows the structure of the large JSON object returned by the API when requesting a full Quran translation. It includes details for each surah, such as names (English, Arabic, Arabic long, translated), revelation place, total verses, surah number, audio links for different reciters, and the translation text for each verse. ```json [\n {\n "surahName": "Al-Faatiha",\n "surahNameArabic": "الفاتحة",\n "surahNameArabicLong": "سُورَةُ ٱلْفَاتِحَةِ",\n "surahNameTranslation": "The Opening",\n "revelationPlace": "Mecca",\n "totalAyah": 7,\n "surahNo": 1,\n "audio": {\n "1": {\n "reciter": "Mishary Rashid Al Afasy",\n "url": "https://github.com/The-Quran-Project/Quran-Audio-Chapters/raw/refs/heads/main/Data/1/1.mp3",\n "originalUrl": "https://server8.mp3quran.net/afs/001.mp3"\n },\n "2": {\n "reciter": "Abu Bakr Al Shatri",\n "url": "https://github.com/The-Quran-Project/Quran-Audio-Chapters/raw/refs/heads/main/Data/2/1.mp3",\n "originalUrl": "https://server11.mp3quran.net/shatri/001.mp3"\n },\n "3": {\n "reciter": "Nasser Al Qatami",\n "url": "https://github.com/The-Quran-Project/Quran-Audio-Chapters/raw/refs/heads/main/Data/3/1.mp3",\n "originalUrl": "https://server6.mp3quran.net/qtm/001.mp3"\n },\n ...\n },\n "translation": [\n "In the Name of Allah—the Most Compassionate, Most Merciful.",\n "All praise is for Allah—Lord of all worlds",\n "the Most Compassionate, Most Merciful",\n "Master of the Day of Judgment.",\n "You ˹alone˺ we worship and You ˹alone˺ we ask for help.",\n "Guide us along the Straight Path",\n "the Path of those You have blessed—not those You are displeased with, or those who are astray."\n ]\n },\n {\n "surahName": "Al-Baqara",\n "surahNameArabic": "البقرة",\n "surahNameArabicLong": "سورة البقرة",\n "surahNameTranslation": "The Cow",\n ...\n },\n ...\n] ``` -------------------------------- ### Example Response JSON for Reciters Endpoint Source: https://github.com/the-quran-project/quran-api/blob/main/pages/getting-started/available-reciters.mdx This JSON object represents a sample response from the /reciters.json endpoint. It is a key-value pair structure where keys are numerical IDs and values are the names of the reciters. ```json { "1": "Mishary Rashid Al Afasy", "2": "Abu Bakr Al Shatri", "3": "Nasser Al Qatami", "4": "Yasser Al Dosari", "5": "Hani Ar Rifai" } ``` -------------------------------- ### Embedding Audio in HTML Source: https://github.com/the-quran-project/quran-api/blob/main/public/templates/audio-recitation.mdx This HTML snippet demonstrates how to embed an audio player directly into a web page using the `