Adhan API Documentation
llms.txt ↗
v1 · Online

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.

BASE URLhttps://adhan2.gitstats.icu
01

GET 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"
02

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.

03

REFERENCE

Endpoints

GET/healthService health and version.
GET/api/v1/methodsCalculation methods, madhabs, and high-latitude rules.
GET/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.
GET/api/v1/timesDaily times from coordinates.
GET/api/v1/times/by-cityDaily times from city and optional country.
GET/api/v1/calendar/{year}Every day in a year, for years 1900–2100.
GET/api/v1/calendar/{year}/{month}Every day in a month, for years 1900–2100.
04

INPUTS

Shared parameters

ParameterRequiredDefault / format
latitudeYes*Number, −90 to 90
longitudeYes*Number, −180 to 180
dateNoCurrent local date; exactly YYYY-MM-DD
timezoneNoAuto-detected; IANA name
methodNomuslim_world_league
madhabNoshafi, hanafi, maliki, or hanbali
high_latitude_ruleNotwilight_angle
fajr_angle / isha_angleNoCustom angle, 0.1–30°
adjust_{prayer}NoWhole 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.

05

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.

06

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.

07

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.

Building with an AI assistant?Give it /llms.txt for a compact Markdown version of this contract.