JustDeen Content API

API for Hadith and Dua content for MyCompanion mobile app

https://api.justdeen.app
This API requires authentication. Include X-API-Key header with valid key.

Health Check

Check API health status (no auth required)

Sample Response
{
  "status": "healthy",
  "timestamp": "2025-11-21T11:00:00.000Z",
  "version": "1.0.0"
}

Hadith Endpoints

Get all hadith collections (Bukhari, Muslim, etc.)

Sample Response
[
  {
    "id": "bukhari",
    "name": "The Authentic Collection of al-Bukhari",
    "arabicName": "صحيح البخاري",
    "description": "The most authentic collection...",
    "totalHadith": 7589,
    "booksCount": 98
  },
  ...
]

Get all books in a hadith collection

Parameters
collectionId (e.g., bukhari, muslim)
Sample Response
[
  {
    "id": "bukhari_1",
    "collectionId": "bukhari",
    "bookNumber": 1,
    "name": "Revelation",
    "arabicName": "الوحي",
    "totalHadith": 7
  },
  ...
]

Get a specific book's details

Parameters
bookId (e.g., bukhari_1)

Get all hadiths in a book

Parameters
bookIdlimit (default: 20)offset (default: 0)

Get a specific hadith by ID

Parameters
hadithId (e.g., bukhari_1_1)
Sample Response
{
  "id": "bukhari_1_1",
  "collectionId": "bukhari",
  "bookId": "bukhari_1",
  "hadithNumber": 1,
  "arabicText": "حَدَّثَنَا الْحُمَيْدِيُّ...",
  "englishText": "Narrated 'Umar bin Al-Khattab...",
  "narrator": "'Umar bin Al-Khattab",
  "grade": null,
  "reference": "bukhari 1:1"
}

Search hadiths by text

Query Parameters
q (search query)collectionIdlimitoffset

Get a random hadith

Query Parameters
collectionId (optional filter)

Dua Endpoints

Get all dua categories

Sample Response
[
  {
    "id": "daily",
    "name": "Daily Supplications",
    "arabicName": "الأدعية اليومية",
    "description": "Essential daily supplications...",
    "icon": null,
    "duasCount": 38
  },
  ...
]

Get all duas in a category

Parameters
categoryId (e.g., daily, morning)limitoffset

Get a specific dua by ID

Parameters
duaId (e.g., daily-01)
Sample Response
{
  "id": "daily-01",
  "categoryId": "daily",
  "name": "Supplication Before Sleeping",
  "arabicName": "دعاء قبل النوم",
  "arabicText": "بِاسْمِكَ اللَّهُمَّ أَمُوْتُ وَأَحْيَا",
  "transliteration": "bismika, allahumma amuutu wa ahyaa",
  "englishTranslation": "In Your name, O Allah, I die and I live.",
  "reference": "HR. al-Bukhari"
}

Search duas by text

Query Parameters
q (search query)categoryIdlimitoffset

Get a random dua

Query Parameters
categoryId (optional filter)