GET /v2/times/this_month.json

Returns today's prayer times based on given zone.

Resource URL

https://api.pray.zone/v2/times/this_month.json

Parameters

{format}typeoptionaldecription
{city}stringRequiredThe 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/this_month.json?city=mecca
{longitude}
{latitude}
{elevation}
stringRequired

Required if {longitude}|{latitude}|{elevation} or {city} is missing.
https://api.pray.zone/v2/times/this_month.json?longitude=39.81666564941406&latitude=21.416667938232425&elevation=333

longitudeLongitude must be between -180 and 180 degrees inclusive
latitudeLongitude must be between -90 and 90 degrees inclusive
elevationElevation must be between -2000 and 8000 meters inclusive
{ip}stringRequiredOnly IPv4 are allowed
Required if {city} or {ip} is missing.
https://api.pray.zone/v2/times/this_month.json?ip=163.172.18.192
{key}stringoptionalWe use a key to avoid abuse on our API. The API is Free!
https://api.pray.zone/v2/times/this_month.json?city=mecca&key=MagicKey
{school}intoptional

Each countries has an default assigned school, the list of school by countries is accessible here.
https://api.pray.zone/v2/times/this_month.json?city=mecca&school=2

IdNameFajrIsha
0Ithna Ashari1614
1University of Islamic Sciences, Karachi1818
2Islamic Society of North America1515
3Muslim World League1817
4Umm Al-Qura University, Mecca18.590
5Egyptian General Authority of Survey1818
7Institute of Geophysics, University of Tehran17.714
8Morocco1918
9Department of Islamic Advancement, Malaysia (JAKIM)2018
10Majlis Ugama Islam Singapura2018
11Union des Organisations Islamiques de France1212
12Turkey1212
{juristic}intoptional

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/this_month.json?city=mecca&juristic=1

IdJuristic
0Shafii (default)
1Hanafi
{highlat}intoptional

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/this_month.json?city=mecca&highlat=2

School nameSchool idDescription
None (default)0No adjustment
Midnight1The 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 Night2The 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 Based3This 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}intoptional

Time format
https://api.pray.zone/v2/times/this_month.json?city=mecca&timeformat=1

Time formatTime IDExample:
24-hour format (default)009:00, 15:45, 22:12
12-hour format109:00 am, 03:45 pm, 10:12 pm
12-hour format with no suffix209:00, 03:45, 10:12

Parameters

{format}typeoptionaldecription
{key}stringNoWe use a key to avoid abuse on our API. The API is Free!
{city}stringNoThe city id is the name of the city, the space are replaced with "-". The list of the cities and id are accessible here.
{school}intYes

Each countries has an default assigned school, the list of school by countries is accessible here.

IdNameFajrIsha
0Ithna Ashari1614
1University of Islamic Sciences, Karachi1818
2Islamic Society of North America1515
3Muslim World League1817
4Umm Al-Qura University, Mecca18.590
5Egyptian General Authority of Survey1818
7Institute of Geophysics, University of Tehran17.714
8Morocco1918
9Department of Islamic Advancement, Malaysia (JAKIM)2018
10Majlis Ugama Islam Singapura2018
11Union des Organisations Islamiques de France1212
12Turkey1212
{juristic}intYes

0 for Shafii (or the standard way), 1 for Hanafi. If you leave this empty, it defaults to Shafii.

IdJuristic
0Shafii (default)
1Hanafi
{higher-latitudes}intYes

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 nameSchool idDescription
None (default)0No adjustment
Midnight1The 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 Night2The 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 Based3This 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}intYes

Time format

Time formatTime IDExample:
24-hour format (default)009:00, 15:45, 22:12
12-hour format109:00 am, 03:45 pm, 10:12 pm
12-hour format with no suffix209:00, 03:45, 10:12
{day}stringYesWe use a key to avoid abuse on our API. The API is Free!
{month-year}stringYesWe use a key to avoid abuse on our API. The API is Free!

Example Request

https://api.pray.zone/v2/times/this_month.json?city=mecca

Example Result

