Free prayer times API, no API key needed
Free prayer times API with no key or signup. Get daily times as JSON by latitude and longitude, plus an iCal feed, city search and nearby mosques.
On this page
The prayer times API at qurangallery.com/prayer/developers is free and needs no API key or signup. Four public endpoints return daily prayer times as JSON for a latitude and longitude, a subscribable iCal feed, city search and nearby mosques.
Every endpoint lives under https://qurangallery.com/prayer. Bad input returns 400 and too many requests return 429.
Prayer times for a location
GET /api/times returns today’s Fajr, sunrise, Dhuhr, Asr, Maghrib and Isha for a pair of coordinates, plus tomorrow’s Fajr. Every time is an ISO 8601 instant in UTC. A time that does not exist at that latitude on that day is left out.
curl 'https://qurangallery.com/prayer/api/times?lat=21.4225&lng=39.8262'Parameters:
lat— required. Latitude in decimal degrees.lng— required. Longitude in decimal degrees.method— optional. Calculation method id, for example mwl, isna or karachi. Default: the method of the nearest city.asr— optional. standard or hanafi, which sets the Asr time. Default: the usual convention of the nearest city’s country.hlr— optional. High-latitude rule: auto, middle-of-the-night, seventh-of-the-night or twilight-angle. Default: auto.faandia— optional. Custom Fajr and Isha angle in degrees, from 10 to 25. Default: the method’s own angle.
The response, trimmed:
{
"date": "2026-10-31",
"times": [
{ "name": "fajr", "time": "2026-10-31T02:06:00.000Z", "isCurrent": false, "isNext": true },
{ "name": "sunrise", "time": "2026-10-31T03:23:00.000Z", "isCurrent": false, "isNext": false },
{ "name": "dhuhr", "time": "2026-10-31T09:04:00.000Z", "isCurrent": false, "isNext": false },
{ "name": "asr", "time": "2026-10-31T12:20:00.000Z", "isCurrent": false, "isNext": false },
{ "name": "maghrib", "time": "2026-10-31T14:45:00.000Z", "isCurrent": false, "isNext": false },
{ "name": "isha", "time": "2026-10-31T16:15:00.000Z", "isCurrent": false, "isNext": false }
],
"fajrTomorrow": "2026-11-01T02:06:00.000Z"
}The date is the coordinates’ own local day. Prayer times are not limited separately, so cache each location’s answer for the day instead of calling on every page view.
City search
GET /api/location/search turns a place name into coordinates, a country code and a time zone. It searches the app’s own city list first, and a query with no match returns an empty array.
curl 'https://qurangallery.com/prayer/api/location/search?q=Makkah'q— required. The place name, up to 200 characters.
[
{
"lat": 21.4266,
"lon": 39.8256,
"displayName": "Makkah, Saudi Arabia",
"countryCode": "SA",
"timezone": "Asia/Riyadh"
}
]Take lat and lon of the first result and pass them as lat and lng to the prayer times endpoint.
Calendar feed (iCal)
GET /api/calendar/feed.ics returns a subscribable text/calendar file with prayer times and Islamic events, one month by default and up to 12 months. Add its URL as a calendar subscription in Google Calendar, Apple Calendar or Outlook.
curl 'https://qurangallery.com/prayer/api/calendar/feed.ics?lat=21.4225&lng=39.8262'Required: lat and lng. Optional: method, asr, hlr, fa, ia as above, plus:
authority— Hijri calendar authority for the events, for example umm_al_qura or diyanet. Default: the authority of the nearest city’s country.months— months the feed covers, from 1 to 12. Default: 1.alarm— minutes before each prayer for the reminder, from 0 to 120. 0 means no alarm. Default: 10.sunrise,travel,ramadan,jumuah,busy— set to 1 to turn on sunrise, the travel note, Ramadan events, Jumu’ah on Fridays, or busy time. Default: off.
You can also build the same feed without code on the calendar sync page. The calendar feed allows 30 requests per minute.
Nearby mosques
GET /api/mosques/nearby lists mosques around a point, nearest first, from OpenStreetMap data. The distance is in metres. The answer is 503 when the map data services are unavailable.
curl 'https://qurangallery.com/prayer/api/mosques/nearby?lat=21.4225&lng=39.8262&radius=2000'latandlng— required.radius— optional. Search radius in metres, from 100 to 50000. Default: 2000.
[
{
"id": 1234567,
"name": "Example Mosque",
"lat": 21.4231,
"lng": 39.8269,
"address": "Example Street 12",
"distance": 96.4
}
]Coverage depends on OpenStreetMap. The in-app view of the same data is described on the mosques page.
Rate limits
Limits count requests per IP address in a one-minute window. Past the limit you get HTTP 429.
- Prayer times: no limit of its own.
- Calendar feed: 30 requests per minute.
- City search and nearby mosques share one allowance: 30 requests per minute.
Using it from a browser
The API sends no CORS headers, so a page on another site cannot read the response. Call it from your server instead. If you only want to show the times on a website, use the website widget: one iframe, no code and no key.
See also
- Website widget — prayer times or a Hijri calendar as an iframe.
- Calculation methods — what the default method is, and the other options.
- Calendar sync — the same feed, built from a form.
Next steps
Questions
Is the prayer times API free, and do I need an API key?
Yes, it is free and needs no key, no account and no sign-up. Send a GET request to the endpoint with the parameters, and stay inside the rate limits.
How do I get prayer times for a city name?
Call the city search endpoint with q, take the lat and lon of the first result, then pass them as lat and lng to the prayer times endpoint.
Which calculation method and Asr rule does the API use by default?
With no method, it uses the method of the city nearest your coordinates. With no asr, it uses the usual Asr convention of that city's country. Send both to fix them.
Why is a prayer missing from the response?
Near the poles the sun may never reach the Fajr or Isha angle, so there is no time to give. The API leaves that prayer out instead of returning an invalid date.
Can I call the API from JavaScript in the browser?
The API sends no CORS headers, so a page on another site cannot read the response. Call it from your server, or use the embeddable widget, which needs no code.
What are the rate limits?
Limits count requests per IP address in a one-minute window. The calendar feed allows 30 requests a minute, and city search and nearby mosques share one allowance of 30 a minute. Past a limit you get HTTP 429.
How often should I request prayer times?
Once per location per day is enough. Store the response and work out countdowns yourself; tomorrow's Fajr is included for the hours after Isha.
Is there an iCal feed?
Yes. The calendar feed returns a subscribable .ics file of prayer times and Islamic events, one month by default and up to 12 months with the months parameter.