HouseMuslim
API Reference

Ramadan

Today's fasting status with live countdowns, and the full 30-day Ramadan schedule for any location.

Today

GET /api/v1/ramadan

Current Ramadan status at a location. Accepts the same location/method params as Prayer Times (lat, lng, tz, method, madhab, high_lat, elevation) plus hijri_method (default tabular).

GET/ramadanLive
GET /ramadan?lat=-6.20&lng=106.85&method=Kemenag&hijri_method=umm_al_qura
curl ".../ramadan?lat=-6.2&lng=106.8&method=Kemenag&hijri_method=umm_al_qura"

During Ramadan:

{
  "success": true,
  "data": {
    "is_ramadan": true,
    "hijri": { "year": 1447, "month": 9, "day": 5 },
    "day": 5,
    "remaining_days": 26,
    "imsak": "2026-02-22T04:29:00+07:00",
    "fajr": "2026-02-22T04:39:00+07:00",
    "maghrib": "2026-02-22T18:14:00+07:00",
    "seconds_to_iftar": 21960,
    "seconds_to_suhoor": 63540
  }
}

Outside Ramadan only is_ramadan and hijri are meaningful:

{ "is_ramadan": false, "hijri": { "year": 1448, "month": 1, "day": 4 } }
FieldMeaning
dayDay number within Ramadan
remaining_daysFasting days left (incl. today)
seconds_to_iftarSeconds until Maghrib (0 if passed)
seconds_to_suhoorSeconds until next Fajr

Upcoming Ramadans

GET /api/v1/ramadan/upcoming

When does Ramadan start each year? This lists the Gregorian start/end and Eid al-Fitr for consecutive years — no location needed.

ParamTypeDefaultDescription
fromintcurrent yearFirst Gregorian year
countint10Number of years (max 50)
methodstringumm_al_quraHijri method
GET/ramadan/upcomingLive
GET /ramadan/upcoming?from=2026&count=8&method=umm_al_qura
{
  "success": true,
  "data": [
    { "hijri_year": 1447, "gregorian_year": 2026, "start": "2026-02-18", "end": "2026-03-19", "eid_al_fitr": "2026-03-20", "total_days": 30 },
    { "hijri_year": 1448, "gregorian_year": 2027, "start": "2027-02-07", "end": "2027-03-08", "eid_al_fitr": "2027-03-09", "total_days": 30 },
    { "hijri_year": 1449, "gregorian_year": 2028, "start": "2028-01-27", "end": "2028-02-25", "eid_al_fitr": "2028-02-26", "total_days": 30 }
  ]
}

Because the Hijri year is ~11 days shorter, a single Gregorian year occasionally contains two Ramadans (e.g. 2030) — both are listed in order.

Full schedule

GET /api/v1/ramadan/schedule

The whole month (29–30 days). Params: hy (Hijri year, default current), plus the same location/method params, and hijri_method.

GET/ramadan/scheduleLive
GET /ramadan/schedule?hy=1447&lat=-6.20&lng=106.85&method=Kemenag&hijri_method=umm_al_qura
curl "https://api.housemuslim.org/api/v1/ramadan/schedule?hy=1447&lat=-6.2&lng=106.8&method=Kemenag"
const res = await fetch('https://api.housemuslim.org/api/v1/ramadan/schedule?hy=1447&lat=-6.2&lng=106.8&method=Kemenag');
const { data } = await res.json();
console.log(data.start, '→', data.end, `(${data.total_days} days)`);
{
  "success": true,
  "data": {
    "hijri_year": 1447,
    "start": "2026-02-18",
    "end": "2026-03-19",
    "total_days": 30,
    "days": [
      {
        "day": 1,
        "date": "2026-02-18",
        "hijri": { "year": 1447, "month": 9, "day": 1 },
        "weekday": "Rabu",
        "imsak": "2026-02-18T04:28:54+07:00",
        "fajr": "2026-02-18T04:38:54+07:00",
        "maghrib": "2026-02-18T18:15:12+07:00",
        "fast_minutes": 816
      }
    ]
  }
}

fajr marks the end of Suhoor; maghrib is Iftar. fast_minutes is the fasting duration (Maghrib − Fajr).

Legacy endpoint

GET /api/v1/fasting/ramadan

Single-day Ramadan info kept for backward compatibility. Accepts lat, lng, tz, date, method, madhab, high_lat, shafaq, hijri_method.

{
  "success": true,
  "data": {
    "date": "2026-02-22",
    "hijri": { "year": 1447, "month": 9, "day": 5 },
    "is_ramadan": true,
    "ramadan_day": 5,
    "imsak": "2026-02-22T04:29:00+07:00",
    "maghrib": "2026-02-22T18:14:00+07:00"
  }
}

On this page