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
List All Translations
Get a list of all available Quran translations with metadata.
{
"total": 178,
"translations": [
{
"id": "english_sahih",
"language": "English",
"translator": "Saheeh International",
"name_in_language": "Saheeh International",
"source": "tanzil"
}
]
}Download Translation
Download a complete translation in various file formats.
| Name | Type | Required | Description |
|---|---|---|---|
| translation_id | string | Required | Translation identifier (e.g., english_sahih) |
| filetype | string | Required | File format: json, csv, sqlite, xml, xlsx, or sql |
Get Specific Verse
Retrieve a specific verse by translation ID, sura number, and aya number.
| Name | Type | Required | Description |
|---|---|---|---|
| translation_id | string | Required | Translation identifier |
| sura | integer | Required | Sura number (1-114) |
| aya | integer | Required | Aya number |
{
"translation_id": "english_sahih",
"sura": 1,
"aya": 1,
"text": "In the name of Allah, the Entirely Merciful, the Especially Merciful."
}Get All Verses from a Sura
Retrieve all verses from a specific sura in a translation.
| Name | Type | Required | Description |
|---|---|---|---|
| translation_id | string | Required | Translation identifier |
| sura | integer | Required | Sura number (1-114) |
| from_aya | integer | Optional | Starting aya number (optional) |
| to_aya | integer | Optional | Ending aya number (optional) |
{
"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 Verse Range
Retrieve a range of verses from a specific sura.
| Name | Type | Required | Description |
|---|---|---|---|
| translation_id | string | Required | Translation identifier |
| sura | integer | Required | Sura number (1-114) |
| from_aya | integer | Required | Starting aya number |
| to_aya | integer | Required | Ending aya number |
{
"translation_id": "english_sahih",
"sura": 2,
"total": 5,
"verses": [
{
"sura": 2,
"aya": 1,
"text": "Alif, Lam, Meem."
}
]
}Get Quran Sura
Retrieve all verses of a specific sura in Arabic.
| Name | Type | Required | Description |
|---|---|---|---|
| sura | integer | Required | Sura number (1-114) |
{
"sura": 1,
"total": 7,
"verses": [
{
"sura": 1,
"aya": 1,
"text": "بِسْمِ اللَّهِ الرَّحْمَـٰنِ الرَّحِيمِ"
}
]
}Get Quran Verse
Retrieve a specific verse of the Quran in Arabic.
| Name | Type | Required | Description |
|---|---|---|---|
| sura | integer | Required | Sura number (1-114) |
| aya | integer | Required | Aya number |
{
"sura": 1,
"aya": 1,
"text": "بِسْمِ اللَّهِ الرَّحْمَـٰنِ الرَّحِيمِ"
}Error Responses
The API uses standard HTTP status codes for error responses.
| Status | Description | Example |
|---|---|---|
| 200 | Success - Request completed successfully | Verse data returned |
| 404 | Not Found - Resource does not exist | {"detail":"Verse not found"} |
| 422 | Validation Error - Invalid parameters | {"detail":"Sura must be 1-114"} |
| 500 | Internal Server Error | {"detail":"Server error"} |