Repository navigation
GetMonthlyPrayerTimes
Fetches the complete prayer schedule for a given month and location, sourced from JAKIM via the Aladhan API. Includes all seven daily prayer times plus the auto-computed Dhuha time, with full Hijri date for each day.
| Parameter | Type | Required | Description |
|---|---|---|---|
location_name |
string | Optional* | Plain-text location, e.g. "Kajang, Selangor"
|
latitude |
number | Optional* | GPS latitude coordinate |
longitude |
number | Optional* | GPS longitude coordinate |
month |
integer | Optional | Month number (1–12). Defaults to current month. |
year |
integer | Optional | Gregorian year. Defaults to current year. |
*Provide either
location_nameor alatitude/longitudepair. Both methods are supported.
Returns an array of daily prayer time objects for every day in the requested month.
| Field | Type | Description |
|---|---|---|
date |
string | Gregorian date (YYYY-MM-DD) |
day_name |
string | Day of the week |
hijri_raw |
string | Hijri date in YYYY-MM-DD format |
hijri_full |
string | Human-readable Hijri date, e.g. 17 Muharram 1448
|
fajr |
string | Subuh time (UTC ISO 8601) |
syuruk |
string | Sunrise time (UTC ISO 8601) |
dhuha |
string | Dhuha time — Syuruk + 28 minutes (UTC ISO 8601) |
dhuhr |
string | Zohor time (UTC ISO 8601) |
asr |
string | Asar time (UTC ISO 8601) |
maghrib |
string | Maghrib time (UTC ISO 8601) |
isha |
string | Isyak time (UTC ISO 8601) |
{
"current_time_utc": "2026-07-03T14:55:53Z",
"prayers": [
{
"date": "2026-07-01",
"day_name": "Wednesday",
"hijri_raw": "1448-01-15",
"hijri_full": "15 Muharram 1448",
"fajr": "2026-06-30T21:54:00Z",
"syuruk": "2026-06-30T23:07:00Z",
"dhuha": "2026-06-30T23:35:00Z",
"dhuhr": "2026-07-01T05:20:00Z",
"asr": "2026-07-01T08:45:00Z",
"maghrib": "2026-07-01T11:29:00Z",
"isha": "2026-07-01T12:44:00Z"
}
]
}ℹ️ All times are in UTC. Add
+08:00for MYT. For example,05:20 UTC=13:20 MYT(Zohor).
- Dhuha is not returned by the API directly. It is automatically computed by this server as Syuruk + 28 minutes.
- Prayer times are location-specific. The same state may yield slightly different results depending on exact coordinates.
"What time is Subuh tomorrow in Putrajaya?" "Give me this week's full prayer schedule for Johor Bahru." "When is Maghrib on the 15th of this month?" "What are the prayer times for Ramadan this year in Kuala Lumpur?"
-
get_current_time— use first to get current UTC before comparing with prayer times -
get_yearly_islamic_events— to identify which month Ramadan or other events fall in
All errors are returned as a structured JSON object with a single error field. The AI agent should check for this field before processing the response.
{ "error": "<human-readable message>" }| Scenario | Error Message |
|---|---|
| No location provided | "Provide either a location_name string or latitude/longitude coordinates." |
| Location name cannot be resolved | "Location '<name>' could not be resolved. Try a different name or use coordinates." |
| OpenStreetMap geocoding unreachable | "Location lookup failed: could not reach or parse OpenStreetMap data. Try again later." |
| Malaysian prayer time API (WaktuSolat) unreachable | "The Malaysian prayer time API (WaktuSolat) is currently unreachable. Please try again later." |
| Global prayer time API (Aladhan) unreachable | "The global prayer time API (Aladhan) is currently unreachable. Please try again later." |
| General network failure | "Network error while fetching prayer times. Please try again later." |
ℹ️ Data source routing: Locations within Malaysia are resolved via the WaktuSolat API (JAKIM). Locations outside Malaysia fall back to Aladhan + OpenStreetMap geocoding.