Transit Alert App API
push notifications from the sky
Poll planetary transits and retrogrades daily. When a planet changes sign or goes retrograde, send a personalised Claude AI forecast to each user based on their natal chart.
$3–10/user/month freemium with premium alerts. High retention — users return every time Mercury goes retrograde. Swiss Ephemeris accuracy means your dates are right.
6 types of planetary alerts
Each alert type has a different frequency — giving users something meaningful throughout the month.
Architecture — detect once, personalise per user
Event detection is global (one call). Personalised AI forecasts are per-user (triggered only on events).
Complete daily monitoring job — 50 lines
Sign-change detection, retrograde detection, and per-user AI notification trigger.
// Daily transit monitoring job (runs at midnight UTC)
const BASE = 'https://vedintelastroapi.com/api/v1'
const KEY = 'vai_YOUR_KEY'
const today = new Date().toLocaleDateString('en-GB').replace(///g, '/')
const yesterday = new Date(Date.now() - 86400000).toLocaleDateString('en-GB').replace(///g, '/')
// Generic params for transit/retrograde (no birth data needed — celestial positions are universal)
const skyParams = `api_key=${KEY}&lat=0&lon=0&tz=0&dob=01/01/2000&tob=00:00`
// Fetch today's and yesterday's positions in parallel
const [today_transits, today_retrogrades, moon_phase] = await Promise.all([
fetch(`${BASE}/panchang/transit?${skyParams}&date=${today}`).then(r => r.json()),
fetch(`${BASE}/panchang/retrogrades?api_key=${KEY}&date=${today}`).then(r => r.json()),
fetch(`${BASE}/panchang/moon-phase?${skyParams}&date=${today}`).then(r => r.json()),
])
// Compare with yesterday's snapshot (stored in your DB)
const yesterday_snapshot = await db.transitSnapshots.findOne({ date: yesterday })
for (const planet of today_transits.response.transit) {
const prev = yesterday_snapshot?.planets[planet.planet]
if (prev && prev.zodiac !== planet.zodiac) {
// Planet changed sign — trigger alerts for all affected users
await triggerAlertForAllUsers({
type: 'SIGN_CHANGE',
planet: planet.planet,
from: prev.zodiac,
to: planet.zodiac,
})
}
}
// Check retrograde flips
for (const planet of today_retrogrades.response.planets) {
const prevRetro = yesterday_snapshot?.retrogrades[planet.planet]
if (prevRetro !== undefined && prevRetro !== planet.is_retrograde) {
await triggerAlertForAllUsers({
type: planet.is_retrograde ? 'RETROGRADE_BEGIN' : 'RETROGRADE_END',
planet: planet.planet,
})
}
}
// Per-user personalised forecast (called only for users who have alerts enabled)
async function triggerAlertForUser(userId, event) {
const user = await db.users.findById(userId)
const params = `api_key=${KEY}&dob=${user.dob}&tob=${user.tob}&lat=${user.lat}&lon=${user.lon}&tz=${user.tz}`
const forecast = await fetch(`${BASE}/ai/transit/forecast?${params}&date=${today}`).then(r => r.json())
await sendPushNotification({
userId,
title: `${event.planet} ${event.type === 'SIGN_CHANGE' ? 'enters ' + event.to : 'goes retrograde'}`,
body: forecast.response.narrative.slice(0, 140) + '...',
deepLink: '/app/forecast',
})
}7 endpoints for transit apps
All GET requests. Transit and retrograde endpoints don't require birth data — universal celestial positions.
/api/v1/panchang/transitAll 9 planet positions for any date — current sign, house, retrograde status
/api/v1/panchang/retrogradesCurrent retrograde status for Mercury, Venus, Mars, Jupiter, Saturn + Rahu/Ketu
/api/v1/panchang/moon-phaseCurrent lunar phase — new/waxing/full/waning — with tithi name
/api/v1/predictions/daily-moonDaily horoscope based on today's Moon sign transit
/api/v1/predictions/daily-nakshatraDaily prediction based on the current nakshatra — fresh every ~27 hours
/api/v1/horoscope/planet-detailsUser's natal chart — needed to calculate which house a transit falls in
/api/v1/ai/transit/forecastClaude AI personalised forecast — interprets current transits against user's natal chart
Built for retention
Build your transit alert app today
500 free API calls. Swiss Ephemeris retrograde dates accurate to the minute.