Encyclopedias
Twelve collections of cards: hadith, questions and answers, Islamic terms, the names of Allah, places, and introductions to Islam. Each card is a set of named fields in one or more languages, with categories and properties to filter by.
The encyclopedias
Section titled “The encyclopedias”| Parameter | ||
|---|---|---|
lang |
optional | Count only the cards that exist in this language. Without it, every card. |
curl "https://islamenc.com/api/enc?lang=en"[ { "external_id": "101", "name": "موسوعة الأحاديث", "description": null, "cards_count": 839 }, { "external_id": "102", "name": "موسوعة الأسئلة والأجوبة للمسلمين", "description": null, "cards_count": 0 }, { "external_id": "105", "name": "موسوعة المصطلحات", "description": null, "cards_count": 0 }]With lang, a count of 0 means the encyclopedia has no cards in that language; ask without lang for the Arabic total.
| id | Encyclopedia |
|---|---|
101 |
Hadith (موسوعة الأحاديث): the most translated, 839 cards in up to 67 languages. |
102 |
Questions and answers for Muslims. |
103 |
Places. |
104 |
The names of Allah. |
105, 109 |
Islamic terms. |
108 |
Prophets and messengers. |
110, 113, 114, 115, 116 |
Introducing Islam: pillars, beliefs, FAQs, messages and more. |
The cards of an encyclopedia
Section titled “The cards of an encyclopedia”| Parameter | ||
|---|---|---|
page, limit |
optional | Paginate: limit at most 100. Without page the whole set comes back in one answer. |
lang |
optional | This language plus the Arabic it falls back to. Arabic only when absent. |
translated |
optional | 1: only cards that exist in lang. |
fields |
optional | Comma-separated field names (عنوان الحديث,متن الحديث): only those sentences are returned. Cards without them still appear. Cuts the full set to a third. |
category |
optional | A category key "<table>:<item>": only cards in it or under it. |
prop |
optional | A property filter "<id>=<value>" (t40=40:1), repeatable: only cards with every one. |
With page:
curl "https://islamenc.com/api/enc/101/cards?page=1&limit=2&lang=en"{ "cards": [ { "external_id": "14294", "title": "لو أنكم كنتم توكلون على الله حق توكله لرزقكم كما يرزق الطير تغدو خماصا وتروح بطانا", "is_hidden": false, "categories": ["11:280", "11:3002", "11:5"], "properties": { "t46": ["46:5", "46:6", "46:8", "46:9", "46:19"] }, "versions": [ { "id": 2529, "version_string": "2", "sentences": [ { "id": 35227, "field_name": "متن الحديث", "content": "«لَوْ أَنَّكُمْ كُنْتُمْ تَوَكَّلُونَ عَلَى اللهِ حَقَّ تَوَكُّلِهِ ...»", "language": "ar", "sentence_id": "7ad332b8-..." }, { "id": 35228, "field_name": "Hadith text", "content": "If you were to rely on Allah as He should be relied on ...", "language": "en", "sentence_id": "7ad332b8-..." } ] } ], "displayed_properties": [ { "id": "t11", "label": "التصنيف الشرعي", "values": [ { "key": "11:5", "name": "..." } ] } ] } ], "total": 839}Without page the answer is a plain array of the same cards. For the hadith encyclopedia that is ~2.6 MB with fields and ~7.5 MB without; it is served from a cache and is the right call for a client that wants everything once.
| Field | |
|---|---|
versions[].sentences |
The card’s content. Each sentence is one field in one language: pair the Arabic and the translation by sentence_id. The hadith encyclopedia’s fields are عنوان الحديث (title), بادئة الحديث (narrator line), متن الحديث (text), درجة الحديث (grade), التخريج (source), الشرح (explanation), الفوائد (benefits) and a few more; translated sentences carry the field name in that language. |
categories |
Keys "<table>:<item>" including ancestors; names from categories. |
properties |
Flat attributes, keyed by property id: item keys for a lookup property (t46), text for a free one (book, chapter). |
displayed_properties |
The properties the site shows for this card, resolved to labels and names, in display order. |
One card
Section titled “One card”| Parameter | ||
|---|---|---|
lang |
required | The language to return beside the Arabic. |
curl "https://islamenc.com/api/enc/cards/7913?lang=en"The same shape as a listed card, plus:
{ "external_id": "7913", "encyclopedia": { "external_id": "101", "name": "موسوعة الأحاديث", "description": null }, "available_languages": ["ar", "am", "as", "bs", "en", "..."], "versions": [ { "sentences": [ { "field_name": "...", "content": "...", "language": "en", "links": [] } ] } ], "displayed_properties": [ ... ]}sentences[].links are cross-references the site found in that sentence, for its own pages; empty for most.
Categories
Section titled “Categories”| Parameter | ||
|---|---|---|
lang |
optional | Language of the names where translated. |
translated |
optional | 1: count only cards that exist in lang. |
The category trees of an encyclopedia’s cards, flat, with each node’s parent and how many cards sit in it or under it.
[ { "key": "11:1", "name": "القرآن الكريم وعلومه", "parent": null, "count": 37 }, { "key": "11:2", "name": "الحديث وعلومه", "parent": null, "count": 9 }, { "key": "11:4", "name": "العقيدة", "parent": null, "count": 148 }]The table before the colon says which tree: 11 the sharia classification, 43 topics, 18 the themes of introducing Islam. Pass a key as category to the card listing or to the search.
Properties
Section titled “Properties”| Parameter | ||
|---|---|---|
lang |
optional | Language of the listing the counts are for. |
translated |
optional | 1: count only cards that exist in lang. |
What an encyclopedia’s listing can be filtered by, with every value and its card count. A tree property (tree: true) has its values in the categories endpoint; the rest list theirs here.
[ { "id": "t11", "label": "التصنيف الشرعي", "table": 11, "tree": true }, { "id": "t30", "label": "الفئة المستهدفة", "values": [ { "key": "30:33", "name": "المسلم", "count": 109 }, { "key": "30:34", "name": "غير مسلم", "count": 1 } ] }, { "id": "t40", "label": "حجم المحتوى", "values": [ { "key": "40:1", "name": "مختصر", "count": 58 }, { "key": "40:2", "name": "متوسط", "count": 33 } ] }]Filter with prop=<id>=<key>: GET /enc/101/cards?page=1&limit=20&prop=t40=40:1 lists the short cards. Repeat prop to require several.
Which languages each card has
Section titled “Which languages each card has”A map from card id to its languages, for the whole encyclopedia (~200 KB for the hadith one).
{ "7913": ["ar", "am", "as", "bs", "en", "..."], "7914": ["ar", "en", "fr", "..."] }Vocabulary of the hadith encyclopedia
Section titled “Vocabulary of the hadith encyclopedia”The labels and value names used by the hadith encyclopedia, translated into 100+ languages: field names, grade names, the names of the collections a hadith is narrated in. Two projects: hadeethenc (interface labels) and hadeethenc_meta (attribute values). GET /enc-meta lists them with how many languages and phrases each has.
| Parameter | ||
|---|---|---|
lang |
required | The language wanted; falls back along chain (to English, then Arabic) for phrases not translated. |
curl "https://islamenc.com/api/enc-meta/hadeethenc_meta/values?lang=en"{ "project_key": "hadeethenc_meta", "language": "en", "chain": ["en"], "resolved_from": { "en": 120 }, "labels": { "attrib_7": "Narrated by Ibn Hibbaan", "attrib_11": "Narrated by Ibn Maajah" }, "values": [ { "key": "attrib_7", "ar": "رواه ابن حبان", "text": "Narrated by Ibn Hibbaan" } ]}/values keys the same phrases by their Arabic original (ar), which is how a card’s Arabic grade or source text can be shown in the reader’s language.

