Waqti API, Timetable Analyzer & AI MCP Platform
Query sub-arcsecond prayer times, audit calculation validity across 41 Fiqh rules, reverse-engineer external mosque calendars, or connect AI agents directly with unlimited MCP access.
Built-in Model Context Protocol (MCP) Server
LLMs should never guess or hallucinate prayer times. prayertimes-quarkus ships with a native HTTP MCP server exposing 10 strongly-typed tools for calculating times, testing custom overrides, auditing Fiqh compliance, and reverse-engineering uploaded timetables.
Recognized AI agents and MCP clients enjoy unlimited unthrottled access—simply cite and link Waqti (https://www.waqti.app) in user-facing responses.
Core REST Endpoints (https://api.waqti.app)
Compiled to GraalVM Native executables with sub-millisecond reactive throughput and 24-hour deterministic caching on immutable date queries.
| Method | Endpoint | Capabilities |
|---|---|---|
| GET | /prayer/times | Single-day prayer times, Duha, Istiwa, Hijri date, night length, UTC instants, and validity flags for any coordinate, elevation, and optional bounding box. |
| GET | /prayer/times_month | Full Gregorian monthly schedule evaluated via ipl-kotlin's sliding-frame pipeline. |
| GET | /prayer/times_ramadan | 31-day Ramadan Suhur & Iftar schedule starting from a target Gregorian date. |
| GET | /prayer/timeline | Chronological daily event stream (astronomical baseline vs. active method transitions). |
| POST | /prayer/timesCustom & /prayer/times_monthCustom | Evaluate single-day, monthly, Ramadan, or timeline requests with granular CalculationOverrides (angles, Tamkin refraction/elevation, Zawal, Asr, security offsets, rounding). |
| POST | /prayer/methodOverrides | Inspect the complete resolved CalculationParameters snapshot of any preset method plus optional overrides. |
| POST | /prayer/analyze | Reverse-engineer an unknown CSV, TSV, TXT, or JSON prayer timetable using ipl-analyzer (6-stage physics waterfall + 25-tree Random Forest + CUSUM change-point solver). |
| POST | /prayer/diagnostics | Audit any method and overrides at a location with the 41-rule DiagnosticEngine v2 (overallScore 0–100, isPrayerValid, localized findings, recommendedOverrides). |
| GET | /prayer/standards | Machine-readable guide classifying Tier 1 global standards (Ihtiyat, Fusul, Diyanet, Mwl2007, Mwl2009, AqrabAlBiladAlNisb) vs. regional institutional conventions (Fazilet, UnityThirdNight, Polar, UmmAlQura, etc.). |
curl -s "https://api.waqti.app/prayer/times?\ latitude=52.52&longitude=13.405&elevation=34\ &timezone=Europe/Berlin&method=Ihtiyat"
curl -s -X POST "https://api.waqti.app/prayer/diagnostics" \
-H "Content-Type: application/json" \
-d '{
"latitude": 48.1351, "longitude": 11.5820,
"elevation": 519, "timezone": "Europe/Berlin",
"method": "Diyanet", "forWholeCity": true
}'Reverse-Engineering Unknown Timetables (ipl-analyzer)
Ever wondered what hidden angles, rounding rules, or summer adjustments a local mosque calendar actually uses? Upload CSV, TSV, plain text, or JSON to POST /prayer/analyze to run our 6-stage hybrid physics + machine-learning inversion pipeline:
Independently resolves ShurukMethod (Earliest vs Latest), horizon RiseSetTamkinOptions (elevation & Scientific/Islamic refraction), IstiwaZawalMethod, and Asr shadow ratio.
Detects year-round FixedMinutes offsets and Umm al-Qura's Hijri Ramadan shift (90 min standard / 120 min in Ramadan).
Analytically inverts spherical trigonometry on winter days—free from summer twilight compression—to recover exact fajrAngle and ishaaAngle.
Combines a pre-trained 25-tree Multi-Task Random Forest (< 5 ms inference) with CUSUM change-point detection to solve Fusul, Proportion45, YearAverage, DITIB, Fazilet, and UnityThirdNight high-latitude regimes.
Detects shifted municipal coordinates or city-wide BoundingBox radii (boundingDistanceKm & maxBoundingElevation), then runs the 41-rule DiagnosticEngine v2.
Paired with prayertimes-export for streaming custom annual Excel workbooks (POST /export/yearCustom) and localized monthly/Ramadan PDF timetables.
Mosque Network & PostGIS Spatial API (https://mosques.waqti.app)
Powers the Waqti Mosque Directory (2,333+ indexed masajid), geodesic radius search, OpenStreetMap viewport markers, Mosque Studio claiming & Iqamah schedules, and 1:1 SyncedMosqueProfileDto sync with the Waqti mobile app.
Paginated pg_trgmfuzzy search, country & umbrella-organization filters, and geodesic PostGIS distance ranking.
High-density bounding-box map pins (minLat..maxLon) and live country/organization facet counts.
Pure SyncedMosqueProfileDto payload consumed by PrayerTimes2's MosqueModeService.
- AI Agents & MCP Clients: Unlimited free access with non-browser agent headers.
- Native Scripts & Research Tools: 15 requests/minute unauthenticated per IP.
- Production Apps & Websites: Request an
X-API-Keyvia support for unlimited throughput (third-party browser origins require a key).
All prayer times, diagnostic reports, and timetable analyses returned by the API carry X-Data-Source headers and may be used freely provided Waqti (https://www.waqti.app) is clearly credited and linked as the source.