HouseMuslim
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/times

Returns Imsak, Fajr, Sunrise, Dhuhr, Asr, Sunset, Maghrib, Isha and the three night-thirds for one day.

Query parameters

ParamTypeDefaultDescription
latfloat— (required)Latitude, −90…90
lngfloat— (required)Longitude, −180…180
datestringtodayYYYY-MM-DD
methodstringKemenagCalculation method (list)
madhabstringshafishafi or hanafi (Asr)
high_latstringnoneHigh-latitude rule
shafaqstringgeneralFor MoonsightingCommittee
precisionstringstandardstandard or high
elevationfloat0Meters, −500…9000
tzstringautoIANA 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/timesLive
GET /prayer/times?lat=-6.20&lng=106.85&method=Kemenag&madhab=shafi&precision=high&high_lat=none

Example

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/month

Same 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"

On this page