SEARCH ASTROLOGY API DOCS

Home
Indian Astrology

Beginner/geo_details

Provide latitude and logitude of the given place.

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

Request Data

ParamsData typeDescriptions

place

maxRows

string

int

place , eg: 'mumbai'

number of result at time, eg: 6

Response Data

{  
   "geonames":[  
      {  
         "place_name":"Mumbai",
         "latitude":19.07283,
         "longitude":"72.88261",
         "timezone_id":"Asia/Kolkata",
         "country_code":"IN"
      },
      {  
         "place_name":"Navi Mumbai",
         "latitude":19.03681,
         "longitude":"73.01582",
         "timezone_id":"Asia/Kolkata",
         "country_code":"IN"
      }
   ]
}
POST
var api = 'geo_details';
var userId = '<Your User Id>';
var apiKey = '<Your Api Key>';
var data = {
   place:  "mumbai",
   maxRows: 6,

};

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

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