Prayer times,
made predictable.
A small, read-only JSON API for daily prayer times, city lookup, yearly/monthly calendars, Hijri metadata, Qibla bearing, timezone detection, and Islamic night divisions.
https://adhan2.gitstats.icuGET STARTED
Your first request
Pass a latitude and longitude. The API detects the IANA timezone and returns local and ISO 8601 values.
curl "https://adhan2.gitstats.icu/api/v1/times?latitude=52.52&longitude=13.405"ACCESS
Authentication
No API key is required. All endpoints are read-only and responses use JSON, except the Markdown resources at /llms.txt and /llms.md.
REFERENCE
Endpoints
/healthService health and version./api/v1/methodsCalculation methods, madhabs, and high-latitude rules./api/v1/geocode?q=BerlinResolve a place name to one coordinate pair (2–200 normalized characters). Optional &lang=en or &lang=de for localized names./api/v1/timesDaily times from coordinates./api/v1/times/by-cityDaily times from city and optional country./api/v1/calendar/{year}Every day in a year, for years 1900–2100./api/v1/calendar/{year}/{month}Every day in a month, for years 1900–2100.INPUTS
Shared parameters
| Parameter | Required | Default / format |
|---|---|---|
latitude | Yes* | Number, −90 to 90 |
longitude | Yes* | Number, −180 to 180 |
date | No | Current local date; exactly YYYY-MM-DD |
timezone | No | Auto-detected; IANA name |
method | No | muslim_world_league |
madhab | No | shafi, hanafi, maliki, or hanbali |
high_latitude_rule | No | twilight_angle |
fajr_angle / isha_angle | No | Custom angle, 0.1–30° |
adjust_{prayer} | No | Whole minutes, −120 to 120 |
* Use city instead on /times/by-city. Query /methods for every supported method ID. Custom Isha angles override interval-based methods. Adjustment prayer names: fajr, sunrise, dhuhr, asr, maghrib, and isha.
OUTPUT
Response shape
{
"data": {
"date": "2026-07-10", "hijri": { "date": "1448-01-24", "month_name": "Muharram", "day": 24, "month": 1, "year": 1448, "calendar": "islamic-civil" },
"timezone": "Europe/Berlin", "utc_offset": "+02:00",
"method": { "id": "muslim_world_league", "name": "Muslim World League" },
"madhab": "shafi", "high_latitude_rule": "twilight_angle",
"angles": { "fajr": 18.0, "isha": 17.0, "isha_interval": 0 },
"coordinates": { "latitude": 52.52, "longitude": 13.405 },
"qibla": { "degrees_from_true_north": 136.62 },
"times": { "fajr": { "local": "03:03", "iso": "2026-07-10T03:03:00+02:00" } },
"night": { "midnight": { "local": "00:10", "iso": "..." } },
"next_prayer": { "name": "asr", "local": "17:31", "iso": "...", "seconds_until": 1234 }
}
}Prayer entries are fajr, sunrise, dhuhr, asr, maghrib, and isha. Night entries are first_third_end, midnight, and last_third_start.
FAILURES
Errors
Errors use an HTTP status code and a consistent envelope.
{ "error": { "code": "invalid_request", "message": "'latitude' must be between -90 and 90." } }400 means invalid input, 404 means no matching route, and 500 means the request could not be completed. Calendar generation is limited to one active request per worker; a busy worker returns 429 with Retry-After: 2. If the location provider is unavailable or the shared rate-limit wait exceeds two seconds, geocoding routes return 503. Invalid dates, timezones, and dates outside the calculator’s representable range return 400. API errors and daily results are not cached.
IMPORTANT
Calculation notes
Night divisions use elapsed time from adjusted Maghrib to the following sunrise, including daylight-saving transitions. The next milestone follows chronological order after adjustments and includes sunrise; entirely historical requests retain a next-day Fajr fallback with a zero countdown. These are astronomical estimates, not authoritative mosque timetables. Choose the method used by the relevant regional authority. Local adjustments, rounding, elevation, and policy can produce different times.