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
bash
curl "https://your-domain.com/api/v1/prayer-time?lat=24.7136&lon=46.6753&method=karachi&school=hanafi&date=2026-05-10&api_key=YOUR_KEY"javascript
const response = await fetch('https://your-domain.com/api/v1/prayer-time?lat=24.7136&lon=46.6753&method=karachi&school=hanafi&date=2026-05-10', {
headers: { 'X-API-Key': 'YOUR_KEY' }
});
const data = await response.json();
console.log(data);python
import requests
response = requests.get(
'https://your-domain.com/api/v1/prayer-time',
params={
'lat': 24.7136,
'lon': 46.6753,
'method': 'karachi',
'school': 'hanafi',
'date': '2026-05-10'
},
headers={'X-API-Key': 'YOUR_KEY'}
)
print(response.json())Example Response
json
{
"api_key": "YOUR_KEY",
"request": {
"lat": 24.7136,
"lon": 46.6753,
"method": "Karachi",
"school": "hanafi",
"date": "2026-05-10"
},
"timezone": "Asia/Riyadh",
"times": {
"fajr": {
"utc": "2026-05-10T02:15:00.000Z",
"local": "2026-05-10T05:15:00"
},
"sunrise": {
"utc": "2026-05-10T04:30:00.000Z",
"local": "2026-05-10T07:30:00"
},
"dhuhr": {
"utc": "2026-05-10T10:00:00.000Z",
"local": "2026-05-10T13:00:00"
},
"asr": {
"utc": "2026-05-10T13:30:00.000Z",
"local": "2026-05-10T16:30:00"
},
"maghrib": {
"utc": "2026-05-10T15:45:00.000Z",
"local": "2026-05-10T18:45:00"
},
"isha": {
"utc": "2026-05-10T17:00:00.000Z",
"local": "2026-05-10T20:00:00"
}
}
}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 |
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."
}