TECHNICAL GUIDE
XALEN Ephemeris API Guide: NASA-Grade Calculations
Access XALEN Ephemeris planetary calculations via REST API. No local installation required.
January 7, 2026
-
15 min read
What is XALEN Ephemeris?
XALEN Ephemeris is our own high-precision astronomical engine, open-sourced as XALEN Ephemeris (Apache-2.0). It computes planetary positions from NASA Jet Propulsion Laboratory (JPL) ephemeris data and is validated against JPL DE440 across millions of test charts. Vedika API runs it on our servers, giving you access via simple REST calls without needing local ephemeris files.
Why Use an API?
Running Yourself
- Download 100MB+ ephemeris files
- C library compilation
- Memory management
- Update files periodically
Using Vedika API
- Simple REST calls
- No installation
- Always up to date
- Managed infrastructure
Get Planetary Positions
// Get planetary positions for a specific moment
const response = await fetch('https://api.vedika.io/v2/astrology/planet-positions', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
datetime: '2026-03-01T10:30:00',
latitude: 28.6139,
longitude: 77.2090,
timezone: '+05:30'
})
});
const { data } = await response.json();
console.log(data.planets);
// Response (data, trimmed to Sun and Moon):
// {
// "ayanamsa": { "id": 1, "name": "Lahiri", "value": 24.218707 },
// "planets": [
// {
// "id": 0,
// "name": "Sun",
// "sign": "Aquarius",
// "house": 10,
// "degree": 16.4,
// "longitude": 316.4,
// "speed": 1.0035704732546264,
// "isRetrograde": false,
// "nakshatra": { "name": "Shatabhisha", "lord": "Rahu", "pada": 3 }
// },
// {
// "id": 1,
// "name": "Moon",
// "sign": "Cancer",
// "house": 3,
// "degree": 17.78,
// "longitude": 107.78,
// "speed": 13.821538265830895,
// "isRetrograde": false,
// "nakshatra": { "name": "Ashlesha", "lord": "Mercury", "pada": 1 }
// }
// ... Mars, Mercury, Jupiter, Venus, Saturn, Rahu, Ketu
// ]
// }
Supported Celestial Bodies
Sun
Moon
Mercury
Venus
Mars
Jupiter
Saturn
Uranus
Neptune
Pluto
Rahu (Node)
Ketu (Node)
Ayanamsa Options
import { VedikaClient } from '@vedika-io/sdk';
const vedika = new VedikaClient({ apiKey: process.env.VEDIKA_API_KEY });
// Sidereal (Vedic) positions: /v2/astrology routes use the Lahiri ayanamsa,
// and the response reports the ayanamsa value it applied
const sidereal = await vedika.post('/v2/astrology/planet-positions', {
datetime: '2026-01-15T12:00:00',
latitude: 28.6139,
longitude: 77.2090,
timezone: '+00:00'
});
console.log(sidereal.ayanamsa);
// Tropical (Western) positions come from the Western routes
const tropical = await vedika.post('/v2/western/transit-positions', {
datetime: '2026-01-15T12:00:00',
latitude: 28.6139,
longitude: 77.2090,
timezone: '+00:00',
transitDateTime: '2026-01-15T12:00:00'
});
console.log(tropical.planets.map(p => `${p.name}: ${p.sign.name} ${p.degree}`));
House Calculations
// Get house cusps for a location
const houses = await fetch('https://api.vedika.io/v2/astrology/houses/koch', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
datetime: '2026-01-15T12:00:00',
latitude: 28.6139,
longitude: 77.2090,
timezone: '+00:00'
})
});
// One route per house system: /v2/astrology/houses/koch, /whole-sign,
// /equal, /campanus and /regiomontanus (plus /v2/astrology/house-cusps)
// Response (data) includes:
// - system and systemCode
// - cusps: 12 entries with house, cuspDegree, sign and degreeInSign
// - ascendant
// - midheaven
Accuracy Comparison
| Source | Accuracy | Date Range |
|---|---|---|
| XALEN Ephemeris (Vedika) | 0.001 arcsec | -13000 to +17000 |
| Online calculators | 1-5 arcmin | 1900-2100 |
| Simple algorithms | 10+ arcmin | Limited |
Access XALEN Ephemeris via API
Vedika runs our own XALEN Ephemeris (open-sourced as XALEN Ephemeris) with full JPL data. Get astronomical-grade accuracy without managing local ephemeris files or infrastructure.
Get API Key