Skip to content

GetMonthlyPrayerTimes

Zubir Jamal edited this page Jul 4, 2026 · 2 revisions

🕌 Tool: get_monthly_prayer_times

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.


Parameters

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_name or a latitude/longitude pair. Both methods are supported.


Response

Returns an array of daily prayer time objects for every day in the requested month.

Fields Per Day

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)

Example Response (single day)

{
  "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:00 for MYT. For example, 05:20 UTC = 13:20 MYT (Zohor).


Notes

  • 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.

Example Queries

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


Related Tools


Error Handling

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 Schema

{ "error": "<human-readable message>" }

Error Reference

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.

Clone this wiki locally