Show Suras API will retrieve list of suras. If filtering parameter (keywords) used then the output will be limited with search result. Otherwise, the output will be a sequential display list of 114 suras.
Version
v1
URL
https://ialharami.com/quran-projects/api/v1/suras[?keyword= ]
Method
GET
API Authentication
Not required
URL Params
None
Data Params
Keywords: string, Arabic Unicode, sura name of part of sura anme
Success Response
Code: 200 OK
Example 1: https://ialharami.com/quran-projects/api/v1/suras
{
"success": true,
"meta": {
"count": 114,
"page": 1,
"limit": 114,
"totalPages": 1,
"totalRecords": 114
},
"data": {
"suras": [
{
"suraName": "الفاتحه",
"suraNumber": "1"
},
{
"suraName": "البقره",
"suraNumber": "2"
},
{
"suraName": "ال عمران",
"suraNumber": "3"
},
{
"suraName": "النساء",
"suraNumber": "4"
},
...
...
...
{
"suraName": "الناس",
"suraNumber": "114"
}
]
}
}
Example 2 (Search): https://ialharami.com/quran-projects/api/v1/suras?keywords=الن
{
"success": true,
"meta": {
"count": 9,
"page": 1,
"limit": 114,
"totalPages": 1,
"totalRecords": 9
},
"data": {
"suras": [
{
"suraName": "النساء",
"suraNumber": "4"
},
{
"suraName": "النحل",
"suraNumber": "16"
},
{
"suraName": "النور",
"suraNumber": "24"
},
{
"suraName": "النمل",
"suraNumber": "27"
},
{
"suraName": "النجم",
"suraNumber": "53"
},
{
"suraName": "النبا",
"suraNumber": "78"
},
{
"suraName": "النازعات",
"suraNumber": "79"
},
{
"suraName": "النصر",
"suraNumber": "110"
},
{
"suraName": "الناس",
"suraNumber": "114"
}
]
}
}
Example 3 (Search): https://ialharami.com/quran-projects/api/v1/suras?keywords=الفجر
{
"success": true,
"meta": {
"count": 1,
"page": 1,
"limit": 114,
"totalPages": 1,
"totalRecords": 1
},
"data": {
"suras": [
{
"suraName": "الفجر",
"suraNumber": "89"
}
]
}
}
suraName : string(10), Arabic Unicode
suraNumber : number(3)
Not Found Response
Code: 404 Not Found
Example: https://ialharami.com/quran-projects/api/v1/suras?keywords=الصلاة
{
"success": false,
"errors": {
"code": 404,
"message": "Not Found",
"detail": "No data 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"
}
}