TheShia

API

Free, open JSON APIs powered by the same engines as this site and TheShia Group's apps. No keys, no accounts — just fair use.

Base URL

https://theshia.org/api/v1

Prayer times GET /v1/prayer-times Jafari (Shia) calculations for any location on earth — preset methods, several at once, or fully custom angles; a day, a month, or a whole year per request. High-latitude dates are handled with the TwilightAngle rule, and Islamic midnight is the midpoint of sunset to true dawn. Calculation methods GET /v1/methods The sixteen supported methods, including University of Tehran, Jafari (Leva Institute, Qum), Sheikh Kalbasi, and the Islamic Centre of England. Qibla direction GET /v1/qibla Qibla bearing in degrees from true north for any coordinates. City search GET /v1/cities Search 325 curated cities by name in English, Arabic, Farsi, or Urdu — returns coordinates and timezone for use with the prayer-times service. Hijri date conversion GET /v1/hijri Convert dates both ways between the Hijri and Gregorian calendars — a single day, a whole month, or a year per request, under the global moonsighting reckoning or Iran's official calendar. Announced sighted months come from curated tables; beyond them the crescent's actual visibility is computed astronomically, and every answer names its source. Islamic events GET /v1/events The curated calendar of the Ahlul Bayt (a) — 73 events with Shia dates and four-language titles, resolvable to any year or queried as what's-coming-up. Eclipses GET /v1/eclipses Solar and lunar eclipses 2020–2040 — types, times of maximum, magnitudes, lunar durations and greatest-eclipse points, from the same verified engine as the eclipse maps. Day status GET /v1/day-status Today (or any date) as machine-readable flags — Hijri date, the day's events, and mourning/festive season, fasting and night-of-worship indicators — so masjid sites and apps can theme themselves automatically. Calendar feeds (ICS) GET /v1/calendar-feeds Subscribe once in Google or Apple Calendar: every Islamic date, or a city's daily prayer times — always current, no app needed. Moon visibility GET /v1/moon-visibility The crescent-visibility data behind the moonsighting maps — a world zone grid for any evening of a Hijri month's sighting window, or per-location visibility with first-sighting dates under each criterion (Yallop/Shaukat, calibrated against moonsighting.com).

Rate limits & fair use

Responses are cached hard at the edge — please cache on your side too. Uncached requests are limited to 100 per minute per IP; oversized requests (over 496 day×method computations) are rejected. Free for community use, no uptime guarantee.