By topic / JavaScript and Node.js
Integrations
Astrology API for JavaScript and Node.js
Install `@96astro/api` from npm. It has no dependencies, ships ESM and CommonJS with type declarations, and runs anywhere `fetch` does: Node.js 18+, Bun, Deno, and serverless and edge functions. Call it from server code so the key stays secret.
Ideas
What people build with it
An Express or NestJS astrology service
A serverless endpoint for a mobile app
A Discord or Slack horoscope bot
Reference
The endpoints
- Planet PositionsSidereal longitude, sign and sign lord, nakshatra, nakshatra lord and pada, house, speed, retrograde and combust flags for the Ascendant, the nine grahas and Uranus, Neptune and Pluto.POST/v1/vedic-charts/planet-positions 3 credits
- Daily PanchangThe full panchang for one day at one place: limbs, Sun and Moon times, calendar, auspicious and inauspicious periods, choghadiya, hora, festivals, balas, sunrise chart, doshas and more.POST/v1/panchang/daily-panchang 1 credit
- Festival CalendarEvery festival and vrat of a year at a place by date (Diwali, Holi, Janmashtami, Navratri, Ganesh Chaturthi, Ekadashi, Pradosha, Purnima, Amavasya and the rest), each judged in its own window by the daily panchang's rules; `search` narrows it to one festival and `upcoming` gives the next 12 months from today.POST/v1/festivals-muhurta/festival-calendar 3 credits
- Kundli Matching (Ayu Milan)Ashtakoot matching from two births: koota scores and total, Manglik for both with cancellations, Papasamya, Rajju and Vedha, and classical longevity (Ayurdaya) spans for each.POST/v1/matching/ayu-milan 3 credits
- AI Reading: Chat answerAn AI answer to a question about a birth chart, with earlier turns as history; grounded in chart data the service computes from the birth (or in one report named in `context`).POST/v1/ai/ai-chat Metered, from 15 credits
Code
Your first call
npm install @96astro/apiimport { Astro96Client } from "@96astro/api";
const astro = new Astro96Client({ apiKey: process.env.ASTRO_API_KEY });
const { data } = await astro.vedicCharts.planetPositions({
datetime: "1990-10-18T14:30:00",
timezone: "Asia/Kolkata",
latitude: 28.6139,
longitude: 77.209,
});FAQ
Common questions
Can I call it from the browser?
Not with a secret key. Call it from your server, or use a widget, which calls the API with a publishable key limited to your website.
Guides
Read next
Start building with JavaScript and Node.js
5,000 free trial credits. No card required.

