Prayer times, Qibla direction, Hijri conversion, Islamic holidays, the 99 Names of Allah, and Zakat calculations in one API.
Built on Cloudflare Workers with Hono.
- Daily prayer times with multiple calculation methods and madhab support
- Qibla direction from any latitude and longitude
- Gregorian to Hijri and Hijri to Gregorian conversion
- Islamic holiday lookup by Hijri or Gregorian year
- Full 99 Names dataset or lookup by number
- Zakat calculation with gold and silver nisab thresholds
- Browser tester UI for manual exploration
- KV-backed caching for repeated prayer time requests
| Method | Path | Description |
|---|---|---|
| GET | /prayer-times?latitude=<lat>&longitude=<lng> |
Prayer times, sunnah times, current prayer, and next prayer |
| GET | /qibla?latitude=<lat>&longitude=<lng> |
Qibla direction and compass heading |
| GET | /hijri?direction=toHijri&date=2026-04-12 |
Convert between Gregorian and Hijri dates |
| GET | /holidays?calendar=gregorian&year=2026 |
Islamic holiday calendar data |
| GET | /names |
All 99 Names of Allah |
| GET | /names?number=1 |
Single Name of Allah by number |
| GET | /zakat?savings=5000&gold_price_per_gram=85&silver_price_per_gram=1.1 |
Zakat calculation with nisab comparison |
| GET | /health |
Public health check |
| GET | / |
Browser tester UI |
{
"coordinates": {
"latitude": 36.7538,
"longitude": 3.0588
},
"direction": 101.49,
"compass": "E"
}All feature routes are protected so requests cannot bypass the intended API gateway flow. The only public routes are /, /health, and /logo.svg.
Live worker URL:
https://islamic-toolkit-api.hassanmakhloufi.workers.devIf you want to test protected routes against the worker directly as the owner, send the configured X-RapidAPI-Proxy-Secret header:
curl "https://islamic-toolkit-api.hassanmakhloufi.workers.dev/qibla?latitude=36.7538&longitude=3.0588" \
-H "X-RapidAPI-Proxy-Secret: YOUR_PROXY_SECRET" | jqHealth is public:
curl "https://islamic-toolkit-api.hassanmakhloufi.workers.dev/health" | jqnpm install
npm run devnpm run type-check
npm test# Set or rotate the production secret
npx wrangler secret put RAPIDAPI_PROXY_SECRET --name islamic-toolkit-api
# Deploy the worker
npm run deployKV binding required in wrangler.toml:
ISLAMIC_CACHE