API Documentation

A simple, fast, and open RESTful API for accessing Quran translations and verses in multiple languages.

Getting Started

The AlQuranDB API provides programmatic access to Quran translations. All endpoints return JSON responses and support CORS for browser-based applications.

You can change this URL to point to your own deployment.

🚀 Interactive API Documentation

FastAPI provides auto-generated interactive API documentation where you can test endpoints directly in your browser:

API Endpoints

GET

List All Translations

Get a list of all available Quran translations with metadata.

https://alqurandb.com/api/translations/
JSON
{
  "total": 178,
  "translations": [
    {
      "id": "english_sahih",
      "language": "English",
      "translator": "Saheeh International",
      "name_in_language": "Saheeh International",
      "source": "tanzil"
    }
  ]
}
GET

Download Translation

Download a complete translation in various file formats.

https://alqurandb.com/api/translations/download/{translation_id}/{filetype}
NameTypeRequiredDescription
translation_idstringRequiredTranslation identifier (e.g., english_sahih)
filetypestringRequiredFile format: json, csv, sqlite, xml, xlsx, or sql
File download
GET

Get Specific Verse

Retrieve a specific verse by translation ID, sura number, and aya number.

https://alqurandb.com/api/translations/{translation_id}/{sura}/{aya}
NameTypeRequiredDescription
translation_idstringRequiredTranslation identifier
suraintegerRequiredSura number (1-114)
ayaintegerRequiredAya number
JSON
{
  "translation_id": "english_sahih",
  "sura": 1,
  "aya": 1,
  "text": "In the name of Allah, the Entirely Merciful, the Especially Merciful."
}
GET

Get All Verses from a Sura

Retrieve all verses from a specific sura in a translation.

https://alqurandb.com/api/translations/{translation_id}/{sura}
NameTypeRequiredDescription
translation_idstringRequiredTranslation identifier
suraintegerRequiredSura number (1-114)
from_ayaintegerOptionalStarting aya number (optional)
to_ayaintegerOptionalEnding aya number (optional)
JSON
{
  "translation_id": "english_sahih",
  "sura": 1,
  "total": 7,
  "verses": [
    {
      "sura": 1,
      "aya": 1,
      "text": "In the name of Allah, the Entirely Merciful, the Especially Merciful."
    }
  ]
}
GET

Get Verse Range

Retrieve a range of verses from a specific sura.

https://alqurandb.com/api/translations/{translation_id}/{sura}?from_aya={from}&to_aya={to}
NameTypeRequiredDescription
translation_idstringRequiredTranslation identifier
suraintegerRequiredSura number (1-114)
from_ayaintegerRequiredStarting aya number
to_ayaintegerRequiredEnding aya number
JSON
{
  "translation_id": "english_sahih",
  "sura": 2,
  "total": 5,
  "verses": [
    {
      "sura": 2,
      "aya": 1,
      "text": "Alif, Lam, Meem."
    }
  ]
}
GET

Get Quran Sura

Retrieve all verses of a specific sura in Arabic.

https://alqurandb.com/api/quran/{sura}
NameTypeRequiredDescription
suraintegerRequiredSura number (1-114)
JSON
{
  "sura": 1,
  "total": 7,
  "verses": [
    {
      "sura": 1,
      "aya": 1,
      "text": "بِسْمِ اللَّهِ الرَّحْمَـٰنِ الرَّحِيمِ"
    }
  ]
}
GET

Get Quran Verse

Retrieve a specific verse of the Quran in Arabic.

https://alqurandb.com/api/quran/{sura}/{aya}
NameTypeRequiredDescription
suraintegerRequiredSura number (1-114)
ayaintegerRequiredAya number
JSON
{
  "sura": 1,
  "aya": 1,
  "text": "بِسْمِ اللَّهِ الرَّحْمَـٰنِ الرَّحِيمِ"
}

Error Responses

The API uses standard HTTP status codes for error responses.

StatusDescriptionExample
200Success - Request completed successfullyVerse data returned
404Not Found - Resource does not exist{"detail":"Verse not found"}
422Validation Error - Invalid parameters{"detail":"Sura must be 1-114"}
500Internal Server Error{"detail":"Server error"}