Skip to content

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

ParameterTypeDescription
lat*floatLatitude in decimal degrees. Example: 24.7136.
lon*floatLongitude in decimal degrees. Example: 46.6753. You may also use lng.
methodstringCalculation method. Defaults to karachi. Supported values: mwl, makkah, cairo, tehran, isna, singapore, turkey, qatar, kuwait, dubai, moonsightingcommittee, other.
schoolstringMadhab for Asr calculation. Defaults to shafi. Supported values: shafi, hanafi.
datestringDate 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_KEY

Example 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

FieldTypeDescription
api_keystringThe API key used for the request
requestobjectThe normalized request payload
request.latnumberRequested latitude
request.lonnumberRequested longitude
request.methodstringActive calculation method
request.schoolstringActive madhab
request.datestringRequested date
timezonestringTimezone calculated from coordinates
timesobjectPrayer times for the date and location
times.*.utcstringPrayer time in UTC ISO format
times.*.localstringPrayer time in local timezone ISO format
data.timestampstringISO 8601 response timestamp
api_info.usagestringEndpoint usage template
rateLimit.categorystringRate limit category for this request
rateLimit.limitnumberMaximum requests allowed in the window
rateLimit.remainingnumberRequests remaining in the current window
rateLimit.nextResetAtstringISO 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."
}

A service from Muslim BD Apps — Free & Open Source Muslim API