Accurate prayer times.
Even on the mountain.
The only prayer-times API that respects elevation. Five prayers, every major calculation school, and the Hanafi/Shafi Asr methods — computed from the same JPL DE421 ephemerides used by major observatories.
Every major school
MWL (18°/17°), ISNA (15°/15°), Egyptian (19.5°/17.5°), Umm al-Qura (Maghrib + 90 min), Karachi (18°/18°).
Both Asr methods
Shafi (N=1, majority) and Hanafi (N=2). Selectable per request — no hard-coded default.
Mountain-aware
Tehran, Sarajevo, Bandung, Quito — every mountain Muslim community gets correct times.
One call per location per day
curl -H "Authorization: Bearer $THIRDTRAIL_KEY" \
"https://thirdtrail.life/v1/ephemerides/prayer-times/?lat=35.6892&lon=51.3890&elevation=1190&date=2026-06-21&school=mwl&asr_method=hanafi&tz=Asia/Tehran"
Tehran (1 190 m), MWL school, Hanafi Asr method, summer solstice.
Response:
{
"request": { "lat": 35.6892, "lon": 51.3890, "elevation_m": 1190,
"date": "2026-06-21",
"school": "mwl", "asr_method": "hanafi" },
"resolved": { "school": "mwl", "asr_method": "hanafi",
"elevation_m": 1190, "elevation_source": "user",
"timezone": "Asia/Tehran", "plan": "pro" },
"date": "2026-06-21",
"prayer_times": {
"fajr": "2026-06-21T03:54:30+04:30",
"sunrise": "2026-06-21T05:33:18+04:30",
"dhuhr": "2026-06-21T13:01:08+04:30",
"asr": "2026-06-21T17:48:12+04:30",
"maghrib": "2026-06-21T20:30:24+04:30",
"isha": "2026-06-21T22:09:01+04:30"
}
}
Why we don't pick a default school
Picking one school as the default would be wrong for many users
and quietly insulting to others. Schools disagree on Fajr / Isha
angles and Asr methodology for principled reasons. Our endpoint
requires school as an explicit parameter, with the
list of supported schools and their twilight-angle values
documented openly. The caller chooses; we compute.
asr_method defaults to shafi (N=1)
because that is the position of the global majority of Sunni
jurisprudence (Shafi, Maliki, Hanbali, Jafari). Hanafi callers
pass asr_method=hanafi explicitly.
Methodology
- Sun position: NREL SPA-equivalent computation backed by JPL DE421. Sub-arcsecond position accuracy; prayer-time instants are accurate to about a minute. 1900–2050.
- Fajr / Isha: time when the sun centre crosses
−angle°below the elevation-corrected horizon (or Maghrib + 90 min for Umm al-Qura). - Sunrise / Maghrib: standard rise/set, with horizon dip applied for the observer's elevation (the same horizon used by our main Ephemerides endpoint).
- Dhuhr: solar transit (true noon).
- Asr: shadow-length formula.
asr_alt = arccot(N + cot(noon_alt))where N=1 (Shafi) or N=2 (Hanafi). Sun crosses that altitude going down.
Methodology under continuous review with qualified scholars before commercial launch of paid tiers; please reach out via support (at) thirdtrail.life with corrections. These are computed convenience values provided for information only — confirm against your local religious authority before relying on them. See safe use and methodology.