A blazing-fast, completely free REST API serving hadiths in Bengali — with full-text search, grade filtering, pagination and global CDN caching. No API key. No rate limits. Just build.
Every response is served from Vercel's global edge network with aggressive caching — typical response times are under 50ms.
Responses are cached on Vercel's CDN across 100+ locations worldwide with stale-while-revalidate — practically instant, everywhere.
Search across narrator, hadith text, references and grade in a single query param. Pre-indexed at boot for O(n) scans over lowercase haystacks.
Filter by authenticity — sahih, hasan, daif, fabricated and more — using clean ASCII slugs alongside the original Bengali labels.
Consistent envelope with total counts, page metadata and hasNext / hasPrev flags. Up to 100 items per page.
Perfect for “hadith of the day” widgets — grab 1 to 10 random hadiths, optionally restricted to a specific grade.
Call it straight from the browser, mobile apps or servers. No signup, no API key, no rate limits. 100% free forever.
Fire real requests against this deployment and inspect the JSON response — latency included.
// The response will appear here…
All endpoints return JSON with a consistent { success, data, meta? } envelope. Base URL is this site's origin.
| Param | Type | Description |
|---|---|---|
| q | string | Full-text search across narrator, text, reference & grade |
| grade | string | Grade slug: sahih · hasan · daif · fabricated · munkar · undetermined |
| page | int | Page number (default 1) |
| limit | int | Items per page (default 20, max 100) |
curl "https://hadith-api-three.vercel.app/api/hadiths?grade=sahih&page=1&limit=10"
| Param | Type | Description |
|---|---|---|
| id | int | Hadith id (0-based). Returns 404 when not found. |
curl "https://hadith-api-three.vercel.app/api/hadiths/5"
| Param | Type | Description |
|---|---|---|
| count | int | How many random hadiths (default 1, max 10) |
| grade | string | Restrict the random pool to a grade slug |
curl "https://hadith-api-three.vercel.app/api/random?count=3&grade=sahih"
curl "https://hadith-api-three.vercel.app/api/grades"
curl "https://hadith-api-three.vercel.app/api"
curl "https://hadith-api-three.vercel.app/api/stats"
| Method | Path | Description |
|---|---|---|
| POST | /api/hadiths | Create a hadith — body: narrator, text, reference, grade |
| PUT | /api/hadiths/{id} | Replace all fields of a hadith |
| PATCH | /api/hadiths/{id} | Update only the fields you send |
| DELETE | /api/hadiths/{id} | Remove a hadith |
curl -X POST "https://hadith-api-three.vercel.app/api/hadiths" \
-H "Authorization: Bearer YOUR_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{"narrator":"…","text":"…","reference":"…","grade":"sahih"}'Or use the visual Admin Panel — no curl required.
Copy-paste snippets for your stack of choice.
// Fetch a random sahih hadith const res = await fetch('https://hadith-api-three.vercel.app/api/random?grade=sahih'); const { data } = await res.json(); console.log(data.narrator); // আবূ হুরায়রা (রাঃ) থেকে বর্ণিতঃ console.log(data.text); // hadith text in Bengali console.log(data.reference); // মুসলিম ২৬৯৯
import requests res = requests.get( "https://hadith-api-three.vercel.app/api/hadiths", params={"q": "বিলাল", "limit": 5}, ) body = res.json() for h in body["data"]: print(h["id"], h["reference"], h["grade"])
# List page 1, ten per page curl "https://hadith-api-three.vercel.app/api/hadiths?page=1&limit=10" # Search full-text curl "https://hadith-api-three.vercel.app/api/hadiths?q=জান্নাত" # Hadith of the day curl "https://hadith-api-three.vercel.app/api/random"
function HadithOfTheDay() { const [hadith, setHadith] = React.useState(null); React.useEffect(() => { fetch('https://hadith-api-three.vercel.app/api/random') .then(r => r.json()) .then(body => setHadith(body.data)); }, []); if (!hadith) return 'Loading…'; return ( <blockquote> <p>{hadith.text}</p> <footer>{hadith.narrator} — {hadith.reference}</footer> </blockquote> ); }