Skip to content

Prayer Times API

Compute Islamic prayer times and Jewish Zmanim for any location.

Background

Islamic prayer times (Fajr, Dhuhr, Asr, Maghrib, Isha) are defined by solar position — the Sun's elevation angle at specific points in the day. They are independent of civil timezone and must be calculated from astronomical first principles.

TimeNow uses the NREL Solar Position Algorithm (same as major prayer apps) with IERS EOP corrections for maximum accuracy.


GET /solar/prayer

Parameters

Parameter Required Type Description
lat float Latitude
lng float Longitude
date No string ISO 8601 date (default: today)
convention No string Calculation convention (see table below)
madhab No string shafi or hanafi (affects Asr)

Calculation Conventions

convention value Organization Fajr angle Isha angle Used in
mwl Muslim World League −18° −17° Europe, Far East
isna Islamic Society of North America −15° −15° North America
egypt Egyptian General Authority −19.5° −17.5° Africa, Syria
makkah Umm al-Qura University −18.5° 90 min after Maghrib Arabian Peninsula
karachi University of Islamic Sciences, Karachi −18° −18° Pakistan, Afghanistan, Bangladesh

Default: mwl

Example

# London, Muslim World League convention
curl "http://localhost:8090/solar/prayer?lat=51.5074&lng=-0.1278&convention=mwl"

# Kashgar — note the extreme civil time offset
curl "http://localhost:8090/solar/prayer?lat=39.47&lng=75.99&convention=mwl"

Response

{
  "date": "2026-04-14",
  "latitude": 51.5074,
  "longitude": -0.1278,
  "timezone": "Europe/London",
  "convention": "mwl",
  "prayers": {
    "fajr":   {"civil": "04:32", "solar": "04:21", "utc": "03:32"},
    "sunrise":{"civil": "06:42", "solar": "06:31", "utc": "05:42"},
    "dhuhr":  {"civil": "13:11", "solar": "13:00", "utc": "12:11"},
    "asr":    {"civil": "16:48", "solar": "16:37", "utc": "15:48"},
    "maghrib":{"civil": "20:39", "solar": "20:28", "utc": "19:39"},
    "isha":   {"civil": "22:36", "solar": "22:25", "utc": "21:36"}
  },
  "civil_solar_offset_min": -10.6
}

Each prayer time is provided in three forms: - civil — local civil clock time - solar — true solar time - utc — UTC


Jewish Zmanim

The same endpoint supports Jewish halachic times when convention=zmanim is specified.

Zmanim are derived from sha'ah zmanit (proportional hour = (sunset − sunrise) / 12).

curl "http://localhost:8090/solar/prayer?lat=31.78&lng=35.22&convention=zmanim"

Zmanim Response

{
  "zmanim": {
    "alot_hashachar": "05:01",
    "misheyakir": "05:27",
    "sunrise": "06:15",
    "sof_zman_shma_gra": "09:25",
    "sof_zman_tfila_gra": "10:30",
    "chatzot": "12:40",
    "mincha_gedola": "13:10",
    "mincha_ketana": "16:25",
    "plag_hamincha": "17:45",
    "sunset": "19:05",
    "tzeit_hakochavim": "19:30",
    "shaah_zmanit_min": 50.0
  }
}