Dua API

This API provides Islamic duas (supplications) including categories, sub-categories, full translations with Arabic text, transliterations, references, and audio. Supports 53 languages via ISO language codes.

Base Request

GET https://islamicapi.com/api/v1/dua/?type={type}&lang={lang}&api_key={YOUR_API_KEY}

Query Parameters

type required

Specifies which data to return. Must be one of the four allowed values below.

Allowed values:

category — Returns all dua categories for the given language.

sub-category — Returns all sub-categories (sections within categories) for the given language.

translation — Returns dua translations for the given language. Supports optional dua_id and random parameters.

language — Returns the full list of supported languages. Does not require the lang parameter.

lang required*

ISO language code for the translation. Not required when type=language.

Example: en, bn, ar, hi

Available Language Codes:

am - Amharic (አማርኛ)  |  ar - Arabic (العربية)  |  az - Azerbaijani  |  bg - Bulgarian  |  bn - Bengali (বাংলা)  |  bs - Bosnian  |  cs - Czech  |  da - Danish  |  de - German  |  dv - Dhivehi  |  el - Greek  |  en - English  |  es - Spanish  |  et - Estonian  |  fa - Persian  |  fi - Finnish  |  fr - French  |  gu - Gujarati  |  ha - Hausa  |  haw - Hawaiian  |  he - Hebrew  |  hi - Hindi (हिन्दी)  |  hr - Croatian  |  hu - Hungarian  |  hy - Armenian  |  id - Indonesian  |  is - Icelandic  |  it - Italian  |  ja - Japanese  |  ka - Georgian  |  kk - Kazakh  |  km - Khmer  |  kn - Kannada  |  ko - Korean  |  ku - Kurdish  |  lo - Lao  |  lt - Lithuanian  |  ml - Malayalam  |  mr - Marathi  |  ms - Malay  |  mt - Maltese  |  my - Burmese  |  ne - Nepali  |  pa - Punjabi  |  pt - Portuguese  |  ro - Romanian  |  ru - Russian  |  ta - Tamil  |  te - Telugu  |  th - Thai  |  tr - Turkish  |  ur - Urdu (اردو)  |  zh - Chinese (中文)

dua_id optional

Only applicable when type=translation. If provided, returns the single dua matching that numeric ID instead of the full list.

Example: dua_id=3

random optional

Only applicable when type=translation. Set to true to receive a single randomly selected dua. If dua_id is also provided, dua_id takes priority.

Example: random=true

Priority rule for type=translation:
dua_id > random=true > return all duas (default)

1. Get Categories

Returns all dua categories for the specified language. Each category includes a name, URL slug, icon filename, and a subcategory count hint.

Request

GET https://islamicapi.com/api/v1/dua/?type=category&lang=en&api_key={YOUR_API_KEY}
JSON Response (success)
{
    "status": "success",
    "message": "Category fetched successfully",
    "data": [
        {
            "name": "Dua's Importance",
            "url": "duas-importance",
            "icon": "dua_s_importance.svg",
            "meta": "7 Subcategories"
        },
        {
            "name": "Dua's Excellence",
            "url": "duas-excellence",
            "icon": "dua_s_excellence.svg",
            "meta": "1 Subcategories"
        },
        {
            "name": "Morning & Evening",
            "url": "morning-and-evening",
            "icon": "morning_evening.svg",
            "meta": "3 Subcategories"
        },
        {
            "name": "Salah",
            "url": "salah",
            "icon": "salah.svg",
            "meta": "17 Subcategories"
        }
        // ... 40 more categories
    ]
}

2. Get Sub-Categories

Returns all sub-categories (individual sections within a category). Each entry contains an ID, title, parent category slug, and the list of dua IDs it contains.

Request

GET https://islamicapi.com/api/v1/dua/?type=sub-category&lang=en&api_key={YOUR_API_KEY}
JSON Response (success)
{
    "status": "success",
    "message": "Sub-category fetched successfully",
    "data": [
        {
            "id": 1,
            "title": "The servant is dependent on his Lord",
            "category": "duas-importance",
            "dua-ids": [1, 2, 3]
        },
        {
            "id": 2,
            "title": "The most important thing to ask Allah for",
            "category": "duas-importance",
            "dua-ids": [4, 5, 6, 7, 8, 9, 10, 11, 12]
        },
        {
            "id": 9,
            "title": "Times and places when dua will be accepted",
            "category": "time-of-dua",
            "dua-ids": [34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45]
        }
        // ... 115 more sub-categories
    ]
}

3. Get All Translations

Returns every dua translation for the specified language, sorted by dua ID. Each object contains Arabic text, transliteration, translation, audio path, hadith reference, benefits, and more.

Request

GET https://islamicapi.com/api/v1/dua/?type=translation&lang=en&api_key={YOUR_API_KEY}
JSON Response (success)
{
    "status": "success",
    "message": "Translations fetched successfully",
    "data": [
        {
            "dua_id": 1,
            "title": "...",
            "category_tags": [],
            "introduction": "...",
            "arabic": "...",
            "audio": "/audio/dua/1.mp3",
            "transliteration": "...",
            "translation": "...",
            "reference": "...",
            "hadith": { ... },
            "benefits": { ... },
            "when_to_recite": { ... },
            "how_to_perform": { ... },
            "faq": [],
            "related_duas": []
        },
        {
            "dua_id": 2,
            ...
        }
        // ... all duas in this language
    ]
}

4. Get a Specific Dua by ID

Returns a single dua object for the given dua_id. Takes priority over the random parameter if both are supplied.

Request

