Skip to content

Concepts

The data model behind the endpoints, so the field names make sense before you read the reference.

  • Surah (surah_no 1 to 114) with its Arabic name, its Uthmani calligraphic name and ayas_count.
  • Aya with aya_no, the text in two spellings, aya_uthmani (the Uthmani script with its marks, as printed in the Madinah mushaf) and aya_imlaei (standard modern spelling, the one to search or display in a plain font), and its translations.
  • Translation key: one edition of a translation, such as english_hilali_khan. A language can have several editions; GET /quran/translation-keys lists them with the language each belongs to. When you ask a surah for lang=en you get the editions in English; langKey picks one edition by its key.
  • Tafsir: an Arabic explanation per aya is stored for the site’s own use and is not exposed by these endpoints yet.
  • Book (project_id) with a title, a description and one or more Arabic versions (version_name such as 1.0, 2.0; is_latest marks the current one). Versions are editions of the Arabic text; a new edition can change paragraphs, so translations attach to a version.
  • Chapter (id, serial, name): the sections of a version in reading order.
  • Phrase: the unit of text. A chapter is a list of phrases, each with a phrase_id (stable UUID), a group_id and group_order that place it in a paragraph (a group is a paragraph; its phrases are sentences in order), arabic_text, a tag (p, h2, li…) and content_type_id (a title, a body paragraph, a footnote…). Phrases that quote a hadith may carry hadith_card_id, the card in the hadith encyclopedia.
  • Translation: a version’s text in one language, phrase by phrase: each item pairs the Arabic phrase with its translated_text, so a bilingual view lines up exactly.
  • Copies: every book has PDF and Word files per language and version, listed with the book (pdfs, docxs) and all together at GET /books/pdfs.
  • Encyclopedia (external_id): a collection of cards of one kind. 101 is the hadith encyclopedia; others hold questions and answers, Islamic terms, the names of Allah, places, and introductions to Islam. GET /enc lists them with a card count.
  • Card (external_id): one entry. Its content is a set of sentences, each with a field_name (for a hadith: عنوان الحديث the title, متن الحديث the text, درجة الحديث the grade, التخريج the source, الشرح the explanation…), a language and content. A card has versions (version_string); the sentences of the latest are what you want.
  • Categories: every card carries categories, keys of the form "<table>:<item>" where the table is a classification tree: 11 the sharia classification, 43 topics, 18 the themes of introducing Islam. The keys include the ancestors, so a card under “الحديث وعلومه > مصطلح الحديث” carries both. GET /enc/{id}/categories gives names, parents and counts.
  • Properties: flat attributes under properties, keyed t<table> with item keys as values ("t40": ["40:1"] means the card is short) or plain text (book, chapter). GET /enc/{id}/properties says which properties an encyclopedia offers for filtering, with labels and value names; displayed_properties on a card gives the same, resolved to names, ready to show.
  • Vocabulary: the hadith encyclopedia’s field labels and value names exist in 100+ languages through GET /enc-meta/..., so a client can label a card in the reader’s language.

Two engines:

  • Hybrid search (/hybrid-search, /quran/search): by words and meaning. The question is embedded with the same model as the content and matched against ayas, book passages and cards, so “ثواب من يتصدق على أقاربه” finds the hadith about charity to relatives even without sharing a word with it. ratio sets the weight of meaning against words.
  • Keyword search (/search, /search/suggestions): the words themselves, with highlighting, for autocomplete and exact lookups.

Both accept filters by type, language, surah, book, encyclopedia, category and property, and can return facet counts.