prayertimes.com APIprayertimes.com ↗
Get daily Islamic prayer times (Fajr, Dhuhr, Asr, Maghrib, Isha) for thousands of cities worldwide, plus Iftar/Imsak timings and Hijri calendar dates.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/2729bffb-c871-4f4d-a639-abb313cca953/list_countries' \ -H 'X-API-Key: $PARSE_API_KEY'
Retrieve the list of all countries and regions supported by prayertimes.com. Returns an array of country objects with name, slug, and URL.
No input parameters required.
{
"type": "object",
"fields": {
"countries": "array of objects, each with name (string), slug (string), and url (string)"
},
"sample": {
"data": {
"countries": [
{
"url": "https://www.prayertimes.com/uk/prayer-times.html",
"name": "UK",
"slug": "uk"
},
{
"url": "https://www.prayertimes.com/usa/prayer-times.html",
"name": "USA",
"slug": "usa"
}
]
},
"status": "success"
}
}About the prayertimes.com API
The PrayerTimes.com API covers 4 endpoints that return today's Islamic prayer times — Fajr, Sunrise, Dhuhr, Asr, Maghrib, and Isha — for thousands of cities across all supported countries. The get_city_prayer_times endpoint delivers HH:MM-formatted times alongside Iftar and Imsak windows and three calendar representations (Gregorian, Hijri, and Rumi) in a single response. Two discovery endpoints let you enumerate countries and cities before making a prayer-times request.
What the API Returns
The core endpoint, get_city_prayer_times, accepts a city slug and a country slug and returns a prayer_times object with six named keys — Fajr, Sunrise, Dhuhr, Asr, Maghrib, Isha — each as an HH:MM string. The same response includes a date_info object carrying gregorian, hijri, and rumi date strings for the current day, and an iftar_imsak object with imsak and iftar time strings derived from Fajr and Maghrib respectively.
Discovery Endpoints
Before querying prayer times you need valid slugs. list_countries returns the full array of supported country objects, each with name, slug, and url fields. Pass a country slug into get_country_cities to receive every city available for that country, along with that day's date_info. Alternatively, get_cities_alphabetical lets you browse the global city list filtered by a single uppercase letter (A–Z); each city object includes both city_slug and country_slug, so you can feed them directly into get_city_prayer_times without a separate country lookup. Omitting the letter parameter returns the full global city list.
Calendar and Timing Details
Every response that includes date_info exposes all three calendar systems simultaneously — Gregorian, Hijri (Islamic lunar), and Rumi (Ottoman fiscal calendar). This makes it straightforward to display Islamic dates alongside standard dates without a separate calendar conversion step. Times are local to the requested city; the API does not return UTC offsets or timezone identifiers alongside the times.
- Display daily prayer schedule widgets in a Muslim-focused mobile app using
get_city_prayer_timeswith the user's detected city slug. - Build a Ramadan companion app that surfaces Imsak and Iftar times from the
iftar_imsakresponse object. - Populate a city-selector dropdown by fetching available cities with
get_country_citiesfor a user-chosen country. - Show the current Hijri date alongside prayer times by reading the
hijrifield fromdate_infoin any response. - Index the full global city coverage by iterating
get_cities_alphabeticalacross all 26 letters to collect everycity_slug/country_slugpair. - Send automated prayer-time reminders by polling
get_city_prayer_timesonce per day per subscribed city and comparing current time to each prayer field. - Support multi-country Islamic scheduling tools by using
list_countriesto enumerate all regions and then resolving cities per country.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does prayertimes.com offer an official developer API?+
What does `get_city_prayer_times` return beyond the six prayer times?+
prayer_times object (Fajr, Sunrise, Dhuhr, Asr, Maghrib, Isha), the response includes an iftar_imsak object with imsak and iftar times, a date_info object with Gregorian, Hijri, and Rumi date strings, and a location object confirming the country and city slugs used.Can I retrieve prayer times for a future or past date?+
date parameter for historical or future lookups. You can fork this API on Parse and revise it to add a date parameter if you need multi-day scheduling data.Do prayer time responses include timezone or UTC offset information?+
How do I find the correct slug for a city like Istanbul or London?+
get_country_cities with the appropriate country slug (e.g. turkey or uk) to retrieve the full city list for that country, each with a slug field. Alternatively, call get_cities_alphabetical with letter=I or letter=L to find cities globally by their first character; each result includes both city_slug and country_slug.