UtilitiesPopular

Prayer Times API

Precise Islamic prayer time calculations using full astronomical formulas. Supports 5 calculation methods, 2 juristic schools, 15 MENA cities, and arbitrary coordinates. Returns all six daily prayer times plus Qibla direction calculated via great-circle bearing.

Endpoint:/api/v1/prayer-times
Method:GET
Latency:~10ms

Try it out

GET/api/v1/prayer-times

Parameters

Code

curl
curl -X GET "https://khaleejiapi.dev/api/v1/prayer-times?city=dubai&method=mwl&school=shafi" \
-H "Authorization: Bearer your_api_key"

Parameters

NameTypeRequiredDescription
citystringOptionalCity name (15 MENA cities). Required if lat/lng not provided
latnumberOptionalLatitude (-90 to 90). Requires lng
lngnumberOptionalLongitude (-180 to 180). Requires lat
datestringOptionalDate in YYYY-MM-DD format (defaults to today)
methodstringOptionalCalculation method: mwl, isna, egypt, makkah, karachi
schoolstringOptionalJuristic school for Asr: shafi or hanafi

Note: Either city or both lat/lng must be provided.

Calculation Methods

IDNameFajr AngleIsha Angle
mwlMuslim World League18°17°
isnaIslamic Society of North America15°15°
egyptEgyptian General Authority19.5°17.5°
makkahUmm Al-Qura University18.5°90 min after Maghrib
karachiUniversity of Islamic Sciences, Karachi18°18°

Supported Cities

DubaiAbu DhabiSharjahRiyadhJeddahMeccaMedinaDohaKuwait CityManamaMuscatAmmanBeirutCairoBaghdad

Response Fields

prayers.fajr

Dawn prayer time (HH:MM, 24h, local)

prayers.sunrise

Sunrise time

prayers.dhuhr

Noon prayer time

prayers.asr

Afternoon prayer time (varies by school)

prayers.maghrib

Sunset prayer time

prayers.isha

Night prayer time

qibla.direction

Bearing to Kaaba in degrees (0°–360°)

qibla.compass

Compass direction (e.g., WSW, WNW)

Rate Limits

PlanRequests/MonthRate Limit
Free1,00020 req/min
Starter10,00060 req/min
Professional100,000300 req/min
Business500,000500 req/min

Debugging & Support

Include X-Request-ID when contacting support

Every response from KhaleejiAPI includes an X-Request-ID header — a unique identifier that lets our support team pull the exact log entry for your request within seconds. Always share it when reporting an unexpected error or unexpected result.

How to capture it

JavaScript / fetch

const res = await fetch("https://khaleejiapi.dev/api/v1/...", {
  headers: { Authorization: "******" },
});
const requestId = res.headers.get("x-request-id");
console.log("Request ID:", requestId);
// → e.g. "req_01j9xkz4vp8..."

cURL

curl -si "https://khaleejiapi.dev/api/v1/..." \
  -H "Authorization: ******" | grep -i x-request-id
# → x-request-id: req_01j9xkz4vp8...

Browser DevTools

Open DevTools (F12) → Network tab → click the failing request → scroll to the Response Headers section → copy the value next to x-request-id.

For a full list of error codes and guidance on common issues, see the Troubleshooting guide.