Prayer Time
Accurate prayer times for any location with timezone-aware local time. Supports choice of calculation method, madhab, and date.
Get Prayer Times
GET/api/v1/prayer-time
Returns prayer time calculations for the given coordinates.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| lat* | float | Latitude in decimal degrees. Example: 24.7136. |
| lon* | float | Longitude in decimal degrees. Example: 46.6753. You may also use lng. |
| method | string | Calculation method. Defaults to karachi. Supported values: mwl, makkah, cairo, tehran, isna, singapore, turkey, qatar, kuwait, dubai, moonsightingcommittee, other. |
| school | string | Madhab for Asr calculation. Defaults to shafi. Supported values: shafi, hanafi. |
| date | string | Date in YYYY-MM-DD or ISO format. Defaults to today. |
Try Prayer Time API
Try Prayer Time API
Use your API key to send a live prayer-time request from the docs.
Latitude in decimal degrees.
Longitude in decimal degrees.
Optional calculation method.
Optional madhab (shafi or hanafi).
Optional date in YYYY-MM-DD format.
Used as the
api_key query parameter.GET /api/v1/prayer-time?lat=LATITUDE&lon=LONGITUDE&method=METHOD&school=SHAFI&date=YYYY-MM-DD&api_key=YOUR_KEYExample Request
curl "https://backend.muslimbd.app/api/v1/prayer-time?lat=24.7136&lon=46.6753&method=karachi&school=hanafi&date=2026-05-10&api_key=YOUR_KEY"Example Response
json
{
"status": 200,
"ok": true,
"url": "https://backend.muslimbd.app/api/v1/prayer-time?lat=24.7136&lon=46.6753&method=karachi&school=shafi&date=2026-05-10&api_key=1bfd1c00ddb4622eff081f76b6816f96bf34a5938af6d065c817cb00cfee4fc8",
"data": {
"api_key": "1bfd1c00ddb4622eff081f76b6816f96bf34a5938af6d065c817cb00cfee4fc8",
"request": {
"lat": 24.7136,
"lon": 46.6753,
"method": "karachi",
"school": "shafi",
"date": "2026-05-10"
},
"timezone": "Asia/Riyadh",
"times": {
"fajr": {
"utc": "2026-05-10T00:49:00.000Z",
"local": "2026-05-10T03:49:00"
},
"sunrise": {
"utc": "2026-05-10T02:12:00.000Z",
"local": "2026-05-10T05:12:00"
},
"dhuhr": {
"utc": "2026-05-10T08:51:00.000Z",
"local": "2026-05-10T11:51:00"
},
"asr": {
"utc": "2026-05-10T12:16:00.000Z",
"local": "2026-05-10T15:16:00"
},
"maghrib": {
"utc": "2026-05-10T15:27:00.000Z",
"local": "2026-05-10T18:27:00"
},
"isha": {
"utc": "2026-05-10T16:51:00.000Z",
"local": "2026-05-10T19:51:00"
}
},
"timestamp": "2026-05-21T13:06:49.747Z",
"api_info": {
"usage": "GET /api/v1/prayer-time?lat=LATITUDE&lon=LONGITUDE&apikey=YOUR_KEY"
},
"rateLimit": {
"category": "calculation",
"limit": 5,
"remaining": 4,
"nextResetAt": "2026-05-21T13:07:49.746Z"
}
}
}Response Fields
| Field | Type | Description |
|---|---|---|
api_key | string | The API key used for the request |
request | object | The normalized request payload |
request.lat | number | Requested latitude |
request.lon | number | Requested longitude |
request.method | string | Active calculation method |
request.school | string | Active madhab |
request.date | string | Requested date |
timezone | string | Timezone calculated from coordinates |
times | object | Prayer times for the date and location |
times.*.utc | string | Prayer time in UTC ISO format |
times.*.local | string | Prayer time in local timezone ISO format |
data.timestamp | string | ISO 8601 response timestamp |
api_info.usage | string | Endpoint usage template |
rateLimit.category | string | Rate limit category for this request |
rateLimit.limit | number | Maximum requests allowed in the window |
rateLimit.remaining | number | Requests remaining in the current window |
rateLimit.nextResetAt | string | ISO 8601 time when the rate limit window resets |
Error Responses
Invalid coordinates — 400 Bad Request
json
{
"error": "lat and lon must be valid numeric coordinates"
}Missing or invalid API key — 401 Unauthorized
json
{
"success": false,
"error": "Unauthorized",
"message": "Invalid or missing API key."
}