Global Prayer Times

For developers

Free Prayer Times API

Quick Answer

Yes — Global Prayer Times publishes a free JSON file for each of 285 cities in 24 countries with Fajr, Sunrise, Dhuhr, Asr, Maghrib and Isha for about 60 days ahead, the calculation method and the IANA timezone. No key, no sign-up, CORS enabled; please link to the city page you use.

Updated · Editorial policy

Endpoints

Global Prayer Times API endpoints
URLReturns
/api/v1/cities.jsonEvery city with its slugs, timezone, method and data URL
/api/v1/times/{country}/{city}.jsonDaily times for one city, e.g. London, Karachi, New York

Slugs match the site’s URLs: /uk/london/ → /api/v1/times/uk/london.json. Times are 24-hour local time for the city; asrHanafi appears where the source timetable publishes it.

Example response

{
  "city": "London",
  "country": "United Kingdom",
  "timezone": "Europe/London",
  "method": "London Unified Prayer Timetable (LUPT)",
  "page": "https://globalprayertimes.org/uk/london/",
  "attribution": "Global Prayer Times (globalprayertimes.org)",
  "days": [
    { "date": "2026-09-25", "fajr": "05:20", "sunrise": "06:48", "dhuhr": "12:57",
      "asr": "16:07", "asrHanafi": "16:57", "maghrib": "18:55", "isha": "20:12" }
  ]
}

Get today’s times in JavaScript

const res = await fetch('https://globalprayertimes.org/api/v1/times/uk/london.json');
const data = await res.json();
// Today's date in the city's own timezone:
const today = new Intl.DateTimeFormat('en-CA', { timeZone: data.timezone }).format(new Date());
const times = data.days.find((d) => d.date === today);
console.log(times.fajr, times.maghrib);

Attribution and licence

Data is published under the Open Data Commons Attribution Licence (ODC-BY 1.0). Wherever you display the times, include a visible link to the city page:

<a href="https://globalprayertimes.org/uk/london/">London prayer times</a> by Global Prayer Times

Prefer a ready-made widget? Use the embed code.

API questions

Is the Global Prayer Times API free?
Yes. It is free for websites, apps and mosques with no key and no sign-up. Show a visible link to the city page you use (see Attribution).
How far ahead does the API go?
Each city file covers from two days before the latest site build to about 60 days after it. The site rebuilds regularly; use the generatedAt field to check freshness and the monthly timetable pages for other dates.
Which calculation method does the API use?
The same method as each city page: the London Unified Prayer Timetable for London and M25 cities, and the country’s recognised method elsewhere (for example ISNA in North America, Umm al-Qura in Saudi Arabia and University of Islamic Sciences, Karachi in Pakistan). The method field names it.
Are the times mosque iqamah times?
No. They are calculated prayer start times in the city’s local time. Mosques set their own congregation (iqamah) times.