A comprehensive, machine-readable JSON dataset of Sahih al-Bukhari, one of the most authentic collections of Hadith (sayings and actions of Prophet Muhammad) in Islamic literature.
Sahih al-Bukhari is a collection of hadith compiled by Imam Muhammad al-Bukhari (810–870 CE). It is considered the most authentic hadith collection by Sunni Muslims, containing traditions that al-Bukhari meticulously verified through rigorous methods of authentication.
| Metric | Value |
|---|---|
| Total Books | 97 |
| Total Hadiths | 7,277 |
| Languages | English & Arabic |
| Format | JSON |
sahih-bukhari/
├── book-01.json # Individual book files (1-97)
├── book-02.json
├── ...
├── book-97.json
├── bukhari-all-books.json # Complete collection in one file (~29 MB)
├── compact-index.json # Lightweight index for quick lookups
└── search-index.json # Pre-built search index
{
"bookNumber": 1,
"bookName": {
"english": "Revelation",
"arabic": "كتاب بدء الوحى"
},
"chapters": [...]
}{
"hadithNumber": 1,
"inBookHadithNumber": 1,
"chapterNumber": 1,
"narrator": "'Umar bin Al-Khattab",
"english": "Narrated 'Umar bin Al-Khattab: I heard Allah's Messenger (ﷺ) saying...",
"arabic": "حَدَّثَنَا الْحُمَيْدِيُّ عَبْدُ اللَّهِ بْنُ الزُّبَيْرِ...",
"inBookReference": "Book 1, Hadith 1",
"uscMsaReference": "Vol. 1, Book 1, Hadith 1",
"grade": "Sahih"
}The collection covers various aspects of Islamic jurisprudence and practice:
- Revelation
- Belief
- Knowledge
- Ablutions (Wudu')
- Bathing (Ghusl)
- Menstrual Periods
- Rubbing Hands and Feet with Dust
- Prayers (Salat)
- Times of the Prayers
- Call to Prayers ... and 87 more books covering topics including Zakat, Fasting, Hajj, Trade, Marriage, Jihad, Prophets, and more.
const fs = require('fs');
// Load a specific book
const book1 = JSON.parse(fs.readFileSync('book-01.json', 'utf8'));
console.log(book1.bookName.english); // "Revelation"
// Access hadiths
book1.chapters.forEach(chapter => {
chapter.hadiths.forEach(hadith => {
console.log(`Hadith ${hadith.hadithNumber}: ${hadith.narrator}`);
});
});import json
# Load the complete collection
with open('bukhari-all-books.json') as f:
data = json.load(f)
print(f"Total Hadiths: {data['totalHadiths']}")
# Load individual book
with open('book-01.json') as f:
book = json.load(f)
for chapter in book['chapters']:
for hadith in chapter['hadiths']:
print(f"{hadith['hadithNumber']}: {hadith['english'][:100]}...")- Building Islamic mobile/web applications
- Hadith search engines
- Natural Language Processing (NLP) research on religious texts
- Educational platforms
- Comparative religious studies
- Text analysis and data visualization
This dataset is provided for educational and research purposes. The hadith texts are part of the Islamic religious heritage and are in the public domain.
Contributions are welcome! If you find any errors in the translation or data structure, please open an issue or submit a pull request.
- Imam Muhammad al-Bukhari for compiling this invaluable collection
- The scholars who have preserved and transmitted these traditions through generations
- The translators who made this work accessible in English