Search api
The "search" API allows users to search for content based on the given search query. The search query can be formatted as follows:
- If the search query starts with "#" (hashtag), the API will search for matching tags.
- If the search query starts with "@" (at sign), the API will search for matching usernames.
- Otherwise, the API will search for matching text in translations.
Auth header are optional, but if you're searching in user group/page then you'll need to provide the auth headers as well.
Query Parameters
client_auth_token string required
Client API token
q string required
the search query
sura_only boolean
only search for surahs
search_type string
Possible values: [exact
, approximate
]
Default value: approximate
Should search for exact term or fuzzy search. Only applicable for translation search
Responses
- 200
OK
Response Headers
application/json
Schema
Example (from schema)
Example 1
Example
Schema
- Array [
- ]
anyOf
MOD1
MOD2
id string
user id
text string
username
full_text string
full name with username
avatar string
url avatar url
collection string
Default value: authors
id string
language string
text string
collection string
Default value: tags
[
null,
null
]
{
"items": [
{
"id": 1,
"text": "#Allah",
"language": "English",
"collection": "tags"
},
{
"id": 1,
"text": "@naveed",
"full_text": "Naveed Ahmad (@naveed)",
"avatar": null,
"collection": "authors"
},
{
"from": null,
"to": null,
"text": "Maryam",
"collection": "filters",
"chapter": {
"id": 20,
"number": 19,
"size": 98,
"citation_names": [
{
"id": 19,
"name": "Maryam",
"language_id": 2,
"translation_id": 6,
"default": false,
"default_for_filter": true
}
],
"name": "Maryam"
}
}
]
}
{
"items": [
{
"from": 31,
"to": 31,
"text": "L<u>a</u> <i><u>th</u></i>aleelin wal<u>a</u> yughnee mina allahab<b>i</b> - Al-Mursalaat:31",
"collection": "filters",
"chapter": {
"id": 78,
"number": 77,
"size": 50,
"citation_names": [
{
"id": 77,
"name": "Al-Mursalaat",
"language_id": 2,
"translation_id": 5,
"default": false,
"default_for_filter": true
},
{
"id": 231,
"name": "المرسلات",
"language_id": 1,
"translation_id": 1,
"default": true,
"default_for_filter": false
},
{
"id": 345,
"name": "The Emissaries",
"language_id": 2,
"translation_id": 6,
"default": true,
"default_for_filter": false
},
{
"id": 573,
"name": "Los Ángeles Enviados",
"language_id": 3,
"translation_id": 7,
"default": true,
"default_for_filter": false
}
],
"name": "Al-Mursalaat"
},
"translation": {
"id": 6,
"name": "Transliteration"
}
},
{
"from": 85,
"to": 85,
"text": "Q<u>a</u>la fainn<u>a</u> qad fatann<u>a</u> qawmaka min baAAdika waa<u>d</u>allahumu a<b>l</b>ss<u>a</u>miriy<b>yu</b> - Taa-Haa:85",
"collection": "filters",
"chapter": {
"id": 21,
"number": 20,
"size": 135,
"citation_names": [
{
"id": 20,
"name": "Taa-Haa",
"language_id": 2,
"translation_id": 5,
"default": false,
"default_for_filter": true
},
{
"id": 174,
"name": "طه",
"language_id": 1,
"translation_id": 1,
"default": true,
"default_for_filter": false
},
{
"id": 288,
"name": "Taa-Haa",
"language_id": 2,
"translation_id": 6,
"default": true,
"default_for_filter": false
},
{
"id": 516,
"name": "Tâ' Hâ'",
"language_id": 3,
"translation_id": 7,
"default": true,
"default_for_filter": false
}
],
"name": "Taa-Haa"
},
"translation": {
"id": 6,
"name": "Transliteration"
}
},
{
"from": 23,
"to": 23,
"text": "Afaraayta mani ittakha<u>th</u>a il<u>a</u>hahu haw<u>a</u>hu waa<u>d</u>allahu All<u>a</u>hu AAal<u>a</u> AAilmin wakhatama AAal<u>a</u> samAAihi waqalbihi wajaAAala AAal<u>a</u> ba<u>s</u>arihi ghish<u>a</u>watan faman yahdeehi min baAAdi All<u>a</u>hi afal<u>a</u> ta<u>th</u>akkaroon<b>a</b> - Al-Jaathiya:23",
"collection": "filters",
"chapter": {
"id": 46,
"number": 45,
"size": 37,
"citation_names": [
{
"id": 45,
"name": "Al-Jaathiya",
"language_id": 2,
"translation_id": 5,
"default": false,
"default_for_filter": true
},
{
"id": 199,
"name": "الجاثية",
"language_id": 1,
"translation_id": 1,
"default": true,
"default_for_filter": false
},
{
"id": 313,
"name": "Crouching",
"language_id": 2,
"translation_id": 6,
"default": true,
"default_for_filter": false
},
{
"id": 541,
"name": "La Arrodillada",
"language_id": 3,
"translation_id": 7,
"default": true,
"default_for_filter": false
}
],
"name": "Al-Jaathiya"
},
"translation": {
"id": 6,
"name": "Transliteration"
}
},
{
"from": 11,
"to": 11,
"text": "Wai<u>tha</u> raaw tij<u>a</u>ratan aw lahwan infa<u>dd</u>oo ilayh<u>a</u> watarakooka q<u>a</u>iman qul m<u>a</u> AAinda All<u>a</u>hi khayrun mina allahwi wamina a<b>l</b>ttij<u>a</u>rati wa<b>A</b>ll<u>a</u>hu khayru a<b>l</b>rr<u>a</u>ziqeen<b>a</b> - Al-Jumu'a:11",
"collection": "filters",
"chapter": {
"id": 63,
"number": 62,
"size": 11,
"citation_names": [
{
"id": 62,
"name": "Al-Jumu'a",
"language_id": 2,
"translation_id": 5,
"default": false,
"default_for_filter": true
},
{
"id": 216,
"name": "الجمعة",
"language_id": 1,
"translation_id": 1,
"default": true,
"default_for_filter": false
},
{
"id": 330,
"name": "Friday",
"language_id": 2,
"translation_id": 6,
"default": true,
"default_for_filter": false
},
{
"id": 558,
"name": "El Viernes",
"language_id": 3,
"translation_id": 7,
"default": true,
"default_for_filter": false
}
],
"name": "Al-Jumu'a"
},
"translation": {
"id": 6,
"name": "Transliteration"
}
}
]
}
Loading...