salah.com APIsalah.com ↗
Get Islamic prayer times for any location via salah.com. Query by coordinates, city name, or homepage defaults. Returns Fajr, Dhuhr, Asr, Maghrib, Isha, and more.
curl -X GET 'https://api.parse.bot/scraper/ef45bcf1-9fcb-49c5-bf70-392cbc9e4dbf/get_prayer_times_by_coordinates?latitude=40.7128&longitude=-74.0060' \ -H 'X-API-Key: $PARSE_API_KEY'
Fetches today's prayer times for a given location using latitude and longitude coordinates. Returns prayer names (Fajr, Sunrise, Dhuhr, Asr, Maghrib, Isha, Qiyam) with their times.
| Param | Type | Description |
|---|---|---|
| latituderequired | number | Latitude of the location (e.g. 40.7128) |
| longituderequired | number | Longitude of the location (e.g. -74.0060) |
| method_id | integer | Calculation method ID for prayer time computation |
{
"type": "object",
"fields": {
"times": "object mapping prayer names to their scheduled times",
"method": "object, calculation method details (may be empty)",
"location": "string, address or area name for the coordinates"
},
"sample": {
"data": {
"times": {
"Asr": "4:45 PM",
"Fajr": "4:21 AM",
"Isha": "9:23 PM",
"Dhuhr": "12:52 PM",
"Qiyam": "2:02 AM",
"Maghrib": "7:56 PM",
"Sunrise": "5:48 AM"
},
"method": {},
"location": "260 Broadway, New York"
},
"status": "success"
}
}About the salah.com API
The salah.com API exposes 4 endpoints for retrieving daily Islamic prayer times — Fajr, Sunrise, Dhuhr, Asr, Maghrib, Isha, and Qiyam — for locations worldwide. Use get_prayer_times_by_coordinates to query by latitude and longitude, or get_all_prayer_times_for_location to pass a city name or address and receive geocoded results. Each response includes a times object mapping prayer names to scheduled times, a location string, and optional calculation method details.
Endpoints and Response Shape
The API provides three main ways to retrieve prayer times. get_prayer_times_by_coordinates accepts latitude and longitude as required inputs plus an optional method_id for selecting a specific prayer time calculation method. It returns a times object (prayer name → scheduled time), a location string describing the area, and a method object with calculation method details. get_all_prayer_times_for_location takes a location string such as "London, UK" or "Cairo", geocodes it, and returns the same times, location, and method fields. The method_id parameter is also available here to pin a specific calculation standard.
Homepage and Mosque Endpoints
get_prayer_times_homepage requires no inputs and returns the default prayer times, detected location name, and calculation_method string as shown on the salah.com homepage — useful for testing or for building a generic widget that reflects the site's own defaults. get_mosques is a separate endpoint that attempts to return mosque directory information for a location, but coverage is limited: the response returns a status and message field, and mosque data may not be available for all regions.
Prayer Times and Calculation Methods
All time-returning endpoints expose seven named prayers: Fajr, Sunrise, Dhuhr, Asr, Maghrib, Isha, and Qiyam. The optional method_id parameter on coordinate and location endpoints lets callers specify the calculation authority (e.g., ISNA, MWL, Egyptian General Authority) where salah.com supports multiple methods. If method_id is omitted, salah.com applies its own default for the queried location.
- Display today's prayer schedule in a Muslim lifestyle mobile app using
get_prayer_times_by_coordinateswith device GPS coordinates - Send daily prayer time notifications by querying
get_all_prayer_times_for_locationfor a user's saved city each morning - Build a prayer time widget for a mosque website that shows Fajr through Isha times for a fixed location
- Compare prayer times across different calculation methods by calling the coordinates endpoint with different
method_idvalues for the same lat/lng - Populate a world clock-style dashboard showing prayer times for multiple cities via repeated calls to
get_all_prayer_times_for_location - Verify or cross-check Qiyam (night prayer) times programmatically for scheduling automated reminders
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does salah.com have an official developer API?+
What does the `method_id` parameter control and which endpoints support it?+
method_id selects the Islamic prayer time calculation authority used to derive the schedule. It is accepted by both get_prayer_times_by_coordinates and get_all_prayer_times_for_location. When omitted, salah.com applies its default calculation method for the queried location. The method field in the response may return details about the method that was applied, though it can be empty in some cases.Are prayer times returned for future dates or just today?+
date parameter to request schedules for past or future dates. The API covers the current day's Fajr through Qiyam schedule. You can fork the API on Parse and revise it to add date-based querying if salah.com exposes that capability.Does the mosque endpoint return detailed mosque listings?+
get_mosques endpoint returns a status and message field, and mosque directory data is noted as not available for all regions. It does not currently return structured fields such as mosque names, addresses, or coordinates. You can fork the API on Parse and revise it to add a more detailed mosque data endpoint if the underlying source expands its coverage.