Quran and Hadith Search API
Search Qur'an, Hadith, Tafsir, and dua/adhkar sources before you generate, display, or cite an answer.
What This Does
Search returns ranked sources grouped by corpus. Each result includes Arabic text, translation, reference, score, metadata, and timings.
Minimal Request
Minimal Response
Fields Explained
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| q | string | Yes | — | The Arabic, English, or mixed-language query. |
| indexes | string | No | quran,hadith,tafsir,dua | Comma-separated corpora to search. Use quran, hadith, tafsir, dua, or any subset. |
| limit_per_source | integer | No | 12 | Maximum results per corpus. The API clamps values outside the supported range. |
Real Examples
Direct source reads are anonymous and cacheable. Use them when you know the exact reference.
Quote Matching
Quote search checks wording against Qur'an, Hadith, and dua sources by default. The response keeps the match_type, confidence, matched_excerpt, and source fields.
The structured evidence report shows:
- how much of the quotation the source contains.
- token overlap and sequence similarity for close wording.
- the matched language and field.
- attribution text that was ignored.
- whether the match came from exact retrieval or semantic-only retrieval.
Typed related_sources list reviewed provenance where available. retrieval_status and ambiguity flag degraded or repeated results. Only normalized containment can produce an exact wording verdict.
Common Mistakes
- Using Search API output as a generated answer.
- Treating the confidence value as a probability.
- Dropping Arabic text when source display matters.
Source note