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));
Headers: x-api-key : YOUR_API_KEY
Example Request: GET /surah
[
{
"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"
}
]
Headers: x-api-key : YOUR_API_KEY
Example Request: GET /surah/1
{
"number": 1,
"name": "الفاتحة",
"englishName": "Al-Fatiha",
"englishNameTranslation": "The Opening",
"numberOfAyahs": 7,
"revelationType": "Meccan"
}
Headers: x-api-key : YOUR_API_KEY
Example Request: GET /1:1&lang=eng
{
"number": 1,
"text": "In the name of Allah, the Most Gracious, the Most Merciful."
}
Headers: x-api-key : YOUR_API_KEY
Example Request: GET /audio/Alafasy_64kbps/1:1
Audio file (MP3 format)
Headers: x-api-key : YOUR_API_KEY
Example Request: GET /reciters
[
{
"name": "Alafasy",
"subfolder": "Alafasy_64kbps"
},
{
"name": "Minshawy Murattal",
"subfolder": "Minshawy_Murattal_128kbps"
}
]
Headers: x-api-key : YOUR_API_KEY
Example Request: GET /para-page/1:5
Image file (PNG format)
Headers: x-api-key : YOUR_API_KEY
Example Request: GET /surah-page/2:30
Image file (PNG format)
Headers: x-api-key : YOUR_API_KEY
Example Request: GET /
Complete Quran JSON structure with all verses