Skip to main content

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
    q string required

    Full-text query string (alias: query). Limited to the first 250 UTF-8 characters. Any HTML fragments are stripped before searching.

    size integer

    Possible values: >= 1 and <= 50

    Default value: 10

    Results per page (aliases: s, per_page). Values above 50 are capped. Default fetches 10 results.

    page integer

    Possible values: >= 1

    Default value: 1

    1-based page number (alias: p). Defaults to the first page.

    language string

    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.

    translations string

    Comma-separated translation ids or slugs. Filters scoring and results to the specified translations only.

Responses

Successful response


Schema
    search object required
    query string required

    Sanitised query that was executed.

    total_results int32 required

    Total number of hits across all pages.

    current_page int32 required

    1-based page index returned.

    total_pages int32 required

    Total number of available pages given the page size.

    results object[] required

    Verse-centric aggregation of matching results.

  • Array [
  • verse_key string required

    Surah:Ayah identifier.

    verse_id int32 required

    Internal numeric verse id.

    text string required

    Full verse in the canonical Uthmani script.

    highlighted string nullable

    Verse snippet with <em> tags around the matching terms (if highlighting information is available).

    words object[] required

    Verse words with match metadata.

  • Array [
  • char_type string required

    Word token type (e.g. word, pause).

    text string required

    Word text in the Hafs narration script.

    highlight boolean nullable

    True when this word contributed to the match.

  • ]
  • translations object[] required

    Highlighted authorised translations that matched the query.

  • Array [
  • text string required

    Translation text. Matching terms are wrapped in <em> tags.

    resource_id int32 required

    Numeric id of the translation resource.

    name string required

    Public name of the translation resource.

    language_name string required

    Human-readable language name.

  • ]
  • ]
Loading...