{"openapi":"3.1.0","info":{"title":"AzanTimes prayer times API","version":"2.0.0","summary":"Prayer timetables for Kerala as static JSON.","description":"Every response is a static file. Files do not change from day to day, only when timetable data is corrected or added, so they can be cached. Times are local to Kerala (Asia/Kolkata, UTC+05:30). Version 1 (/v1/timesheets) remains available unchanged.","license":{"name":"CC0 1.0","url":"https://creativecommons.org/publicdomain/zero/1.0/"},"contact":{"name":"AzanTimes","url":"https://azantimes.in","email":"calculation@azantimes.in"}},"servers":[{"url":"https://api.azantimes.in"}],"paths":{"/v2/index.json":{"get":{"operationId":"getIndex","summary":"What the API offers","responses":{"200":{"description":"Years, prayers, links and the current data version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Index"}}}}}}},"/v2/locations.json":{"get":{"operationId":"listLocations","summary":"Every timetable","responses":{"200":{"description":"All timetables with their metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationList"}}}}}}},"/v2/locations/{id}.json":{"get":{"operationId":"getLocation","summary":"One timetable's metadata","parameters":[{"name":"id","in":"path","required":true,"description":"Timetable id from /v2/locations.json, for example kuttiady-assembly-constituency.","schema":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"}}],"responses":{"200":{"description":"Metadata for one timetable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationDetail"}}}},"404":{"description":"No such timetable or year."}}}},"/v2/locations/{id}/timetables/{year}.json":{"get":{"operationId":"getTimetableForYear","summary":"A location's timetable for one calendar year","parameters":[{"name":"id","in":"path","required":true,"description":"Timetable id from /v2/locations.json, for example kuttiady-assembly-constituency.","schema":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"}},{"name":"year","in":"path","required":true,"description":"Calendar year from 2020 to 2031.","schema":{"type":"integer","minimum":2020,"maximum":2031}}],"responses":{"200":{"description":"One row per day of the year.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YearTimetable"}}}},"404":{"description":"No such timetable or year."}}}},"/v2/locations/{id}/timetables/perpetual.json":{"get":{"operationId":"getPerpetualTimetable","summary":"A location's 366-day table, valid for any year","parameters":[{"name":"id","in":"path","required":true,"description":"Timetable id from /v2/locations.json, for example kuttiady-assembly-constituency.","schema":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"}}],"responses":{"200":{"description":"One row per calendar date, including 29 February.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpetualTimetable"}}}},"404":{"description":"No such timetable or year."}}}}},"components":{"schemas":{"Time":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$","description":"24-hour local time in Asia/Kolkata (UTC+05:30).","examples":["05:03"]},"PrayerTimes":{"type":"object","required":["fajr","sunrise","dhuhr","asr","maghrib","isha"],"properties":{"fajr":{"$ref":"#/components/schemas/Time","description":"Fajr / Subh"},"sunrise":{"$ref":"#/components/schemas/Time","description":"Sunrise / Shuruq"},"dhuhr":{"$ref":"#/components/schemas/Time","description":"Dhuhr / Zuhr / Luhr"},"asr":{"$ref":"#/components/schemas/Time","description":"Asr / Asar"},"maghrib":{"$ref":"#/components/schemas/Time","description":"Maghrib"},"isha":{"$ref":"#/components/schemas/Time","description":"Isha"}},"additionalProperties":false},"Day":{"allOf":[{"$ref":"#/components/schemas/PrayerTimes"}],"type":"object","required":["date","fajr","sunrise","dhuhr","asr","maghrib","isha"],"properties":{"date":{"type":"string","format":"date","examples":["2026-11-23"]},"fajr":{"$ref":"#/components/schemas/Time","description":"Fajr / Subh"},"sunrise":{"$ref":"#/components/schemas/Time","description":"Sunrise / Shuruq"},"dhuhr":{"$ref":"#/components/schemas/Time","description":"Dhuhr / Zuhr / Luhr"},"asr":{"$ref":"#/components/schemas/Time","description":"Asr / Asar"},"maghrib":{"$ref":"#/components/schemas/Time","description":"Maghrib"},"isha":{"$ref":"#/components/schemas/Time","description":"Isha"}},"additionalProperties":false},"PerpetualDay":{"type":"object","required":["month","day","fajr","sunrise","dhuhr","asr","maghrib","isha"],"properties":{"month":{"type":"integer","minimum":1,"maximum":12},"day":{"type":"integer","minimum":1,"maximum":31},"fajr":{"$ref":"#/components/schemas/Time","description":"Fajr / Subh"},"sunrise":{"$ref":"#/components/schemas/Time","description":"Sunrise / Shuruq"},"dhuhr":{"$ref":"#/components/schemas/Time","description":"Dhuhr / Zuhr / Luhr"},"asr":{"$ref":"#/components/schemas/Time","description":"Asr / Asar"},"maghrib":{"$ref":"#/components/schemas/Time","description":"Maghrib"},"isha":{"$ref":"#/components/schemas/Time","description":"Isha"}},"additionalProperties":false},"Source":{"type":"object","required":["name","description","url","year"],"properties":{"name":{"type":"string","description":"The calendar or author the timetable follows. Show it with the times."},"description":{"type":["string","null"]},"url":{"type":["string","null"],"format":"uri"},"year":{"type":["integer","null"],"description":"Year of the printed calendar, where known."}}},"Coordinates":{"type":"object","required":["latitude","longitude","basis"],"properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"basis":{"enum":["calculation-point","town"],"description":"calculation-point: the point the timetable was calculated for, recovered from its times. town: the map position of the place it is named after."}}},"Location":{"type":"object","required":["id","name","type","district","school","source","coordinates","legacyId","links"],"properties":{"id":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"name":{"type":"string"},"type":{"enum":["assembly-constituency","calendar"],"description":"assembly-constituency: one chart per Kerala constituency, all calculated by one rule. calendar: a printed or mosque calendar, named after its source."},"district":{"type":["string","null"]},"school":{"enum":["shafii","hanafi"],"description":"Hanafi timetables give a later Asr."},"source":{"$ref":"#/components/schemas/Source"},"coordinates":{"oneOf":[{"$ref":"#/components/schemas/Coordinates"},{"type":"null"}]},"legacyId":{"type":"string","description":"The identifier of the same timetable in /v1/timesheets."},"links":{"$ref":"#/components/schemas/Links"}}},"LocationDetail":{"allOf":[{"$ref":"#/components/schemas/Location"},{"type":"object","required":["years"],"properties":{"years":{"$ref":"#/components/schemas/YearRange"}}}]},"Links":{"type":"object","additionalProperties":{"type":["string","null"]},"description":"Site-relative links to related resources. Values containing {year} or {id} are URI templates."},"LocationList":{"type":"object","required":["count","dataVersion","links","locations"],"properties":{"count":{"type":"integer"},"dataVersion":{"type":"string"},"links":{"$ref":"#/components/schemas/Links"},"locations":{"type":"array","items":{"$ref":"#/components/schemas/Location"}}}},"YearRange":{"type":"object","required":["first","last"],"properties":{"first":{"type":"integer"},"last":{"type":"integer"}}},"TimetableHeader":{"type":"object","required":["location","timeZone","utcOffset","attribution"],"properties":{"location":{"type":"object","required":["id","name","type","district","school","source"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"district":{"type":["string","null"]},"school":{"type":"string"},"source":{"type":"string"}}},"timeZone":{"const":"Asia/Kolkata"},"utcOffset":{"const":"+05:30"},"attribution":{"type":"string","description":"A suggested credit to show with the times. Credit is optional (CC0 1.0)."}}},"YearTimetable":{"allOf":[{"$ref":"#/components/schemas/TimetableHeader"},{"type":"object","required":["year","links","days"],"properties":{"year":{"type":"integer"},"links":{"$ref":"#/components/schemas/Links"},"days":{"type":"array","minItems":365,"maxItems":366,"items":{"$ref":"#/components/schemas/Day"}}}}]},"PerpetualTimetable":{"allOf":[{"$ref":"#/components/schemas/TimetableHeader"},{"type":"object","required":["links","days"],"properties":{"links":{"$ref":"#/components/schemas/Links"},"days":{"type":"array","minItems":366,"maxItems":366,"items":{"$ref":"#/components/schemas/PerpetualDay"}}}}]},"Index":{"type":"object","required":["name","version","dataVersion","timeZone","utcOffset","years","locationCount","prayers","links","licence"],"properties":{"name":{"type":"string"},"version":{"const":"2"},"dataVersion":{"type":"string","description":"Changes whenever any timetable changes. Compare it to know when to refresh cached files."},"timeZone":{"const":"Asia/Kolkata"},"utcOffset":{"const":"+05:30"},"years":{"$ref":"#/components/schemas/YearRange"},"locationCount":{"type":"integer"},"prayers":{"type":"array","items":{"type":"object","required":["key","name","alsoKnownAs","v1","kind"],"properties":{"key":{"type":"string"},"name":{"type":"string"},"alsoKnownAs":{"type":"array","items":{"type":"string"}},"v1":{"type":"string","description":"The same field in version 1."},"kind":{"enum":["prayer","sun"]}}}},"links":{"$ref":"#/components/schemas/Links"},"licence":{"type":"object","required":["name","url","attribution"],"properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"},"attribution":{"type":"string"}}}}}}}}
