API Reference
Hijri Conversion
Convert dates between the Gregorian and Hijri calendars in both directions, with tabular, Umm al-Qura and astronomical methods.
GET /api/v1/hijri/convertConvert either direction:
- Gregorian → Hijri: pass
date=YYYY-MM-DD - Hijri → Gregorian: pass
hy,hm,hd
Query parameters
| Param | Type | Default | Description |
|---|---|---|---|
date | string | — | Gregorian date (G→H) |
hy | int | — | Hijri year 1…3000 (H→G) |
hm | int | 1 | Hijri month 1…12 |
hd | int | 1 | Hijri day 1…30 |
method | string | tabular | tabular, umm_al_qura, astronomical |
locale | string | id | Label language (11 locales) |
Use method=umm_al_qura or astronomical to match Umm al-Qura / most global apps.
tabular is arithmetic and can differ by ±1 day.
GET
/hijri/convertLiveGET /hijri/convert?date=2026-06-20&method=umm_al_qura&locale=idGregorian → Hijri
curl "https://api.housemuslim.org/api/v1/hijri/convert?date=2026-06-20&method=umm_al_qura&locale=id"const res = await fetch('https://api.housemuslim.org/api/v1/hijri/convert?date=2026-06-20&method=umm_al_qura&locale=id');
const { data } = await res.json();
console.log(data.hijri_label); // 5 Muharram 1448 H{
"success": true,
"data": {
"gregorian": "2026-06-20",
"hijri": { "year": 1448, "month": 1, "day": 5 },
"hijri_label": "5 Muharram 1448 H",
"weekday": "Sabtu",
"method": "umm_al_qura"
}
}Hijri → Gregorian
curl "https://api.housemuslim.org/api/v1/hijri/convert?hy=1448&hm=9&hd=1&method=astronomical"const res = await fetch('https://api.housemuslim.org/api/v1/hijri/convert?hy=1448&hm=9&hd=1&method=astronomical');
const { data } = await res.json();
console.log(data.gregorian); // 2027-02-08{
"success": true,
"data": {
"hijri": { "year": 1448, "month": 9, "day": 1 },
"hijri_label": "1 Ramadan 1448 H",
"gregorian": "2027-02-08",
"weekday": "Monday",
"method": "astronomical"
}
}Supported locale values: en, id, ms, tr, fr, ar, ur, fa, bn, hi, ta.