Ashtottari Dasha API with Astro

Integrate Ashtottari Dasha API in Astro. Complete code examples and SDK documentation.

Operation

POST /v2/astrology/ashtottari-dasha

Ashtottari (108-year) conditional dasha — 8 planets across 28 nakshatras (BPHS Ch.46)

Parameters

NameInTypeDescription
datetimebodystring—
latitudebodynumber—
longitudebodynumber—
timezonebodystring—

Request example for Astro

Authenticate with Authorization: Bearer YOUR_API_KEY. The route file runs on the server and reads the key from the VEDIKA_API_KEY environment variable. Client code calls only your own route; never import the key into a client bundle.

// src/pages/api/vedika/ashtottari-dasha.ts (server only)
import type { APIRoute } from 'astro';

export const GET: APIRoute = async () => {
  const upstream = await fetch('https://api.vedika.io/v2/astrology/ashtottari-dasha', {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${import.meta.env.VEDIKA_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      "datetime": "1990-05-15T10:30:00",
      "latitude": 19.07,
      "longitude": 72.87,
      "timezone": "+05:30"
    }),
  });
  return new Response(await upstream.text(), {
    status: upstream.status,
    headers: { 'Content-Type': 'application/json' },
  });
};

// In client code (a <script> or an island), call your own route. The key never reaches the browser:
const data = await (await fetch('/api/vedika/ashtottari-dasha')).json();

Try it in the keyless sandbox

The sandbox mirrors the production route and needs no API key:

curl -X POST https://api.vedika.io/sandbox/astrology/ashtottari-dasha \
  -H "Content-Type: application/json" \
  -d '{"datetime":"1990-05-15T10:30:00","latitude":19.07,"longitude":72.87,"timezone":"+05:30"}'

Sandbox response from POST /sandbox/astrology/ashtottari-dasha, abridged (billing block, long text fields and long lists trimmed). The sandbox answers with a fixed demo result and ignores your inputs; a production call computes the result for the details you send.

{
  "data": {
    "birthData": {
      "datetime": "1995-01-01T12:00:00+05:30",
      "latitude": 28.6139,
      "longitude": 77.209,
      "timezone": "Asia/Kolkata"
    },
    "birthNakshatra": "Purva Ashadha",
    "currentAntarDasha": {
      "endDate": "2027-02-26T10:01:20.615Z",
      "mahaDashaLord": "Rahu",
      "planet": "Venus",
      "startDate": "2024-10-27T04:01:20.615Z",
      "vedicName": "Shukra"
    },
    "currentMahaDasha": {
      "endDate": "2035-06-28T04:01:20.615Z",
      "planet": "Rahu",
      "startDate": "2023-06-28T04:01:20.615Z",
      "vedicName": "Rahu"
    },
    "dashaBalance": {
      "elapsedPercentage": 5.13,
      "planet": "Saturn",
      "remainingDays": 0,
      "remainingMonths": 6,
      "remainingTotalDays": 3465,
      "remainingYears": 9,
      "vedicName": "Shani"
    },
    "mahaDashas": [
      {
        "antarDashas": [
          {
            "durationDays": 321,
            "durationYears": 0.8783937942048824,
            "endDate": "1995-11-18T02:30:00Z",
            "isCurrentPeriod": false,
            "mahaDashaLord": "Saturn",
            "planet": "Saturn",
            "startDate": "1995-01-01T06:30:00Z",
            "vedicName": "Shani"
          }
        ],
        "durationDays": 3465,
        "durationYears": 9.487054801857433,
        "endDate": "2004-06-27T10:01:20.615Z",
        "isCurrentPeriod": false,
        "planet": "Saturn",
        "startDate": "1995-01-01T06:30:00Z",
        "vedicName": "Shani"
      }
    ],
    "nakshatraLord": "Saturn",
    "system": "ashtottari",
    "totalCycleYears": 108
  },
  "meta": {
    "contentMode": "fixture",
    "engine": "vedika-intelligence",
    "fixtureId": "demo-birth-1995-new-delhi",
    "inputUsage": "ignored",
    "mode": "sandbox",
    "sample": true,
    "version": "2.1.0"
  },
  "success": true
}

Related

The same endpoint in other stacks:

Last updated: 22 November 2026

Start 14-day trial