GET https://islamicapi.com/api/v1/dua/?type=translation&lang=en&dua_id=3&api_key={YOUR_API_KEY}
JSON Response (success)
{
    "status": "success",
    "message": "Translation fetched successfully",
    "data": {
        "dua_id": 3,
        "title": "Power of La Ilaha Illallah (Freeing of slave)",
        "category_tags": [],
        "introduction": "Say the following statement 10 times -",
        "arabic": "لا إلها إلا الله وحده لا شريك له، ...",
        "audio": "/audio/dua/3.mp3",
        "transliteration": "Laa ilahaa illAllahu wahdahu laa sharika lahu, lahul-mulku wa lahul-hamdu wa huwa 'alaa kulli shay'in qadir",
        "translation": "None has the right to be worshipped but Allah alone, Who has no partner. His is the dominion and His is the praise, and He is Able to do all things.",
        "reference": "Bukhari: 6404",
        "hadith": {
            "title": "Hadith about the Dua",
            "arabic": "...",
            "translation": "Narrated Amr bin Maimun: Whoever recites it ten times will be as if he manumitted one of Ishmael's descendants. [Bukhari: 6404]"
        },
        "benefits": {
            "title": "Benefits of Power of La Ilaha Illallah (Freeing of slave)",
            "description": "Saying the kalima tawhid brings a muslim closer to Allah's mercy...",
            "points": [
                "Kalima tawhid wipes away many sins and brings Barakah in every Amal and day.",
                "Zikr of Allah with la ilaha ilallah gives strength and peace to the muslim heart.",
                "The power of dua in this zikr brings reward like freeing a slave in Allah's eyes."
            ]
        },
        "when_to_recite": {
            "title": "When to Recite Kalima Tawhid",
            "description": "...",
            "points": [ "..." ]
        },
        "how_to_perform": {
            "title": "How to perform Kalima Tawhid for Strength and Blessings",
            "description": "...",
            "steps": [ "..." ]
        },
        "faq": [],
        "related_duas": []
    }
}

5. Get a Random Dua

Returns a single randomly selected dua for the specified language. If dua_id is also present in the request, it takes priority and random is ignored.

Request

GET https://islamicapi.com/api/v1/dua/?type=translation&lang=en&random=true&api_key={YOUR_API_KEY}
JSON Response (success)
{
    "status": "success",
    "message": "Random translation fetched successfully",
    "data": {
        "dua_id": 47,
        "title": "...",
        "arabic": "...",
        "audio": "/audio/dua/47.mp3",
        "transliteration": "...",
        "translation": "...",
        "reference": "...",
        "hadith": { ... },
        "benefits": { ... },
        "when_to_recite": { ... },
        "how_to_perform": { ... },
        "faq": [],
        "related_duas": []
    }
}

6. Get Supported Languages

Returns the complete list of supported languages. The lang parameter is not required for this request type.

Request

GET https://islamicapi.com/api/v1/dua/?type=language&api_key={YOUR_API_KEY}
JSON Response (success)
{
    "status": "success",
    "message": "Languages fetched successfully",
    "data": {
        "am": { "name": "አማርኛ", "name_en": "Amharic" },
        "ar": { "name": "العربية", "name_en": "Arabic" },
        "az": { "name": "Azərbaycan", "name_en": "Azerbaijani" },
        "bn": { "name": "বাংলা", "name_en": "Bengali" },
        "de": { "name": "Deutsch", "name_en": "German" },
        "en": { "name": "English", "name_en": "English" },
        "es": { "name": "Español", "name_en": "Spanish" },
        "fa": { "name": "فارسی", "name_en": "Persian" },
        "fr": { "name": "Français", "name_en": "French" },
        "hi": { "name": "हिन्दी", "name_en": "Hindi" },
        "id": { "name": "Bahasa Indonesia", "name_en": "Indonesian" },
        "tr": { "name": "Türkçe", "name_en": "Turkish" },
        "ur": { "name": "اردو", "name_en": "Urdu" },
        "zh": { "name": "中文", "name_en": "Chinese" }
        // ... all 55+ languages
    }
}

Error Responses

All error responses follow the same envelope format with an HTTP-style code, status: "error", and a human-readable message.

401 — Missing or invalid API key
{
    "code": 401,
    "status": "error",
    "message": "Unauthorized: API key is required"
}
400 — Missing type parameter
{
    "code": 400,
    "status": "error",
    "message": "The \"type\" parameter is required. Allowed values: category, sub-category, translation, language"
}
400 — Invalid type value
{
    "code": 400,
    "status": "error",
    "message": "Invalid type \"xyz\". Allowed values: category, sub-category, translation, language"
}
400 — Missing lang parameter
{
    "code": 400,
    "status": "error",
    "message": "The \"lang\" parameter is required for type: translation"
}
400 — Unsupported language code
{
    "code": 400,
    "status": "error",
    "message": "Language code \"xyz\" is not available. Please send us a request to add your language."
}
400 — Invalid dua_id format
{
    "code": 400,
    "status": "error",
    "message": "Invalid dua_id. It must be a positive integer."
}
404 — Dua ID not found
{
    "code": 404,
    "status": "error",
    "message": "Dua #999 not found for language \"en\""
}
404 — Translation not available for language
{
    "code": 404,
    "status": "error",
    "message": "Translation not available for language \"lv\""
}

Data Source & Feedback

Open Data — Free to Download

The full dua dataset powering this API is publicly available on GitHub. It includes Arabic text, transliterations, translations in 53 languages, audio references, hadith, benefits, and more — all in structured JSON format, free for any use.

github.com/islamicapi/masnun-dua

Found an Issue?

If you notice missing translations, incorrect data, audio problems, or any unexpected API behaviour — feel free to open a pull request or issue on GitHub. You can also reach us directly. Contributions are very welcome and help improve the data quality for everyone.

WhatsApp