Endpoints
| Request | Returns |
|---|---|
GET /api/times/{country}/{city} | Today and the next 7 days, the next prayer, method details |
GET /api/month/{country}/{city}/{month}-{year} | Every day of a month (from two months back to twelve ahead) |
GET /{country}/{city}/prayer-times.ics | Calendar feed, next 30 days |
GET /openapi.json | OpenAPI 3.1 description |
Both JSON endpoints take optional method (karachi, isna, mwl, moonsighting, ummalqura, egyptian, dubai, qatar, kuwait, singapore) and school (hanafi or shafi); the default is the country's usual method (see methodology). City and country slugs are the ones in our page URLs, e.g. pakistan/karachi, united-kingdom/london; the full list is in llms-full.txt and the open data.
Example
curl 'https://salahtable.com/api/times/pakistan/karachi?method=karachi&school=hanafi'
Times come back formatted in the city's local time (week[].fajr …) and as UTC instants for today (iso), with next giving the upcoming prayer.
Terms
- Free for any use, including commercial. Responses are cached; keep requests reasonable (cache on your side for a few minutes).
- Credit: a visible link to the relevant SalahTable city page, e.g.
<a href="https://salahtable.com/pakistan/karachi">Karachi prayer times</a>. - Calculated times can differ from a mosque timetable by a few minutes; for congregation times, follow the mosque.
Need it on a web page without coding? Use the prayer times widget.