RapidAPI logo

Sign Up

Log In

Prayer Times

FREE
By meezaan
Updated 2 months ago
Tools
9.6/10
Popularity Score
717ms
Latency
85%
Success Rate

Prayer Times API Documentation

A flexible RESTful prayer times API that returns JSON times for a given day or a calendar for a whole month.

For more detailed documentation, various methods and additional endpoints, please see the complete documentation on http://aladhan.com/prayer-times-api.

View API Details

Supercharge your App

Discover and connect to thousands of APIs in the world's largest API Hub
By City
GETPrayer Times by City
GETPrayer Times Calendar by city
By Address
GETPrayer Times by Address
GETCalendar by Address
GETPrayer Times by City

Get Prayer Times for a given day by city and country

Sign up to test this endpoint
Log in
Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
citySTRING
REQUIREDA city name, like Denver
countrySTRING
REQUIREDA country name or ISO 2 digit aplha code, like 'US' or 'United States of America'
Optional Parameters
stateSTRING
OPTIONALA US state name or 2 letter abbreviation, like 'Colorado' or 'CO'
methodNUMBER
OPTIONALAny of the prayer time calculation methods specified on https://aladhan.com/calculation-methods
schoolNUMBER
OPTIONAL1 for Hanfi. 0 for all others, including, Shafi, Hanbali, etc.
latitudeAdjustmentMethodNUMBER
OPTIONALMethod for adjusting times higher latitudes - for instance, if you are checking timings in the UK or Sweden. 1 - Middle of the Night 2 - One Seventh 3 - Angle Based
Request Snippet
unirest.get("https://aladhan.p.rapidapi.com/timingsByCity?state=undefined&method=undefined&school=undefined&latitudeAdjustmentMethod=undefined")
.header("X-RapidAPI-Host", "undefined")
.header("X-RapidAPI-Key", "undefined")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response

loading...

Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://aladhan.p.rapidapi.com/timingsByCity?state=undefined&method=undefined&school=undefined&latitudeAdjustmentMethod=undefined")
.header("X-RapidAPI-Host", "undefined")
.header("X-RapidAPI-Key", "undefined")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication