Search verses and translationsโ
Full-text search across Arabic verses and authorised translations.
Query terms are analysed with language-specific stemming and tokenization. Quranic text hits are boosted over translations, and within translations we require all terms to match (AND) before a result scores. When you omit the language parameter we auto-detect likely languages from the query (CLD3) and add English as a fallback, boosting matches in those translation indexes.
Highlights use <em> tags; strip or escape that HTML before rendering.
Query Parameters
Full-text query string (alias: query). Limited to the first 250 UTF-8 characters. Any HTML fragments are stripped before searching.
Possible values: >= 1 and <= 50
Default value: 10
Results per page (aliases: s, per_page). Values above 50 are capped. Default fetches 10 results.
Possible values: >= 1
Default value: 1
1-based page number (alias: p). Defaults to the first page.
ISO code of a translation language to boost (alias: locale). When omitted, we detect probable languages from the query string and search those translation indexes plus English.
Comma-separated translation ids or slugs. Filters scoring and results to the specified translations only.
- 200
- 400
- 401
- 403
- 404
- 422
- 429
- 500
- 502
- 503
- 504
Successful response
Schema
- Array [
- Array [
- ]
- Array [
- ]
- ]
search object required
Sanitised query that was executed.
Total number of hits across all pages.
1-based page index returned.
Total number of available pages given the page size.
results object[] required
Verse-centric aggregation of matching results.
Surah:Ayah identifier.
Internal numeric verse id.
Full verse in the canonical Uthmani script.
Verse snippet with <em> tags around the matching terms (if highlighting information is available).
words object[] required
Verse words with match metadata.
Word token type (e.g. word, pause).
Word text in the Hafs narration script.
True when this word contributed to the match.
translations object[] required
Highlighted authorised translations that matched the query.
Translation text. Matching terms are wrapped in <em> tags.
Numeric id of the translation resource.
Public name of the translation resource.
Human-readable language name.
{
"search": {
"query": "string",
"total_results": 0,
"current_page": 0,
"total_pages": 0,
"results": [
{
"verse_key": "1:1",
"verse_id": 1,
"text": "string",
"highlighted": "string",
"words": [
{
"char_type": "string",
"text": "string",
"highlight": true
}
],
"translations": [
{
"text": "string",
"resource_id": 0,
"name": "string",
"language_name": "string"
}
]
}
]
}
}
{
"search": {
"query": "mercy",
"total_results": 1,
"current_page": 1,
"total_pages": 1,
"results": [
{
"verse_key": "1:1",
"verse_id": 1,
"text": "ุจูุณูู
ู ุงููููฐูู ุงูุฑููุญูู
ูฐูู ุงูุฑููุญููู
ู",
"highlighted": "<em>ุจูุณูู
ู</em> ุงููููฐูู ุงูุฑููุญูู
ูฐูู ุงูุฑููุญููู
ู",
"words": [
{
"char_type": "word",
"text": "ุจูุณูู
ู",
"highlight": true
},
{
"char_type": "word",
"text": "ุงููููฐูู"
},
{
"char_type": "word",
"text": "ุงูุฑููุญูู
ูฐูู",
"highlight": true
},
{
"char_type": "word",
"text": "ุงูุฑููุญููู
ู",
"highlight": true
}
],
"translations": [
{
"text": "In the Name of Allahโthe Most Compassionate, Most Merciful.",
"resource_id": 20,
"name": "Saheeh International",
"language_name": "english"
}
]
}
]
}
}
Will be returned when the request is invalid e.g. request is missing required headers or with invalid query parameters.
Schema
Possible values: [gateway_timeout, service_unavailable, bad_gateway, internal_server_error, unprocessable_entity, not_found, forbidden, unauthorized, invalid_request, invalid_token, insufficient_scope, service_error, invalid_path, rate_limit_exceeded]
{
"message": "string",
"type": "gateway_timeout",
"success": true
}
{
"message": "The request is missing required headers or is invalid",
"type": "invalid_request",
"success": false
}
Will be returned when the request is unauthorized.
Schema
Possible values: [gateway_timeout, service_unavailable, bad_gateway, internal_server_error, unprocessable_entity, not_found, forbidden, unauthorized, invalid_request, invalid_token, insufficient_scope, service_error, invalid_path, rate_limit_exceeded]
{
"message": "string",
"type": "gateway_timeout",
"success": true
}
{
"message": "The request requires user authentication",
"type": "unauthorized",
"success": false
}
Forbidden error. Can either be due to access token not being passed, having been expired or the caller trying to access a resource without enough permissions.
Schema
Possible values: [gateway_timeout, service_unavailable, bad_gateway, internal_server_error, unprocessable_entity, not_found, forbidden, unauthorized, invalid_request, invalid_token, insufficient_scope, service_error, invalid_path, rate_limit_exceeded]
{
"message": "string",
"type": "gateway_timeout",
"success": true
}
{
"message": "The server understood the request, but refuses to authorize it",
"type": "forbidden",
"success": false
}
Not Found. The resource being accessed does not exist.
Schema
Possible values: [gateway_timeout, service_unavailable, bad_gateway, internal_server_error, unprocessable_entity, not_found, forbidden, unauthorized, invalid_request, invalid_token, insufficient_scope, service_error, invalid_path, rate_limit_exceeded]
{
"message": "string",
"type": "gateway_timeout",
"success": true
}
{
"message": "The requested resource could not be found",
"type": "not_found",
"success": false
}
Validation Error. The request includes one or more invalid params. Please check the request params and try again.
Schema
Possible values: [gateway_timeout, service_unavailable, bad_gateway, internal_server_error, unprocessable_entity, not_found, forbidden, unauthorized, invalid_request, invalid_token, insufficient_scope, service_error, invalid_path, rate_limit_exceeded]
{
"message": "string",
"type": "gateway_timeout",
"success": true
}
{
"message": "The request was well-formed but was unable to be followed due to semantic errors",
"type": "unprocessable_entity",
"success": false
}
Rate-limit exceeded
Schema
Possible values: [gateway_timeout, service_unavailable, bad_gateway, internal_server_error, unprocessable_entity, not_found, forbidden, unauthorized, invalid_request, invalid_token, insufficient_scope, service_error, invalid_path, rate_limit_exceeded]
{
"message": "string",
"type": "gateway_timeout",
"success": true
}
{
"message": "Too many requests, please try again later",
"type": "rate_limit_exceeded",
"success": false
}
Server Error. Something went wrong, try again later.
Schema
Possible values: [gateway_timeout, service_unavailable, bad_gateway, internal_server_error, unprocessable_entity, not_found, forbidden, unauthorized, invalid_request, invalid_token, insufficient_scope, service_error, invalid_path, rate_limit_exceeded]
{
"message": "string",
"type": "gateway_timeout",
"success": true
}
{
"message": "The server encountered an internal error and was unable to complete your request",
"type": "internal_server_error",
"success": false
}
Bad Gateway
Schema
Possible values: [gateway_timeout, service_unavailable, bad_gateway, internal_server_error, unprocessable_entity, not_found, forbidden, unauthorized, invalid_request, invalid_token, insufficient_scope, service_error, invalid_path, rate_limit_exceeded]
{
"message": "string",
"type": "gateway_timeout",
"success": true
}
{
"message": "The server was acting as a gateway or proxy and received an invalid response from the upstream server",
"type": "bad_gateway",
"success": false
}
Service Unavailable
Schema
Possible values: [gateway_timeout, service_unavailable, bad_gateway, internal_server_error, unprocessable_entity, not_found, forbidden, unauthorized, invalid_request, invalid_token, insufficient_scope, service_error, invalid_path, rate_limit_exceeded]
{
"message": "string",
"type": "gateway_timeout",
"success": true
}
{
"message": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance",
"type": "service_unavailable",
"success": false
}
Gateway Timeout
Schema
Possible values: [gateway_timeout, service_unavailable, bad_gateway, internal_server_error, unprocessable_entity, not_found, forbidden, unauthorized, invalid_request, invalid_token, insufficient_scope, service_error, invalid_path, rate_limit_exceeded]
{
"message": "string",
"type": "gateway_timeout",
"success": true
}
{
"message": "The server was acting as a gateway or proxy and did not receive a timely response from the upstream server",
"type": "gateway_timeout",
"success": false
}