Returns today's prayer times based on given zone.
Resource URL
https://api.pray.zone/v2/times/today.json
Parameters
{format} | type | optional | decription |
---|
{city} | string | Required | The city id is the name of the city, the space are replaced with "-". The list of the cities and id are accessible here. Required if {longitude}|{latitude}|{elevation} or {ip} is missing. https://api.pray.zone/v2/times/today.json?city=mecca |
{longitude} {latitude} {elevation} | string | Required | Required if {longitude}|{latitude}|{elevation} or {city} is missing. https://api.pray.zone/v2/times/today.json?longitude=39.81666564941406&latitude=21.416667938232425&elevation=333 longitude | Longitude must be between -180 and 180 degrees inclusive | latitude | Longitude must be between -90 and 90 degrees inclusive | elevation | Elevation must be between -2000 and 8000 meters inclusive |
|
{ip} | string | Required | Only IPv4 are allowed Required if {city} or {ip} is missing. https://api.pray.zone/v2/times/today.json?ip=163.172.18.192 |
{key} | string | optional | We use a key to avoid abuse on our API. The API is Free! https://api.pray.zone/v2/times/today.json?city=mecca&key=MagicKey |
{school} | int | optional | Each countries has an default assigned school, the list of school by countries is accessible here. https://api.pray.zone/v2/times/today.json?city=mecca&school=2 Id | Name | Fajr | Isha |
---|
0 | Ithna Ashari | 16 | 14 | 1 | University of Islamic Sciences, Karachi | 18 | 18 | 2 | Islamic Society of North America | 15 | 15 | 3 | Muslim World League | 18 | 17 | 4 | Umm Al-Qura University, Mecca | 18.5 | 90 | 5 | Egyptian General Authority of Survey | 18 | 18 | 7 | Institute of Geophysics, University of Tehran | 17.7 | 14 | 8 | Morocco | 19 | 18 | 9 | Department of Islamic Advancement, Malaysia (JAKIM) | 20 | 18 | 10 | Majlis Ugama Islam Singapura | 20 | 18 | 11 | Union des Organisations Islamiques de France | 12 | 12 | 12 | Turkey | 12 | 12 |
|
{juristic} | int | optional | 0 for Shafii (or the standard way), 1 for Hanafi. If you leave this empty, it defaults to Shafii. https://api.pray.zone/v2/times/today.json?city=mecca&juristic=1 Id | Juristic |
---|
0 | Shafii (default) | 1 | Hanafi |
|
{highlat} | int | optional | In locations at higher latitude, twilight may persist throughout the night during some months of the year. In these abnormal periods, the determination of Fajr and Isha is not possible using the usual formulas mentioned in the previous section. To overcome this problem, several solutions have been proposed, three of which are described below. https://api.pray.zone/v2/times/today.json?city=mecca&highlat=2 School name | School id | Description |
---|
None (default) | 0 | No adjustment | Midnight | 1 | The period from sunset to sunrise is divided into two halves. The first half is considered to be the "night" and the other half as "day break". Fajr and Isha in this method are assumed to be at mid-night during the abnormal periods. | One-Seventh of the Night | 2 | The period between sunset and sunrise is divided into seven parts. Isha begins after the first one-seventh part, and Fajr is at the beginning of the seventh part. | Angle Based | 3 | This is an intermediate solution, used by some recent prayer time calculators. Let a be the twilight angle for Isha, and let t = a/60. The period between sunset and sunrise is divided into t parts. Isha begins after the first part. For example, if the twilight angle for Isha is 15, then Isha begins at the end of the first quarter (15/60) of the night. Time for Fajr is calculated similarly. |
|
{timeformat} | int | optional | Time format https://api.pray.zone/v2/times/today.json?city=mecca&timeformat=1 Time format | Time ID | Example: |
---|
24-hour format (default) | 0 | 09:00, 15:45, 22:12 | 12-hour format | 1 | 09:00 am, 03:45 pm, 10:12 pm | 12-hour format with no suffix | 2 | 09:00, 03:45, 10:12 |
|
Parameters
{format} | type | optional | decription |
---|
{key} | string | No | We use a key to avoid abuse on our API. The API is Free! |
{city} | string | No | The city id is the name of the city, the space are replaced with "-". The list of the cities and id are accessible here. |
{school} | int | Yes | Each countries has an default assigned school, the list of school by countries is accessible here. Id | Name | Fajr | Isha |
---|
0 | Ithna Ashari | 16 | 14 | 1 | University of Islamic Sciences, Karachi | 18 | 18 | 2 | Islamic Society of North America | 15 | 15 | 3 | Muslim World League | 18 | 17 | 4 | Umm Al-Qura University, Mecca | 18.5 | 90 | 5 | Egyptian General Authority of Survey | 18 | 18 | 7 | Institute of Geophysics, University of Tehran | 17.7 | 14 | 8 | Morocco | 19 | 18 | 9 | Department of Islamic Advancement, Malaysia (JAKIM) | 20 | 18 | 10 | Majlis Ugama Islam Singapura | 20 | 18 | 11 | Union des Organisations Islamiques de France | 12 | 12 | 12 | Turkey | 12 | 12 |
|
{juristic} | int | Yes | 0 for Shafii (or the standard way), 1 for Hanafi. If you leave this empty, it defaults to Shafii. Id | Juristic |
---|
0 | Shafii (default) | 1 | Hanafi |
|
{higher-latitudes} | int | Yes | In locations at higher latitude, twilight may persist throughout the night during some months of the year. In these abnormal periods, the determination of Fajr and Isha is not possible using the usual formulas mentioned in the previous section. To overcome this problem, several solutions have been proposed, three of which are described below. School name | School id | Description |
---|
None (default) | 0 | No adjustment | Midnight | 1 | The period from sunset to sunrise is divided into two halves. The first half is considered to be the "night" and the other half as "day break". Fajr and Isha in this method are assumed to be at mid-night during the abnormal periods. | One-Seventh of the Night | 2 | The period between sunset and sunrise is divided into seven parts. Isha begins after the first one-seventh part, and Fajr is at the beginning of the seventh part. | Angle Based | 3 | This is an intermediate solution, used by some recent prayer time calculators. Let a be the twilight angle for Isha, and let t = a/60. The period between sunset and sunrise is divided into t parts. Isha begins after the first part. For example, if the twilight angle for Isha is 15, then Isha begins at the end of the first quarter (15/60) of the night. Time for Fajr is calculated similarly. |
|
{time-format} | int | Yes | Time format Time format | Time ID | Example: |
---|
24-hour format (default) | 0 | 09:00, 15:45, 22:12 | 12-hour format | 1 | 09:00 am, 03:45 pm, 10:12 pm | 12-hour format with no suffix | 2 | 09:00, 03:45, 10:12 |
|
{day} | string | Yes | We use a key to avoid abuse on our API. The API is Free! |
{month-year} | string | Yes | We use a key to avoid abuse on our API. The API is Free! |
Example Request
https://api.pray.zone/v2/times/today.json?city=paris
Example Result
{
"code": 200,
"status": "OK",
"results": {
"datetime": [
{
"times": {
"Imsak": "07:13",
"Sunrise": "08:36",
"Fajr": "07:23",
"Dhuhr": "13:00",
"Asr": "15:03",
"Sunset": "17:25",
"Maghrib": "17:46",
"Isha": "18:38",
"Midnight": "00:24"
},
"date": {
"timestamp": 1610755200,
"gregorian": "2021-01-16",
"hijri": "1442-06-03"
}
}
],
"location": {
"latitude": 48.85661315917969,
"longitude": 2.352221965789795,
"elevation": 36.0,
"city": "Paris",
"country": "France",
"country_code": "FR",
"timezone": "Europe/Paris",
"local_offset": 1.0
},
"settings": {
"timeformat": "HH:mm",
"school": "Ithna Ashari",
"juristic": "Shafii",
"highlat": "None",
"fajr_angle": 12.0,
"isha_angle": 12.0
}
}
}