SEARCH ASTROLOGY API DOCS

Home
Indian Astrology

Geo Time Zone/timezone

Return a time zone of the given place.

API Endpoint : timezone
Method : POST
Full URL :
https://json.astrologyapi.com/v1/timezone

Request Data

ParamsData typeDescriptions

country_code required

isDst required

string

boolean

time zone id , get from geo_details api

is for dst , eg: true or false

Response Data

{
	"timezone": "5.5"
}
POST
var api = 'timezone';
var userId = '<Your User Id>';
var apiKey = '<Your Api Key>';
var language = '<Your Language>' // By default it is set to en
var data = {
   country_code:  5.5,
   isDst: true,
};

var request = $.ajax({
url: "https://json.astrologyapi.com/v1/"+api,
method: "POST",
dataType:'json',
headers: {
    "authorization": "Basic " + btoa(userId+":"+apiKey),
    "Content-Type":'application/json',
    "Accept-Language": language
},
    data:JSON.stringify(data)
});

request.then( function(resp){
    console.log(resp);
}, function(err){
    console.log(err);
});