LifeAstroAPILifeAstroAPI
intermediate
~20 minutes with AI 3 APIs

Daily Horoscope Widget

Personalized horoscope cards driven by real-time transit data, not generic sun-sign text.

Ship a fresh horoscope for every user, every day.

What you'll build

  • User's natal chart (one-time)
  • Current transit positions relative to natal chart
  • Current Mahadasha + Antardasha (from /v1/dasha/vimshottari/current)
  • A 3-sentence narrative generated locally from the data

Build this with AI

Copy the full prompt below, paste it into ChatGPT, Claude, Cursor, or Lovable, and get a working Next.js implementation in minutes. No coding skill required.

68 lines Structured context With API endpoints

Step by step

01Compute the natal chart once

On first signup, compute and store the user's D1 planets + ascendant. This never changes.

02Fetch current dasha periods

Every day, fetch the user's current Mahadasha / Antardasha / Pratyantar dasha — these drive the dominant themes. Send the birth details as date, time, tz, lat and lon. The running dasha is found for now, or for the UTC moment in the optional "at" param.

GET /v1/dasha/vimshottari/current
curl "https://api.lifeastroapi.com/v1/dasha/vimshottari/current?date=1990-01-15&time=10%3A30&tz=Asia%2FKolkata&lat=19.076&lon=72.8777" \
  -H "Authorization: Bearer YOUR_API_KEY"

03Fetch transits

Current sidereal positions of all planets. Compare to natal to find the 2-3 most influential transits.

04Generate the narrative

Combine the dasha lords, transit highlights, and current tithi/nakshatra into a 3-sentence daily reading. Run this locally or through an LLM of your choice.

APIs used in this recipe

Next, try building

Ready to try? You get 1,500 free credits — no card needed.

Sign up for free