{"docs":"/api/docs","tables":{"authors":{"kind":"table","primary_key":["id"],"columns":[{"name":"id","type":"INTEGER","pk":true,"indexed":true},{"name":"name","type":"TEXT","pk":false,"indexed":false},{"name":"shohra","type":"TEXT","pk":false,"indexed":false},{"name":"konya","type":"TEXT","pk":false,"indexed":false},{"name":"death_year","type":"TEXT","pk":false,"indexed":false},{"name":"nasab","type":"TEXT","pk":false,"indexed":false},{"name":"bio_1","type":"TEXT","pk":false,"indexed":false},{"name":"bio_2","type":"TEXT","pk":false,"indexed":false},{"name":"bio_3","type":"TEXT","pk":false,"indexed":false}],"foreign_keys":[]},"book_cluster_sahabi":{"kind":"table","primary_key":["book_cluster_id","rawy_id"],"columns":[{"name":"book_cluster_id","type":"INTEGER","pk":true,"indexed":true},{"name":"rawy_id","type":"INTEGER","pk":true,"indexed":true}],"foreign_keys":[{"column":"rawy_id","references":"narrators.id"},{"column":"book_cluster_id","references":"book_clusters.id"}]},"book_clusters":{"kind":"table","primary_key":["id"],"columns":[{"name":"id","type":"INTEGER","pk":true,"indexed":true},{"name":"book_id","type":"TEXT","pk":false,"indexed":true},{"name":"cluster_id","type":"TEXT","pk":false,"indexed":true},{"name":"occurrences","type":"INTEGER","pk":false,"indexed":true},{"name":"taraf","type":"TEXT","pk":false,"indexed":false},{"name":"sahabi_id","type":"TEXT","pk":false,"indexed":true}],"foreign_keys":[{"column":"cluster_id","references":"clusters.cluster_id"},{"column":"book_id","references":"books.book_id"}]},"books":{"kind":"table","primary_key":["book_id"],"columns":[{"name":"book_id","type":"TEXT","pk":true,"indexed":true},{"name":"name","type":"TEXT","pk":false,"indexed":false},{"name":"author","type":"TEXT","pk":false,"indexed":false},{"name":"death_date","type":"TEXT","pk":false,"indexed":false},{"name":"is_printed","type":"INTEGER","pk":false,"indexed":false},{"name":"category_id","type":"INTEGER","pk":false,"indexed":false},{"name":"parts","type":"TEXT","pk":false,"indexed":false},{"name":"publisher","type":"TEXT","pk":false,"indexed":false},{"name":"country","type":"TEXT","pk":false,"indexed":false},{"name":"edition","type":"TEXT","pk":false,"indexed":false},{"name":"editor","type":"TEXT","pk":false,"indexed":false},{"name":"year_pub","type":"TEXT","pk":false,"indexed":false},{"name":"takhreeg","type":"TEXT","pk":false,"indexed":false},{"name":"priority","type":"INTEGER","pk":false,"indexed":false},{"name":"hadith_count","type":"INTEGER","pk":false,"indexed":false}],"foreign_keys":[{"column":"category_id","references":"categories.id"}]},"categories":{"kind":"table","primary_key":["id"],"columns":[{"name":"id","type":"INTEGER","pk":true,"indexed":true},{"name":"name","type":"TEXT","pk":false,"indexed":false}],"foreign_keys":[]},"clusters":{"kind":"table","primary_key":["cluster_id"],"columns":[{"name":"cluster_id","type":"TEXT","pk":true,"indexed":true},{"name":"hadith_type","type":"INTEGER","pk":false,"indexed":false},{"name":"sona_type","type":"INTEGER","pk":false,"indexed":false},{"name":"hokm_type","type":"INTEGER","pk":false,"indexed":false},{"name":"sahaba_count","type":"INTEGER","pk":false,"indexed":false},{"name":"occurrences","type":"INTEGER","pk":false,"indexed":false},{"name":"taraf","type":"TEXT","pk":false,"indexed":false}],"foreign_keys":[]},"commentaries":{"kind":"table","primary_key":["bhid","commentary_book"],"columns":[{"name":"bhid","type":"TEXT","pk":true,"indexed":true},{"name":"book_id","type":"TEXT","pk":false,"indexed":false},{"name":"hadith_num","type":"INTEGER","pk":false,"indexed":false},{"name":"commentary_book","type":"INTEGER","pk":true,"indexed":true},{"name":"text","type":"TEXT","pk":false,"indexed":false}],"foreign_keys":[]},"critic_opinions":{"kind":"table","primary_key":["id"],"columns":[{"name":"id","type":"INTEGER","pk":true,"indexed":true},{"name":"alem_id","type":"TEXT","pk":false,"indexed":true},{"name":"rawy_id","type":"TEXT","pk":false,"indexed":true},{"name":"opinion","type":"TEXT","pk":false,"indexed":true}],"foreign_keys":[{"column":"rawy_id","references":"narrators.id"},{"column":"alem_id","references":"critics.alem_id"}]},"critics":{"kind":"table","primary_key":["alem_id"],"columns":[{"name":"alem_id","type":"TEXT","pk":true,"indexed":true},{"name":"name","type":"TEXT","pk":false,"indexed":false},{"name":"rawy_shohra","type":"TEXT","pk":false,"indexed":false},{"name":"rotba","type":"INTEGER","pk":false,"indexed":false},{"name":"tabaka","type":"TEXT","pk":false,"indexed":false},{"name":"death_date","type":"TEXT","pk":false,"indexed":false},{"name":"rawy_id","type":"TEXT","pk":false,"indexed":false},{"name":"opinion_count","type":"INTEGER","pk":false,"indexed":false},{"name":"wasf_rotba","type":"TEXT","pk":false,"indexed":false},{"name":"wasf","type":"TEXT","pk":false,"indexed":false}],"foreign_keys":[]},"dictionary":{"kind":"table","primary_key":["root"],"columns":[{"name":"root","type":"TEXT","pk":true,"indexed":true},{"name":"mo7eet","type":"TEXT","pk":false,"indexed":false},{"name":"faaq","type":"TEXT","pk":false,"indexed":false},{"name":"sa7a7","type":"TEXT","pk":false,"indexed":false},{"name":"nehay","type":"TEXT","pk":false,"indexed":false},{"name":"lesan","type":"TEXT","pk":false,"indexed":false},{"name":"tahzeeb","type":"TEXT","pk":false,"indexed":false}],"foreign_keys":[]},"hadith":{"kind":"table","primary_key":["bhid"],"columns":[{"name":"bhid","type":"TEXT","pk":true,"indexed":true},{"name":"book_id","type":"TEXT","pk":false,"indexed":true},{"name":"hadith_num","type":"INTEGER","pk":false,"indexed":true},{"name":"taraf_offset","type":"TEXT","pk":false,"indexed":true},{"name":"cluster_id","type":"TEXT","pk":false,"indexed":true},{"name":"sahabi_id","type":"TEXT","pk":false,"indexed":true},{"name":"ehala","type":"TEXT","pk":false,"indexed":true},{"name":"hokm","type":"INTEGER","pk":false,"indexed":true}],"foreign_keys":[{"column":"cluster_id","references":"clusters.cluster_id"},{"column":"book_id","references":"books.book_id"}]},"hadith_fts":{"kind":"fulltext","primary_key":["rowid"],"columns":[{"name":"bhid","type":"","pk":false,"indexed":false},{"name":"book_id","type":"","pk":false,"indexed":false},{"name":"clean_text","type":"","pk":false,"indexed":false}],"foreign_keys":[],"search":"q= takes an FTS5 MATCH query; rows then carry a snippet and are ranked by relevance"},"hadith_sahabi":{"kind":"table","primary_key":["bhid","rawy_id"],"columns":[{"name":"bhid","type":"TEXT","pk":true,"indexed":true},{"name":"rawy_id","type":"INTEGER","pk":true,"indexed":true}],"foreign_keys":[{"column":"rawy_id","references":"narrators.id"},{"column":"bhid","references":"hadith.bhid"}]},"hadith_text":{"kind":"table","primary_key":["bhid"],"columns":[{"name":"bhid","type":"TEXT","pk":true,"indexed":true},{"name":"book_id","type":"TEXT","pk":false,"indexed":true},{"name":"hadith_num","type":"INTEGER","pk":false,"indexed":true},{"name":"raw_text","type":"TEXT","pk":false,"indexed":false},{"name":"clean_text","type":"TEXT","pk":false,"indexed":false}],"foreign_keys":[{"column":"book_id","references":"books.book_id"}]},"hokm_text":{"kind":"table","primary_key":["id"],"columns":[{"name":"id","type":"INTEGER","pk":true,"indexed":true},{"name":"text","type":"TEXT","pk":false,"indexed":false}],"foreign_keys":[]},"manuscripts":{"kind":"table","primary_key":["id"],"columns":[{"name":"id","type":"TEXT","pk":true,"indexed":true},{"name":"name","type":"TEXT","pk":false,"indexed":false},{"name":"author","type":"TEXT","pk":false,"indexed":false},{"name":"death_date","type":"TEXT","pk":false,"indexed":false},{"name":"num_papers","type":"TEXT","pk":false,"indexed":false},{"name":"source","type":"TEXT","pk":false,"indexed":false},{"name":"scribe_name","type":"TEXT","pk":false,"indexed":false}],"foreign_keys":[]},"masdar":{"kind":"table","primary_key":["book_id"],"columns":[{"name":"book_id","type":"TEXT","pk":true,"indexed":true},{"name":"book_name","type":"TEXT","pk":false,"indexed":false},{"name":"shohra_title","type":"TEXT","pk":false,"indexed":false},{"name":"category","type":"TEXT","pk":false,"indexed":false}],"foreign_keys":[]},"narrators":{"kind":"table","primary_key":["id"],"columns":[{"name":"id","type":"INTEGER","pk":true,"indexed":true},{"name":"new_id","type":"INTEGER","pk":false,"indexed":true},{"name":"name","type":"TEXT","pk":false,"indexed":true},{"name":"shohra","type":"TEXT","pk":false,"indexed":true},{"name":"badeel","type":"TEXT","pk":false,"indexed":false},{"name":"konya","type":"TEXT","pk":false,"indexed":false},{"name":"lakab","type":"TEXT","pk":false,"indexed":false},{"name":"san3a","type":"TEXT","pk":false,"indexed":false},{"name":"wasf","type":"TEXT","pk":false,"indexed":false},{"name":"mazhab","type":"TEXT","pk":false,"indexed":false},{"name":"nasab","type":"TEXT","pk":false,"indexed":false},{"name":"rotba","type":"INTEGER","pk":false,"indexed":false},{"name":"wasf_rotba","type":"TEXT","pk":false,"indexed":false},{"name":"tabaka","type":"INTEGER","pk":false,"indexed":false},{"name":"e5telat","type":"INTEGER","pk":false,"indexed":false},{"name":"tadleese","type":"INTEGER","pk":false,"indexed":false},{"name":"date_of_birth","type":"TEXT","pk":false,"indexed":false},{"name":"death_year","type":"TEXT","pk":false,"indexed":false},{"name":"age","type":"INTEGER","pk":false,"indexed":false},{"name":"baladekama","type":"TEXT","pk":false,"indexed":false},{"name":"baladwafa","type":"TEXT","pk":false,"indexed":false},{"name":"mawaaly","type":"TEXT","pk":false,"indexed":false},{"name":"karaba","type":"TEXT","pk":false,"indexed":false},{"name":"bokhary","type":"INTEGER","pk":false,"indexed":false},{"name":"moslem","type":"INTEGER","pk":false,"indexed":false},{"name":"marweyaat","type":"INTEGER","pk":false,"indexed":false}],"foreign_keys":[]},"quran_verses":{"kind":"table","primary_key":["verse_id"],"columns":[{"name":"verse_id","type":"TEXT","pk":true,"indexed":true},{"name":"text","type":"TEXT","pk":false,"indexed":false}],"foreign_keys":[]},"references_bib":{"kind":"table","primary_key":["id"],"columns":[{"name":"id","type":"INTEGER","pk":true,"indexed":true},{"name":"name","type":"TEXT","pk":false,"indexed":false},{"name":"author","type":"TEXT","pk":false,"indexed":false},{"name":"death_year","type":"TEXT","pk":false,"indexed":false},{"name":"volume_count","type":"INTEGER","pk":false,"indexed":false},{"name":"publish_place","type":"TEXT","pk":false,"indexed":false},{"name":"publish_city","type":"TEXT","pk":false,"indexed":false},{"name":"publish_date","type":"TEXT","pk":false,"indexed":false},{"name":"print_no","type":"TEXT","pk":false,"indexed":false},{"name":"inspector","type":"TEXT","pk":false,"indexed":false}],"foreign_keys":[]},"sanad":{"kind":"table","primary_key":["sanad_id"],"columns":[{"name":"sanad_id","type":"INTEGER","pk":true,"indexed":true},{"name":"bhid","type":"TEXT","pk":false,"indexed":true},{"name":"rawy_ids","type":"TEXT","pk":false,"indexed":false},{"name":"cluster_id","type":"TEXT","pk":false,"indexed":true},{"name":"hokm","type":"INTEGER","pk":false,"indexed":true}],"foreign_keys":[{"column":"bhid","references":"hadith.bhid"}]},"sanad_rawy":{"kind":"table","primary_key":["sanad_id","pos"],"columns":[{"name":"sanad_id","type":"INTEGER","pk":true,"indexed":true},{"name":"pos","type":"INTEGER","pk":true,"indexed":false},{"name":"rawy_id","type":"INTEGER","pk":false,"indexed":true}],"foreign_keys":[{"column":"rawy_id","references":"narrators.id"},{"column":"sanad_id","references":"sanad.sanad_id"}]},"taraf":{"kind":"table","primary_key":["taraf_id"],"columns":[{"name":"taraf_id","type":"TEXT","pk":true,"indexed":true},{"name":"text","type":"TEXT","pk":false,"indexed":true},{"name":"cluster_id","type":"TEXT","pk":false,"indexed":true}],"foreign_keys":[{"column":"cluster_id","references":"clusters.cluster_id"}]},"topic_nodes":{"kind":"table","primary_key":["node_id","tree_id"],"columns":[{"name":"node_id","type":"INTEGER","pk":true,"indexed":true},{"name":"tree_id","type":"INTEGER","pk":true,"indexed":true},{"name":"parent_id","type":"INTEGER","pk":false,"indexed":false},{"name":"text","type":"TEXT","pk":false,"indexed":false},{"name":"child_count","type":"INTEGER","pk":false,"indexed":false},{"name":"hadith_count","type":"INTEGER","pk":false,"indexed":false},{"name":"percentage","type":"INTEGER","pk":false,"indexed":false},{"name":"cluster_id","type":"TEXT","pk":false,"indexed":true},{"name":"hokm_id","type":"INTEGER","pk":false,"indexed":false}],"foreign_keys":[]},"verse_location":{"kind":"table","primary_key":["id"],"columns":[{"name":"id","type":"INTEGER","pk":true,"indexed":true},{"name":"sura","type":"TEXT","pk":false,"indexed":true},{"name":"verse_num","type":"INTEGER","pk":false,"indexed":false},{"name":"verse_id","type":"TEXT","pk":false,"indexed":true}],"foreign_keys":[{"column":"verse_id","references":"quran_verses.verse_id"}]},"word_forms":{"kind":"table","primary_key":["form"],"columns":[{"name":"form","type":"TEXT","pk":true,"indexed":true},{"name":"root","type":"TEXT","pk":false,"indexed":true},{"name":"prefix","type":"TEXT","pk":false,"indexed":true},{"name":"pattern","type":"TEXT","pk":false,"indexed":true},{"name":"suffix","type":"TEXT","pk":false,"indexed":true},{"name":"note","type":"TEXT","pk":false,"indexed":true}],"foreign_keys":[]}},"usage":{"list":"GET /api/{table}?column=value&column=op.value&fields=a,b&order=col.desc&limit=20&offset=0&count=1","one":"GET /api/{table}/{primary key}; a composite key is comma-joined in primary_key order","operators":["eq","neq","gt","gte","lt","lte","like (case-sensitive, * matches anything)","in (comma-separated list)","is (null or notnull)"],"ranges":"repeat a column: ?hadith_num=gte.10&hadith_num=lt.20","paging":"limit defaults to 20, max 100. Follow \"next\" until it is null. \"total\" appears only with count=1","search":"GET /api/search?q=&book=&hokm=&page=&limit= is the web UI search (root expansion, snippets). GET /api/hadith_fts?q= takes raw FTS5 syntax","reports":"POST /api/reports {\"kind\", \"message\", optionally \"problem\", \"bhid\", \"narrator_id\", \"suggested\", \"source\", and for kind=data \"table\", \"key\", \"column\"} reports a mistake. GET /api/reports[/{id}] lists them, newest first, with the same filters as a table (they are not part of the downloadable database)"},"ui_links":"Rows that are a hadith or narrator carry ui_url. Rows that point at one carry <column>_ui_url (bhid, rawy_id) or <column>_ui_urls (the comma-separated sahabi_id, rawy_ids).","enums":{"hokm":{"-1":"غير محدد","0":"صحيح","1":"حسن","2":"ضعيف","3":"ضعيف جداً","4":"متهم","5":"موضوع"},"hadith_type":{"1":"قدسي","2":"مرفوع"},"sona_type":["قولية","فعلية","تقريرية","شمائل"],"is_printed":["manuscript","printed"],"report_kind":{"data":"a mistake in the database","website":"a mistake or bug in the website or the API"},"report_problem":{"wrong_value":"the stored value is wrong","missing":"something that should be there is not","unexpected":"something is there that should not be","other":"none of these"},"report_status":{"open":"not looked at yet","fixed":"corrected","rejected":"not a mistake, or cannot be acted on"},"commentary_book":{"1":"فتح الباري شرح صحيح البخاري (book 146)","2":"شرح النووي على صحيح مسلم (book 158)","3":"عون المعبود شرح سنن أبي داود (book 184)","4":"تحفة الأحوذي شرح جامع الترمذي (book 195)"},"tree_id":{"1":"الإيمان","2":"القرآن الكريم","3":"العلم","4":"خلق الكون بما فيه","5":"قصص الأنبياء","6":"السيرة النبوية","7":"الفتن والملاحم","8":"العبادات","9":"المعاملات","10":"الأخلاق والآداب","11":"الأقضية والأحكام","12":"المجتمع والأسرة","13":"الفضائل والمناقب"}},"notes":["book_id, cluster_id and bhid (\"<book_id>_<number>\") are text; gt/lt on them compare as text. narrators.id is an integer.","hokm is -1 when unknown. It is used by hadith.hokm, sanad.hokm, clusters.hokm_type and topic_nodes.hokm_id.","sahabi_id and rawy_ids are comma-separated narrators.id lists (rawy_ids: compiler first, companion last). To filter by narrator use the sanad_rawy, hadith_sahabi and book_cluster_sahabi tables.","hadith_text.clean_text keeps diacritics; hadith_fts and /api/search match on text without them. Neither folds alef/hamza forms.","hadith_text is 2.4 GB: a filter on it needs an exact bhid, book_id or hadith_num (then raw_text/clean_text can be filtered inside those rows, e.g. book_id=146&clean_text=like.*word*). To search all hadith text use /api/search or hadith_fts?q=."]}