Prayer Time API

This API provides endpoints to retrieve prayer times, Qibla direction, and Prohibited times for prayer. You can also adjust Hijri dates using the shifting parameter to match your region's official moon sighting announcements.

Request:

GET https://islamicapi.com/api/v1/prayer-time/?lat={latitude}&lon={longitude}&method={method}&school={school}&api_key={YOUR_API_KEY}

Example Requests:

Today's Prayer Times
GET /api/v1/prayer-time/?lat=23.8103&lon=90.4125&api_key=YOUR_API_KEY
Specific Date Prayer Times
GET /api/v1/prayer-time/?lat=23.8103&lon=90.4125&date=2026-03-14&api_key=YOUR_API_KEY
Full Month Prayer Times
GET /api/v1/prayer-time/?lat=23.8103&lon=90.4125&date=2026-03&api_key=YOUR_API_KEY

Query Parameters

lat (string) *

Latitude coordinates of the user's location.

Example: 51.5194682

lon (string) *

Longitude coordinates of the user's location.

Example: -0.1360365

method (integer)

Method for calculating prayer times based on geographical location and algorithms.

Example: 3

Allowed values:
1 - University of Islamic Sciences, Karachi
2 - Islamic Society of North America
3 - Muslim World League
4 - Umm Al-Qura University, Makkah
5 - Egyptian General Authority of Survey
7 - Institute of Geophysics, Tehran
8 - Gulf Region
9 - Kuwait
10 - Qatar
11 - MUIS, Singapore
12 - UOIF, France
13 - Diyanet, Turkey
14 - Russia
15 - Moonsighting Committee Worldwide
16 - Dubai (experimental)
17 - JAKIM, Malaysia
18 - Tunisia
19 - Algeria
20 - KEMENAG, Indonesia
21 - Morocco
22 - Lisbon, Portugal
23 - Jordan
0 - Jafari / Shia Ithna-Ashari

school (integer)

School of thought for Asr prayer time.

Default: 1 (Shafi)

Allowed: 1 - Shafi, 2 - Hanafi

calender (enum)

Calendar Calculation Method.

Default: UAQ

Allowed: HJCoSA, UAQ, DIYANET, MATHEMATICAL

shifting (integer)

Manual adjustment for Hijri dates based on local moon sighting. Use this when your region observes the Hijri date a day earlier or later than the calculated date.

Default: 0 (no adjustment)

Allowed: -2, -1, 0, +1, +2

Example: If the API calculates a new Hijri month beginning on a certain date, but your region's moon sighting committee officially declared it began one day earlier, use shifting=1 to shift forward. Conversely, if declared one day later, use shifting=-1 to shift backward. The prayer times remain unchanged, only the Hijri date labels adjust.

date (string) - optional

Retrieve prayer times for a specific date or entire month. If omitted, returns today's prayer times.

Examples:

Format Options:
YYYY-MM-DD - Specific date (e.g., 2026-03-14)
YYYY-MM - Full month (e.g., 2026-03)

Full Month Request:
date=2026-03 - Returns prayer times for all days in March 2026

Specific Date Request:
date=2026-03-14 - Returns prayer times for March 14, 2026

No Date Parameter:
Omit the parameter to get today's prayer times

Response Structure:
• For full month: Returns an array of daily prayer times in data
• For specific/today: Returns single day data in data object

📥 Download Full Month Response Example (JSON)
JSON Response (success)
{
                                        
    "code": 200,
    "status": "success",
    "data": {
        "times": {
            "Fajr": "03:48",
            "Sunrise": "05:17",
            "Dhuhr": "12:02",
            "Asr": "15:24",
            "Sunset": "18:48",
            "Maghrib": "18:48",
            "Isha": "20:18",
            "Imsak": "03:38",
            "Midnight": "00:02",
            "Firstthird": "22:17",
            "Lastthird": "01:47"
        },
        "date": {
            "readable": "28 May 2025",
            "timestamp": "1748390400",
            "hijri": {
                "date": "1446-12-01",
                "format": "YYYY-MM-DD",
                "day": "1",
                "weekday": {
                    "en": "Wednesday",
                    "ar": "الأربعاء"
                },
                "month": {
                    "number": 12,
                    "en": "Dhu al-Hijjah",
                    "ar": "ذُو ٱلْحِجَّة",
                    "days": 29
                },
                "year": "1446",
                "designation": {
                    "abbreviated": "AH",
                    "expanded": "Anno Hegirae"
                },
                "holidays": [],
                "adjustedHolidays": [],
                "method": "HJCOSA"
            },
            "gregorian": {
                "date": "2025-05-28",
                "format": "YYYY-MM-DD",
                "day": "28",
                "weekday": {
                    "en": "Wednesday"
                },
                "month": {
                    "number": 5,
                    "en": "May"
                },
                "year": "2025",
                "designation": {
                    "abbreviated": "AD",
                    "expanded": "Anno Domini"
                }
            }
        },
        "qibla": {
            "direction": {
                "degrees": 276.41,
                "from": "North",
                "clockwise": true
            },
            "distance": {
                "value": 4996.53,
                "unit": "km"
            }
        },
        "prohibited_times": {
            "sunrise": {
                "start": "05:15",
                "end": "05:30"
            },
            "noon": {
                "start": "11:57",
                "end": "12:07"
            },
            "sunset": {
                "start": "18:48",
                "end": "18:53"
            }
        },
        "timezone": {
            "name": "Asia/Manila",
            "utc_offset": "+08:00",
            "abbreviation": "PST"
        }
    }

}
JSON Response (Full Month - date=2026-03)
{
                                        
    "code": 200,
    "status": "success",
    "data": [
        {
            "date": "2026-03-01",
            "times": {
                "Fajr": "4:55 AM",
                "Sunrise": "6:13 AM",
                "Dhuhr": "12:13 PM",
                "Asr": "3:36 PM",
                ...
            },
            "hijri_date": {
                "date": "1447-09-11",
                "day": "11",
                "month": {
                    "number": 9,
                    "en": "Ramadan",
                    "ar": "رَمَضَان"
                },
                ...
            },
            "prohibited_times": { ... }
        },
        {
            "date": "2026-03-02",
            "times": { ... },
            "hijri_date": { ... },
            "prohibited_times": { ... }
        },
        ... (continues for all days in the month)
    ],
    "qibla": {
        "direction": {
            "degrees": 276.36,
            "from": "North",
            "clockwise": true
        },
        "distance": {
            "value": 4999.89,
            "unit": "km"
        }
    },
    "timezone": {
        "name": "Asia/Dhaka",
        "utc_offset": "+06:00",
        "abbreviation": ""
    }

}

Note: For full month requests, the data field returns an array containing prayer times for each day. Download complete example

JSON Response (error)
{
                                        
    "code": 502,
    "status": "error",
    "message": "Unable to fetch prayer times"

}
WhatsApp