API Setup & Protection

INFO How to Protect Your App

Your Islamic World app needs API protection. Follow these steps:

1

Register Your Domain

Submit your domain for approval using the registration form below.

2

Wait for Approval

Admin will review and approve your domain (typically 24-48 hours).

3

Get Your API Key

Once approved, you'll receive an API key from the admin.

4

Integrate Protection

Use the JavaScript SDK in your app (code example below).

JavaScript Integration
// Initialize IslamicData API with protection
const api = IslamicData.init({
    apiKey: 'ISL_xxxxxxxxxxxxxxxxxxxx', // Your API key
    checkDomain: true
});

// Make protected requests
async function loadSurah() {
    try {
        const surah = await api.getSurah(1);
        console.log('Surah loaded:', surah.name);
        
        // Check your usage stats
        const stats = await api.getUsageStats();
        console.log(`Usage: ${stats.usageToday}/${stats.dailyLimit}`);
    } catch (error) {
        console.error('Error:', error.message);
    }
}

Quran API

GET /AlQuran/surah/surah_{number}.json

Get Arabic text for a specific Surah (1-114)

Example Request
GET https://islamicdata.vercel.app/AlQuran/surah/surah_1.json
Response
{
  "index": "001",
  "name": "al-Fatihah",
  "verse": {
    "verse_1": "بِسْمِ ٱللَّهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ",
    "verse_2": "ٱلْحَمْدُ لِلَّهِ رَبِّ ٱلْعَٰلَمِينَ"
  },
  "count": 7
}
GET /AlQuran/translation/{lang}/{lang}_translation_{number}.json

Get translation for a specific Surah in various languages

Available Languages

ar Arabic
en English
bn Bengali
ur Urdu
es Spanish
fr French
id Indonesian
ru Russian
tr Turkish
zh Chinese
hi Hindi
Example Request (English, Surah 1)
GET https://islamicdata.vercel.app/AlQuran/translation/en/en_translation_001.json
Note: Surah number must be zero-padded (001, 002, ... 114)
GET /AlQuran/audio/{surah}/{verse}.mp3

Get audio recitation for a specific verse

Example Request (Surah 1, Verse 1)
GET https://islamicdata.vercel.app/AlQuran/audio/001/001.mp3
Note: Both surah and verse numbers must be zero-padded (3 digits)

Hadith API

GET /Hadiths/JSON/{collection}.json

Get Hadith collection from various authentic sources

Available Collections

  • All_Hadiths - Complete collection
  • Sahih_Bukhari - Sahih al-Bukhari
  • Sahih_Muslim - Sahih Muslim
  • Sunnah_Abi_Daud - Sunan Abu Dawud
  • Jami_al_Tirmidhi - Jami' at-Tirmidhi
  • Sunnan_an_Nasai - Sunan an-Nasa'i
  • Sunnan_Ibn_Majah - Sunan Ibn Majah
Example Request
GET https://islamicdata.vercel.app/Hadiths/JSON/Sahih_Bukhari.json

Islamic Quiz API

GET /Quiz/islamic_quiz.json

Get 2000+ Islamic quiz questions for adults

Example Request
GET https://islamicdata.vercel.app/Quiz/islamic_quiz.json

Quiz Categories

Quran
Hadith
Fiqh
Seerah
Prophets
History
GET /Quiz/islamic_quiz_children.json

Get Islamic quiz questions designed for children

Example Request
GET https://islamicdata.vercel.app/Quiz/islamic_quiz_children.json

99 Names of Allah API

GET /AlQuran/99names/99_names.json

Get all 99 Names of Allah with meanings

Example Request
GET https://islamicdata.vercel.app/AlQuran/99names/99_names.json

Islamic Stories API

GET /Stories/islamic_stories.json

Get collection of Islamic stories

Example Request
GET https://islamicdata.vercel.app/Stories/islamic_stories.json

Story Categories

Prophets
Companions
Miracles
Ethics
History

Dua (Supplications) API

GET /AlQuran/dua/duas_data.json

Get Duas from Hisnul Muslim

Example Request
GET https://islamicdata.vercel.app/AlQuran/dua/duas_data.json

Dua Categories

Morning
Evening
Prayer
Travel
Food
Sleep

Envato Purchase Verification

POST Verify & Register Domain

Verify your Envato purchase and submit your domain for API access

Purchase Verification

Enter your Envato purchase code to verify your license. After verification, you can register your domain.

Your Envato account email
Found in your Envato purchase confirmation email

Code Examples

// Initialize IslamicData API with protection
const api = IslamicData.init({
    apiKey: 'ISL_xxxxxxxxxxxxxxxxxxxx',
    checkDomain: true
});

// Fetch Surah
async function getSurah(surahNumber) {
    return await api.getSurah(surahNumber);
}

// Fetch Hadith
async function getHadiths(collection = 'All_Hadiths') {
    return await api.getHadiths(collection);
}

// Fetch Quiz
async function getQuiz(forChildren = false) {
    return await api.getQuiz(forChildren);
}

// Fetch 99 Names
async function get99Names() {
    return await api.get99Names();
}

// Get usage stats
async function checkUsage() {
    return await api.getUsageStats();
}

// Usage
getSurah(1).then(data => console.log(data));
getHadiths('Sahih_Bukhari').then(h => console.log(`${h.length} hadiths`));
checkUsage().then(stats => console.log(`Usage: ${stats.usageToday}/${stats.dailyLimit}`));
import requests

BASE_URL = "https://islamicdata.vercel.app"
API_KEY = "ISL_xxxxxxxxxxxxxxxxxxxx"

def get_surah(surah_number):
    padded = str(surah_number).zfill(3)
    url = f"{BASE_URL}/AlQuran/surah/surah_{padded}.json"
    headers = {"X-API-Key": API_KEY}
    return requests.get(url, headers=headers).json()

def get_hadiths(collection="All_Hadiths"):
    url = f"{BASE_URL}/Hadiths/JSON/{collection}.json"
    headers = {"X-API-Key": API_KEY}
    return requests.get(url, headers=headers).json()

def get_quiz(for_children=False):
    file = "islamic_quiz_children.json" if for_children else "islamic_quiz.json"
    url = f"{BASE_URL}/Quiz/{file}"
    headers = {"X-API-Key": API_KEY}
    return requests.get(url, headers=headers).json()

# Usage
surah = get_surah(1)
print(f"Surah: {surah['name']}")
# With API Key header
curl -H "X-API-Key: ISL_xxxxxxxxxxxxxxxxxxxx" \
     https://islamicdata.vercel.app/AlQuran/surah/surah_1.json

# Without API key (for public endpoints)
curl https://islamicdata.vercel.app/AlQuran/surah/surah_1.json