API Reference
Prayer Times
Compute daily or monthly prayer times for any coordinates, with automatic timezone resolution, 18+ methods, high-latitude rules and elevation.
Get prayer times
GET /api/v1/prayer/timesReturns Imsak, Fajr, Sunrise, Dhuhr, Asr, Sunset, Maghrib, Isha and the three night-thirds for one day.
Query parameters
| Param | Type | Default | Description |
|---|---|---|---|
lat | float | — (required) | Latitude, −90…90 |
lng | float | — (required) | Longitude, −180…180 |
date | string | today | YYYY-MM-DD |
method | string | Kemenag | Calculation method (list) |
madhab | string | shafi | shafi or hanafi (Asr) |
high_lat | string | none | High-latitude rule |
shafaq | string | general | For MoonsightingCommittee |
precision | string | standard | standard or high |
elevation | float | 0 | Meters, −500…9000 |
tz | string | auto | IANA name (Asia/Jakarta) or offset minutes (420) |
Automatic timezone
If tz is omitted the engine resolves the IANA timezone from lat/lng using
embedded boundary polygons (DST-aware). The response reports which source was used
via timezone_source: explicit, offset, lookup, or longitude.
GET
/prayer/timesLiveGET /prayer/times?lat=-6.20&lng=106.85&method=Kemenag&madhab=shafi&precision=high&high_lat=noneExample
curl "https://api.housemuslim.org/api/v1/prayer/times?lat=-6.20&lng=106.85&method=Kemenag&precision=high"const params = new URLSearchParams({
lat: '-6.20', lng: '106.85', method: 'Kemenag', precision: 'high',
});
const res = await fetch(`https://api.housemuslim.org/api/v1/prayer/times?${params}`);
const { data } = await res.json();
console.log(data.times.fajr);{
"success": true,
"data": {
"date": "2026-06-20",
"method": "Kemenag",
"madhab": "shafi",
"precision": "high",
"timezone_offset_min": 420,
"timezone": "Asia/Jakarta",
"timezone_source": "lookup",
"elevation": 0,
"times": {
"imsak": "2026-06-20T04:23:00+07:00",
"fajr": "2026-06-20T04:37:00+07:00",
"sunrise": "2026-06-20T06:01:00+07:00",
"dhuhr": "2026-06-20T11:54:00+07:00",
"asr": "2026-06-20T15:16:00+07:00",
"sunset": "2026-06-20T17:47:00+07:00",
"maghrib": "2026-06-20T17:47:00+07:00",
"isha": "2026-06-20T19:02:00+07:00",
"first_third": "2026-06-20T21:24:00+07:00",
"midnight": "2026-06-20T23:12:00+07:00",
"last_third": "2026-06-21T01:00:00+07:00"
}
}
}More examples
# High latitude (London, June) with an angle-based twilight rule
curl ".../prayer/times?lat=51.5&lng=-0.13&high_lat=twilight_angle&method=MWL"
# Moonsighting Committee with the white-twilight shafaq
curl ".../prayer/times?lat=40.7&lng=-74.0&method=MoonsightingCommittee&shafaq=abyad"
# Explicit IANA timezone + elevation
curl ".../prayer/times?lat=-6.9&lng=107.6&tz=Asia/Jakarta&elevation=768"Get a full month
GET /api/v1/prayer/times/monthSame parameters as above, plus month=YYYY-MM (defaults to the month of date).
Returns an array of daily times objects.
curl ".../prayer/times/month?lat=-6.20&lng=106.85&month=2026-03"