prayertimes APIprayertimes.date ↗
Retrieve Islamic prayer times by city or country, monthly schedules, and popular locations via the prayertimes.date API. All 8 daily prayer times included.
What is the prayertimes API?
This API provides 5 endpoints for querying Islamic prayer times from prayertimes.date, returning all eight standard daily prayer and transition times — Imsak, Fajr, Sunrise, Dhuhr, Asr, Sunset, Maghrib, and Isha. The get_prayer_times_by_city endpoint returns today's schedule with geographic coordinates and date, while get_monthly_prayer_times delivers a full per-day calendar for the current month. Coverage spans individual cities, country-level summaries, and curated popular locations.
curl -X GET 'https://api.parse.bot/scraper/8cf68912-b61a-4119-a74d-85a28afca247/get_prayer_times_by_city?city=London' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace prayertimes-date-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""PrayerTimes.date API — retrieve Islamic prayer times by city and country."""
from parse_apis.prayertimes_date_api import PrayerTimes, NotFound
client = PrayerTimes()
# Get today's prayer times for a specific city
city = client.cities.get(city="London")
print(f"{city.city} ({city.date}): Dhuhr={city.prayer_times.dhuhr}, Asr={city.prayer_times.asr}")
print(f" Location: lat={city.metadata.latitude}, lon={city.metadata.longitude}")
# Browse the monthly schedule for that city (sub-resource)
for day in city.schedule.list(limit=3):
print(f" {day.date}: Fajr={day.fajr}, Maghrib={day.maghrib}")
# Discover popular cities and drill into one
popular = client.citysummaries.list(limit=1).first()
if popular:
detail = popular.details()
print(f"Popular city: {detail.city}, Sunrise={detail.prayer_times.sunrise}")
# Get prayer times for all major cities in a country
country = client.countries.get(country="United Kingdom")
for entry in country.cities[:3]:
print(f" {entry.city}: Fajr={entry.fajr}, Isha={entry.isha}")
# Typed error handling for a non-existent city
try:
client.cities.get(city="NonExistentCity12345")
except NotFound as exc:
print(f"Expected error: {exc}")
print("exercised: cities.get / schedule.list / citysummaries.list / details / countries.get / NotFound")Retrieve today's Islamic prayer times for a specific city. Returns the eight standard prayer/transition times (Imsak, Fajr, Sunrise, Dhuhr, Asr, Sunset, Maghrib, Isha), geographic coordinates, and the current date. Some high-latitude cities may show '-' for prayers that do not occur on a given day.
| Param | Type | Description |
|---|---|---|
| cityrequired | string | City name used to look up prayer times (e.g. 'London', 'Mecca', 'Istanbul'). Converted to a URL slug internally. |
{
"type": "object",
"fields": {
"city": "string — the city name as provided",
"date": "string — today's date in long format",
"metadata": "object with latitude, longitude, altitude as numbers",
"prayer_times": "object with keys imsak, fajr, sunrise, dhuhr, asr, sunset, maghrib, isha mapped to HH:MM time strings or '-'",
"calculation_settings": "object with calculation method details (may be empty)"
},
"sample": {
"data": {
"city": "London",
"date": "Thursday, June 11, 2026",
"metadata": {
"altitude": 33,
"latitude": 51.50735092163086,
"longitude": -0.12775829434394836
},
"prayer_times": {
"asr": "17:22",
"fajr": "-",
"isha": "-",
"dhuhr": "13:00",
"imsak": "-",
"sunset": "21:18",
"maghrib": "21:18",
"sunrise": "04:42"
},
"calculation_settings": {}
},
"status": "success"
}
}About the prayertimes API
Daily and Monthly Prayer Times
The get_prayer_times_by_city endpoint accepts a city string (e.g. London, Mecca, Istanbul) and returns today's prayer_times object with eight keyed time strings: imsak, fajr, sunrise, dhuhr, asr, sunset, maghrib, and isha. Each value is either an HH:MM string or '-' for cities at high latitudes where a particular prayer does not occur on that day. The response also includes a metadata object with latitude, longitude, and altitude, plus a calculation_settings object that may describe the calculation method used.
Monthly Schedules
The get_monthly_prayer_times endpoint accepts the same city parameter and returns a schedule array covering every day of the current month. Each entry in the array carries a date field alongside all seven primary prayer time strings (fajr through isha). This is well-suited for calendar rendering or weekly/monthly planning views. The month field in the response provides the page heading text describing the city and month in question.
Country-Level and Discovery Endpoints
The get_prayer_times_by_country endpoint takes a country name and returns a cities array listing major cities within that country, each with their current-day prayer times. For discovery use cases, list_popular_countries and list_popular_cities require no parameters and each return an items array containing name, slug, and url fields — useful for populating search interfaces or building navigation around available locations.
The prayertimes API is a managed, monitored endpoint for prayertimes.date — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when prayertimes.date changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official prayertimes.date API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Display today's complete prayer schedule in a Muslim lifestyle app using
get_prayer_times_by_city - Render a monthly prayer calendar in a web dashboard using the
schedulearray fromget_monthly_prayer_times - Show prayer times for all major cities in a given country using
get_prayer_times_by_country - Build a location picker by listing well-known cities and countries via
list_popular_citiesandlist_popular_countries - Handle high-latitude edge cases by checking for
'-'values in theprayer_timesobject before rendering - Geocode and display city pin locations on a map using
latitudeandlongitudefrom themetadataresponse field - Send daily prayer time push notifications by polling
get_prayer_times_by_cityeach morning
| 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 | 100 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.date have an official developer API?+
What does the `get_prayer_times_by_city` endpoint return for high-latitude cities where some prayers don't occur?+
'-' rather than an HH:MM string. Your code should check for this before displaying or scheduling against that time.Does the API support historical or future prayer times beyond the current month?+
get_prayer_times_by_city returns today's times, and get_monthly_prayer_times covers only the current calendar month. You can fork this API on Parse and revise it to add endpoints targeting specific future or past dates.Can I filter prayer times by a specific calculation method or juristic school?+
calculation_settings field is returned in the city response but the API does not accept a calculation method as an input parameter. You can fork this API on Parse and revise it to add that filtering capability if prayertimes.date exposes method-specific URLs.How fresh is the data returned for today's prayer times?+
get_prayer_times_by_city and get_prayer_times_by_country endpoints return times for the current day based on when the request is made. Prayer times are astronomically calculated and stable per date, so the main freshness concern is ensuring requests are made on the correct calendar day in the target city's timezone.