Bring authentic hadith into your app
A clean, free, read-only JSON API. No keys required to fetch a random narration — start in a single request.
Quick start
Every response is JSON and no API key is required. The base URL is:
https://randomhadith.comFetch a complete random hadith with a single request:
fetch("https://randomhadith.com/api")
.then((res) => res.json())
.then((hadith) => {
console.log(hadith.text_en);
console.log(hadith.book, hadith.chapter_name_en);
});Endpoints
Returns a complete, randomly selected hadith — ideal for daily-hadith widgets and one-call integrations.
{
"id": 1,
"book": "Sahih al-Bukhari",
"chapter_no": 1,
"hadith_no": "1",
"chapter_name_en": "How the Divine Revelation started",
"chapter_name_ar": "باب كيف كان بدء الوحي",
"text_ar": "...",
"text_en": "...",
"text_ur": "..."
}Returns only a random hadith ID. Follow with /api/hadith?id= to load the full narration.
{ "id": 12345 }Returns a specific hadith by numeric ID (1–34,477) — for permalinks, bookmarks, and saved favorites.
curl "https://randomhadith.com/api/hadith?id=12345"Responses draw from Sahih al-Bukhari, Sahih Muslim, Sunan Abi Dawud, Jami` at-Tirmidhi, Sunan an-Nasa'i, Sunan Ibn Majah.
Response schema
A machine-readable OpenAPI 3.1 schema is available at /openapi.json.
| id | number | Unique identifier used across the site and API. |
| book | string | Name of the source collection. |
| chapter_no | number | Chapter number within the book. |
| hadith_no | string | Hadith number as referenced in the collection. |
| chapter_name_en | string | Chapter title in English. |
| chapter_name_ar | string | Chapter title in Arabic. |
| text_ar | string | Hadith text in Arabic. |
| text_en | string | Hadith text in English. |
| text_ur | string | Urdu text when available; may be empty. |
Rate limits
The API is free for non-commercial use. Limits are applied per client IP to keep it fast for everyone. Both successful and failed requests count toward the limit; exceeding it returns 429 Too Many Requests.
Building something commercial or high-volume? Get in touch for raised limits, and see our licensing page for attribution terms.
Developer FAQ
See the questions below for keys, caching, attribution, and limits.
Developer FAQ
Common questions about integrating the Random Hadith API, rate limits, licensing, and production use.