API Documentation

We have a REST API ready for your to use.
Follows instructions.

    Contents
  1. API URL
  2. Parameters
  3. Example
  4. License

API URL

The entry point is

https://salat.habibur.com/api/

Parameters

lng = 180.0 ≥ float ≤ -180.0
Longitude. Required. Positive on the East side of Meridian, and negetive on the west.
lat = 90.0 > float < -90.0
Latitude. Required. Positive on the North of Equator, and negetive on the South.
tzname = String
Name of timezone.
Here is full list of valid timezones.
You need to send either tzname else tzoffset with the request.
If both send tzname will take priority.
tzoffset = 720 ≥ int ≤ -720
Timezone offset in minutes. Positive on the East of Greenwich. Negetive on the West.

Example

Sample request
https://salat.local/api/?lat=23.7483066&lng=90.4323979&tzoffset=360&tzname=Asia/Dhaka


Click Here to call this API and see results live.


The above will return

{
   "lng":"90.4323979",
   "lat":"23.7483066",
   "tzname":"Asia\/Dhaka",
   "tz":21600,
   "date":"24-Aug-2022",
   "is_gps":1,
   "qibla":277.6311244344405,
   "data":{
      "fajar18":{
         "short":"4:19",
         "long":"4:18:36 am",
         "secs":1661293116.2409678
      },
      "rise":{
         "short":"5:37",
         "long":"5:37:05 am",
         "secs":1661297825.9923773
      },
      "noon":{
         "short":"12:04",
         "long":"12:00:42 pm",
         "secs":1661320842.9325252
      },
      "asar1":{
         "short":"3:28",
         "long":"3:27:56 pm",
         "secs":1661333276.2612562
      },
      "asar2":{
         "short":"4:34",
         "long":"4:33:38 pm",
         "secs":1661337218.8856833
      },
      "set":{
         "short":"6:25",
         "long":"6:23:59 pm",
         "secs":1661343839.6310024
      },
      "magrib12":{
         "short":"7:15",
         "long":"7:14:31 pm",
         "secs":1661346871.024776
      },
      "esha":{
         "short":"7:43",
         "long":"7:42:19 pm",
         "secs":1661348539.0057473
      },
      "night1":{
         "short":"9:42",
         "long":"9:42:11 pm",
         "secs":1661355731.8343241
      },
      "midnight":{
         "short":"11:21",
         "long":"11:21:17 pm",
         "secs":1661361677.935985
      },
      "night2":{
         "short":"1:00",
         "long":"1:00:24 am",
         "secs":1661367624.037646
      },
      "night6":{
         "short":"2:39",
         "long":"2:39:30 am",
         "secs":1661373570.1393068
      },
      "sehri":{
         "short":"4:18",
         "long":"4:18:35 am",
         "secs":1661293115.2409678
      },
      "setstart":{
         "short":"6:20",
         "long":"6:20:59 pm",
         "secs":1661343659.6310024
      },
      "ishraq":{
         "short":"5:52",
         "long":"5:52:05 am",
         "secs":1661298725.9923773
      },
      "asarend":{
         "short":"5:53",
         "long":"5:53:59 pm",
         "secs":1661342039.6310024
      }
   },
   "name":"GPS Location - Goran, Bangladesh"
}

License


You are free to use the API.
Even without registration.
Both for commercial use or private.


Plus, you don't even have to acknowledge this site or provide any credit.
And you can use it from any mobile app or website.


Though we request you to NOT call the function in a loop continusly and increase our server load without a reason.
Also use reasonably and cache calls whereever you find an opportunity.

As a free service, we reserve the right to stop the service, change the API or block calls for any reason.

Published
25-Oct-2023