Quran API Documentation

Getting Started
Base URL:
BASE_URL
https://quran-api-ny11.onrender.com/api/v2/quran

Authentication

All API requests require an API key to be included in the request headers:

const axios = require('axios');

const config = {
  method: 'GET',
  url: 'https://quran-api-ny11.onrender.com/api/v2/quran/surah/1',
  headers: { 
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_API_KEY'
  }
};

axios(config)
  .then(response => console.log(JSON.stringify(response.data)))
  .catch(error => console.log(error));
1. Get All Surahs
GET /surah

Headers: x-api-key : YOUR_API_KEY

Example Request: GET /surah

Sample Response:
[
  {
    "number": 1,
    "name": "الفاتحة",
    "englishName": "Al-Fatiha",
    "englishNameTranslation": "The Opening",
    "numberOfAyahs": 7,
    "revelationType": "Meccan"
  },
  {
    "number": 2,
    "name": "البقرة",
    "englishName": "Al-Baqarah",
    "englishNameTranslation": "The Cow",
    "numberOfAyahs": 286,
    "revelationType": "Medinan"
  }
]
2. Get Surah by Number
GET /surah/:surahNumber

Headers: x-api-key : YOUR_API_KEY

Example Request: GET /surah/1

Sample Response:
{
  "number": 1,
  "name": "الفاتحة",
  "englishName": "Al-Fatiha",
  "englishNameTranslation": "The Opening",
  "numberOfAyahs": 7,
  "revelationType": "Meccan"
}
3. Get Ayah by Surah Number and Verse Number
GET /surahNumber:verseNumber&lang=eng

Headers: x-api-key : YOUR_API_KEY

Example Request: GET /1:1&lang=eng

Sample Response:
{
  "number": 1,
  "text": "In the name of Allah, the Most Gracious, the Most Merciful."
}
4. Get Audio
GET /audio/:reciter/surahNumber:verseNumber

Headers: x-api-key : YOUR_API_KEY

Example Request: GET /audio/Alafasy_64kbps/1:1

Sample Response:
Audio file (MP3 format)
5. Get Reciters
GET /reciters

Headers: x-api-key : YOUR_API_KEY

Example Request: GET /reciters

Sample Response:
[
  {
    "name": "Alafasy",
    "subfolder": "Alafasy_64kbps"
  },
  {
    "name": "Minshawy Murattal",
    "subfolder": "Minshawy_Murattal_128kbps"
  }
]
6. Get Para Images
GET /para-page/paraNumber:pageNumber

Headers: x-api-key : YOUR_API_KEY

Example Request: GET /para-page/1:5

Sample Response:
Image file (PNG format)
7. Get Surah Images
GET /surah-page/surahNumber:pageNumber

Headers: x-api-key : YOUR_API_KEY

Example Request: GET /surah-page/2:30

Sample Response:
Image file (PNG format)
8. Get All Verses in JSON Format
GET /

Headers: x-api-key : YOUR_API_KEY

Example Request: GET /

Sample Response:
Complete Quran JSON structure with all verses