// Install: npm install axios
const axios = require('axios')
// Get birth chart with planet details
const res = await axios.get(
'https://vedintelastroapi.com/api/v1/horoscope/planet-details',
{
params: {
api_key: 'vai_your_key_here',
dob: '15/08/1990', // DD/MM/YYYY
tob: '10:30', // HH:MM (24-hour)
lat: 28.6139, // New Delhi latitude
lon: 77.2090, // New Delhi longitude
tz: 5.5, // IST timezone offset
ayanamsa: 'lahiri', // lahiri | raman | kp | pushya_paksha + 8 more
}
}
)
console.log(res.data)
/* {
"status": 200,
"response": {
"0": {"name": "As", "full_name": "Ascendant", "local_degree": 28.7085476709118, "global_degree": 178.7085476709118, "progress_in_percentage": 95.69515890303933, "rasi_no": 6, "zodiac": "Virgo", "retro": false, "is_retro": "false", "house": 1, "nakshatra": "Chitra", "nakshatra_lord": "Mars", "nakshatra_pada": 2, "nakshatra_degree_within": 5.3752},
"1": {"name": "Su", "full_name": "Sun", "local_degree": 28.394966854969198, "global_degree": 118.3949668549692, "progress_in_percentage": 94.64988951656399, "rasi_no": 4, "zodiac": "Cancer", "retro": false, "is_retro": "false", "house": 11, "nakshatra": "Ashlesha", "nakshatra_lord": "Mercury", "nakshatra_pada": 4, "nakshatra_degree_within": 11.7283},
... // "2"-"9": Moon to Ketu, "10"-"19": Uranus to Lilith
},
"remaining_api_calls": 49
} */