{
  "code": 200,
  "status": "OK",
  "results": {
    "datetime": [
      {
        "times": {
          "Imsak": "04:48",
          "Sunrise": "06:09",
          "Fajr": "04:58",
          "Dhuhr": "12:10",
          "Asr": "15:34",
          "Sunset": "18:11",
          "Maghrib": "18:22",
          "Isha": "-",
          "Midnight": "23:35"
        },
        "date": {
          "timestamp": 1601510400,
          "gregorian": "2020-10-01",
          "hijri": "1442-02-14"
        }
      },
      {
        "times": {
          "Imsak": "04:48",
          "Sunrise": "06:10",
          "Fajr": "04:58",
          "Dhuhr": "12:10",
          "Asr": "15:33",
          "Sunset": "18:10",
          "Maghrib": "18:21",
          "Isha": "-",
          "Midnight": "23:34"
        },
        "date": {
          "timestamp": 1601596800,
          "gregorian": "2020-10-02",
          "hijri": "1442-02-15"
        }
      },
      {
        "times": {
          "Imsak": "04:49",
          "Sunrise": "06:10",
          "Fajr": "04:59",
          "Dhuhr": "12:10",
          "Asr": "15:33",
          "Sunset": "18:09",
          "Maghrib": "18:20",
          "Isha": "-",
          "Midnight": "23:34"
        },
        "date": {
          "timestamp": 1601683200,
          "gregorian": "2020-10-03",
          "hijri": "1442-02-16"
        }
      },
      {
        "times": {
          "Imsak": "04:49",
          "Sunrise": "06:10",
          "Fajr": "04:59",
          "Dhuhr": "12:09",
          "Asr": "15:32",
          "Sunset": "18:08",
          "Maghrib": "18:19",
          "Isha": "-",
          "Midnight": "23:34"
        },
        "date": {
          "timestamp": 1601769600,
          "gregorian": "2020-10-04",
          "hijri": "1442-02-17"
        }
      },
      {
        "times": {
          "Imsak": "04:49",
          "Sunrise": "06:10",
          "Fajr": "04:59",
          "Dhuhr": "12:09",
          "Asr": "15:32",
          "Sunset": "18:07",
          "Maghrib": "18:18",
          "Isha": "-",
          "Midnight": "23:33"
        },
        "date": {
          "timestamp": 1601856000,
          "gregorian": "2020-10-05",
          "hijri": "1442-02-18"
        }
      },
      {
        "times": {
          "Imsak": "04:50",
          "Sunrise": "06:11",
          "Fajr": "05:00",
          "Dhuhr": "12:09",
          "Asr": "15:31",
          "Sunset": "18:06",
          "Maghrib": "18:17",
          "Isha": "-",
          "Midnight": "23:33"
        },
        "date": {
          "timestamp": 1601942400,
          "gregorian": "2020-10-06",
          "hijri": "1442-02-19"
        }
      },
      {
        "times": {
          "Imsak": "04:50",
          "Sunrise": "06:11",
          "Fajr": "05:00",
          "Dhuhr": "12:08",
          "Asr": "15:31",
          "Sunset": "18:06",
          "Maghrib": "18:16",
          "Isha": "-",
          "Midnight": "23:33"
        },
        "date": {
          "timestamp": 1602028800,
          "gregorian": "2020-10-07",
          "hijri": "1442-02-20"
        }
      },
      {
        "times": {
          "Imsak": "04:50",
          "Sunrise": "06:11",
          "Fajr": "05:00",
          "Dhuhr": "12:08",
          "Asr": "15:30",
          "Sunset": "18:05",
          "Maghrib": "18:16",
          "Isha": "-",
          "Midnight": "23:32"
        },
        "date": {
          "timestamp": 1602115200,
          "gregorian": "2020-10-08",
          "hijri": "1442-02-21"
        }
      },
      {
        "times": {
          "Imsak": "04:51",
          "Sunrise": "06:12",
          "Fajr": "05:01",
          "Dhuhr": "12:08",
          "Asr": "15:30",
          "Sunset": "18:04",
          "Maghrib": "18:15",
          "Isha": "-",
          "Midnight": "23:32"
        },
        "date": {
          "timestamp": 1602201600,
          "gregorian": "2020-10-09",
          "hijri": "1442-02-22"
        }
      },
      {
        "times": {
          "Imsak": "04:51",
          "Sunrise": "06:12",
          "Fajr": "05:01",
          "Dhuhr": "12:08",
          "Asr": "15:29",
          "Sunset": "18:03",
          "Maghrib": "18:14",
          "Isha": "-",
          "Midnight": "23:32"
        },
        "date": {
          "timestamp": 1602288000,
          "gregorian": "2020-10-10",
          "hijri": "1442-02-23"
        }
      },
      {
        "times": {
          "Imsak": "04:51",
          "Sunrise": "06:12",
          "Fajr": "05:01",
          "Dhuhr": "12:07",
          "Asr": "15:29",
          "Sunset": "18:02",
          "Maghrib": "18:13",
          "Isha": "-",
          "Midnight": "23:32"
        },
        "date": {
          "timestamp": 1602374400,
          "gregorian": "2020-10-11",
          "hijri": "1442-02-24"
        }
      },
      {
        "times": {
          "Imsak": "04:51",
          "Sunrise": "06:13",
          "Fajr": "05:01",
          "Dhuhr": "12:07",
          "Asr": "15:28",
          "Sunset": "18:01",
          "Maghrib": "18:12",
          "Isha": "-",
          "Midnight": "23:31"
        },
        "date": {
          "timestamp": 1602460800,
          "gregorian": "2020-10-12",
          "hijri": "1442-02-25"
        }
      },
      {
        "times": {
          "Imsak": "04:52",
          "Sunrise": "06:13",
          "Fajr": "05:02",
          "Dhuhr": "12:07",
          "Asr": "15:28",
          "Sunset": "18:00",
          "Maghrib": "18:11",
          "Isha": "-",
          "Midnight": "23:31"
        },
        "date": {
          "timestamp": 1602547200,
          "gregorian": "2020-10-13",
          "hijri": "1442-02-26"
        }
      },
      {
        "times": {
          "Imsak": "04:52",
          "Sunrise": "06:13",
          "Fajr": "05:02",
          "Dhuhr": "12:07",
          "Asr": "15:27",
          "Sunset": "18:00",
          "Maghrib": "18:11",
          "Isha": "-",
          "Midnight": "23:31"
        },
        "date": {
          "timestamp": 1602633600,
          "gregorian": "2020-10-14",
          "hijri": "1442-02-27"
        }
      },
      {
        "times": {
          "Imsak": "04:52",
          "Sunrise": "06:14",
          "Fajr": "05:02",
          "Dhuhr": "12:06",
          "Asr": "15:27",
          "Sunset": "17:59",
          "Maghrib": "18:10",
          "Isha": "-",
          "Midnight": "23:31"
        },
        "date": {
          "timestamp": 1602720000,
          "gregorian": "2020-10-15",
          "hijri": "1442-02-28"
        }
      },
      {
        "times": {
          "Imsak": "04:53",
          "Sunrise": "06:14",
          "Fajr": "05:03",
          "Dhuhr": "12:06",
          "Asr": "15:26",
          "Sunset": "17:58",
          "Maghrib": "18:09",
          "Isha": "-",
          "Midnight": "23:30"
        },
        "date": {
          "timestamp": 1602806400,
          "gregorian": "2020-10-16"
        }
      },
      {
        "times": {
          "Imsak": "04:53",
          "Sunrise": "06:15",
          "Fajr": "05:03",
          "Dhuhr": "12:06",
          "Asr": "15:26",
          "Sunset": "17:57",
          "Maghrib": "18:08",
          "Isha": "-",
          "Midnight": "23:30"
        },
        "date": {
          "timestamp": 1602892800,
          "gregorian": "2020-10-17"
        }
      },
      {
        "times": {
          "Imsak": "04:53",
          "Sunrise": "06:15",
          "Fajr": "05:03",
          "Dhuhr": "12:06",
          "Asr": "15:25",
          "Sunset": "17:56",
          "Maghrib": "18:07",
          "Isha": "-",
          "Midnight": "23:30"
        },
        "date": {
          "timestamp": 1602979200,
          "gregorian": "2020-10-18",
          "hijri": "1442-03-01"
        }
      },
      {
        "times": {
          "Imsak": "04:54",
          "Sunrise": "06:15",
          "Fajr": "05:04",
          "Dhuhr": "12:06",
          "Asr": "15:25",
          "Sunset": "17:56",
          "Maghrib": "18:07",
          "Isha": "-",
          "Midnight": "23:30"
        },
        "date": {
          "timestamp": 1603065600,
          "gregorian": "2020-10-19",
          "hijri": "1442-03-02"
        }
      },
      {
        "times": {
          "Imsak": "04:54",
          "Sunrise": "06:16",
          "Fajr": "05:04",
          "Dhuhr": "12:05",
          "Asr": "15:24",
          "Sunset": "17:55",
          "Maghrib": "18:06",
          "Isha": "-",
          "Midnight": "23:29"
        },
        "date": {
          "timestamp": 1603152000,
          "gregorian": "2020-10-20",
          "hijri": "1442-03-03"
        }
      },
      {
        "times": {
          "Imsak": "04:54",
          "Sunrise": "06:16",
          "Fajr": "05:04",
          "Dhuhr": "12:05",
          "Asr": "15:24",
          "Sunset": "17:54",
          "Maghrib": "18:05",
          "Isha": "-",
          "Midnight": "23:29"
        },
        "date": {
          "timestamp": 1603238400,
          "gregorian": "2020-10-21",
          "hijri": "1442-03-04"
        }
      },
      {
        "times": {
          "Imsak": "04:55",
          "Sunrise": "06:17",
          "Fajr": "05:05",
          "Dhuhr": "12:05",
          "Asr": "15:24",
          "Sunset": "17:53",
          "Maghrib": "18:05",
          "Isha": "-",
          "Midnight": "23:29"
        },
        "date": {
          "timestamp": 1603324800,
          "gregorian": "2020-10-22",
          "hijri": "1442-03-05"
        }
      },
      {
        "times": {
          "Imsak": "04:55",
          "Sunrise": "06:17",
          "Fajr": "05:05",
          "Dhuhr": "12:05",
          "Asr": "15:23",
          "Sunset": "17:53",
          "Maghrib": "18:04",
          "Isha": "-",
          "Midnight": "23:29"
        },
        "date": {
          "timestamp": 1603411200,
          "gregorian": "2020-10-23",
          "hijri": "1442-03-06"
        }
      },
      {
        "times": {
          "Imsak": "04:55",
          "Sunrise": "06:17",
          "Fajr": "05:05",
          "Dhuhr": "12:05",
          "Asr": "15:23",
          "Sunset": "17:52",
          "Maghrib": "18:03",
          "Isha": "-",
          "Midnight": "23:29"
        },
        "date": {
          "timestamp": 1603497600,
          "gregorian": "2020-10-24",
          "hijri": "1442-03-07"
        }
      },
      {
        "times": {
          "Imsak": "04:56",
          "Sunrise": "06:18",
          "Fajr": "05:06",
          "Dhuhr": "12:05",
          "Asr": "15:22",
          "Sunset": "17:51",
          "Maghrib": "18:03",
          "Isha": "-",
          "Midnight": "23:29"
        },
        "date": {
          "timestamp": 1603584000,
          "gregorian": "2020-10-25",
          "hijri": "1442-03-08"
        }
      },
      {
        "times": {
          "Imsak": "04:56",
          "Sunrise": "06:18",
          "Fajr": "05:06",
          "Dhuhr": "12:05",
          "Asr": "15:22",
          "Sunset": "17:51",
          "Maghrib": "18:02",
          "Isha": "-",
          "Midnight": "23:28"
        },
        "date": {
          "timestamp": 1603670400,
          "gregorian": "2020-10-26",
          "hijri": "1442-03-09"
        }
      },
      {
        "times": {
          "Imsak": "04:57",
          "Sunrise": "06:19",
          "Fajr": "05:07",
          "Dhuhr": "12:05",
          "Asr": "15:21",
          "Sunset": "17:50",
          "Maghrib": "18:01",
          "Isha": "-",
          "Midnight": "23:28"
        },
        "date": {
          "timestamp": 1603756800,
          "gregorian": "2020-10-27",
          "hijri": "1442-03-10"
        }
      },
      {
        "times": {
          "Imsak": "04:57",
          "Sunrise": "06:19",
          "Fajr": "05:07",
          "Dhuhr": "12:04",
          "Asr": "15:21",
          "Sunset": "17:50",
          "Maghrib": "18:01",
          "Isha": "-",
          "Midnight": "23:28"
        },
        "date": {
          "timestamp": 1603843200,
          "gregorian": "2020-10-28",
          "hijri": "1442-03-11"
        }
      },
      {
        "times": {
          "Imsak": "04:57",
          "Sunrise": "06:20",
          "Fajr": "05:07",
          "Dhuhr": "12:04",
          "Asr": "15:21",
          "Sunset": "17:49",
          "Maghrib": "18:00",
          "Isha": "-",
          "Midnight": "23:28"
        },
        "date": {
          "timestamp": 1603929600,
          "gregorian": "2020-10-29",
          "hijri": "1442-03-12"
        }
      },
      {
        "times": {
          "Imsak": "04:58",
          "Sunrise": "06:20",
          "Fajr": "05:08",
          "Dhuhr": "12:04",
          "Asr": "15:20",
          "Sunset": "17:48",
          "Maghrib": "18:00",
          "Isha": "-",
          "Midnight": "23:28"
        },
        "date": {
          "timestamp": 1604016000,
          "gregorian": "2020-10-30",
          "hijri": "1442-03-13"
        }
      },
      {
        "times": {
          "Imsak": "04:58",
          "Sunrise": "06:21",
          "Fajr": "05:08",
          "Dhuhr": "12:04",
          "Asr": "15:20",
          "Sunset": "17:48",
          "Maghrib": "17:59",
          "Isha": "-",
          "Midnight": "23:28"
        },
        "date": {
          "timestamp": 1604102400,
          "gregorian": "2020-10-31",
          "hijri": "1442-03-14"
        }
      }
    ],
    "location": {
      "latitude": 21.416667938232425,
      "longitude": 39.816665649414062,
      "elevation": 333.0,
      "city": "Mecca",
      "country": "Saudi Arabia",
      "country_code": "SA",
      "timezone": "Asia/Riyadh",
      "local_offset": 3.0
    },
    "settings": {
      "timeformat": "HH:mm",
      "school": "Ithna Ashari",
      "juristic": "Shafii",
      "highlat": "None",
      "fajr_angle": 18.5,
      "isha_angle": 90.0
    }
  }
}