Muslim.Blue for developers
Prayer times for your app or website
A free, read-only API for masjid iqamah times, calculated adhan times anywhere, and the Hijri date. Try it without a key, or get a free key in a minute.
Get a free key
Sign in with your Muslim Colors account, name your key, and copy it. It takes a minute and costs nothing. A key has its own limits, 60 requests a minute and 10,000 a day, and unlocks the calculator for any place.
No Muslim Colors account yet? You can make one when you sign in.
Try it now
No key is needed to read a masjid's times. Ask for its day today:
curl "https://muslim.blue/wp-json/blue/v1/public/masjids/example-masjid/today"With your key, work out the adhan times anywhere:
curl -H "X-Api-Key: YOUR_KEY" "https://muslim.blue/wp-json/blue/v1/public/times?lat=34.0007&lng=-81.0348&tz=America/New_York&method=isna"What you can ask for
Masjids
- GET
/masjidsFind masjids by name, place or distance - GET
/masjids/{slug}One masjid
Masjid times
- GET
/masjids/{slug}/todayA masjid's times today - GET
/masjids/{slug}/day/{date}A masjid's times on one date - GET
/masjids/{slug}/daysA masjid's times for a range of dates - GET
/masjids/{slug}/month/{month}A masjid's times for a month - GET
/masjids/{slug}/yearA masjid's next 400 days - GET
/masjids/{slug}/prayer.icsA masjid's prayer times as a calendar
Calculated times
- GET
/timesCalculated adhan times for any point key needed - GET
/times/methodThe method people near a point use - GET
/methodsCalculation methods and calendars
Hijri date
- GET
/hijriThe Hijri date by method
About the API
- GET
/openapi.jsonThis API as OpenAPI 3.1
Ramadan
- GET
/masjids/{slug}/ramadan.jsonA masjid's Ramadan
Masjid news and programs
- GET
/masjids/{slug}/announcementsA masjid's news - GET
/masjids/{slug}/janazahA masjid's janazah notices - GET
/masjids/{slug}/programsA masjid's programs and classes
Limits
Without a key
Everything but the calculator, up to 60 requests a minute and 2,500 a day from one network address. Most answers come from our cache and never count.
With a free key
Everything, the calculator included, with 60 requests a minute and 10,000 a day for your key alone.
Every answer has an ETag. Send it back in If-None-Match, and when nothing changed you get a short "not changed" answer (304) that never counts toward your day.
Show the times honestly
- Each masjid sets its own iqamah times. A masjid that has not published them on Muslim.Blue answers calculated adhan times, marked "calculated". Say so wherever you show them.
- Some masjid listings come from OpenStreetMap. Those answers carry the credit to show with them.
- Read the API Terms of Use before you build on the API.
Questions
Is the API really free?
Yes. Reading prayer times, masjids and the Hijri date is free, with or without a key. Masjids pay for their own plan on Muslim.Blue; developers pay nothing.
Do I need a key?
Not to read a masjid's times, find masjids or get the Hijri date. You need a free key for calculated times at any place, and a key gives you limits of your own.
Why does a masjid show no iqamah times?
Its times are published by the masjid. Until it publishes them on Muslim.Blue, its answers carry calculated adhan times, "iqamah": null, and the word "calculated".
How fresh are the times?
When a masjid changes its times, its answers change within a minute, and the moment it publishes, its calculated times give way to its own.
Can I use it in an app I sell?
The API Terms of Use say what you may build. In short: show the times honestly, credit the data that asks for it, and never present calculated times as a masjid's own.