Adhan API

A small, self-contained prayer-time API. Times are computed astronomically (no external service at request time) and tuned to reproduce Diyanet İşleri Başkanlığı published times to within 1 minute. Works for any latitude/longitude, any date.

Endpoints

EndpointPurpose
GET /timesPrayer times for one day at a location
GET /rangeA date range (up to ~10 years per call)
GET /methodsList methods and their parameters
GET /healthLiveness check

Parameters

ParamNotes
lat, lngRequired. Decimal degrees.
date/times only. YYYY-MM-DD, default today.
start, end/range only. YYYY-MM-DD.
methoddiyanet (default) or astronomical.
tzUTC offset in hours. Auto-detected if omitted.
elevationMeters. Astronomical method only.
langtr (default) or en.

Examples

# Istanbul, one day
curl "https://ezan.salihaydogdu.com.tr/times?lat=41.0053&lng=28.9770&date=2026-06-20"

{
  "latitude": 41.0053, "longitude": 28.977,
  "method": "diyanet", "date": "2026-06-20", "utc_offset": 3,
  "times": {
    "imsak": "03:24", "gunes": "05:25", "ogle": "13:11",
    "ikindi": "17:10", "aksam": "20:46", "yatsi": "22:38"
  }
}
# London, English labels, timezone auto-detected
curl "https://ezan.salihaydogdu.com.tr/times?lat=51.5074&lng=-0.1278&lang=en"

# Astronomical method (no temkin margin)
curl "https://ezan.salihaydogdu.com.tr/times?lat=41.0053&lng=28.9770&method=astronomical"

# A whole year as JSON (one entry per day under "days")
curl "https://ezan.salihaydogdu.com.tr/range?lat=41.0053&lng=28.9770&start=2026-01-01&end=2026-12-31"

# List available methods and their parameters
curl "https://ezan.salihaydogdu.com.tr/methods"

Methods

diyanet matches the official site (angles plus a per-prayer temkin safety margin). astronomical gives the true solar events with no margin. See /methods for the exact parameters.