Show Aya API will retrieve one text of verse/aya from the Holy Quran, based on Aya number and Sura number.
Version
v1
URL
https://ialharami.com/quran-projects/api/v1/ayas/:aya-number/:sura-number
Method
GET
API Authentication
Not required
URL Params
aya-number : number
sura-number : number, values (1 to 114)
Data Params
None
Success Response
Code: 200 OK
Example: https://ialharami.com/quran-projects/api/v1/ayas/8/26
{
"success": true,
"data": {
"aya": {
"id": "2964",
"ayaNumber": "8",
"ayaText": "إن في ذلك لآية وما كان أكثرهم مؤمنين",
"suraName": "الشعراء",
"suraNumber": "26"
}
}
}
id : number(4)
ayaNumber : number(3)
ayaText : string, Arabic Unicode
suraName : string(10), Arabic Unicode
suraNumber : number(3)
Not Found Response
Code: 404 Not Found
Example: https://ialharami.com/quran-projects/api/v1/ayas/10/199
{
"success": false,
"errors": {
"code": 404,
"message": "Not Found",
"detail": "Aya (10,199) Not Found !"
}
}
Error Response
Code: 500 Internal Server Error
Note: The detailed message varies depending on the type of error.
{
"success": false,
"errors": {
"code": 500,
"message": "Internal Server Error",
"detail": "Database: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it"
}
}