deep-dive

Planetary aspects (Drishti) computed via API

Compute Vedic Drishti and Western planetary aspects through one API: special aspects, orbs, applying versus separating, plus cURL and code examples.

Planetary aspects — Drishti in Vedic astrology and angular aspects in Western astrology — can be computed directly through the Vedika API: a call returns which planet aspects which planet, the aspect type, and (for the Western model) the orb and whether the aspect is applying or separating. Because the Vedic (sidereal), Western (tropical), and KP systems live behind one API and one key, you choose the aspect model by route instead of integrating three different services. This guide covers the request shape, the special-aspect rules the engine encodes, and how to read the response.

What “aspect” means in each system

The word “aspect” describes two genuinely different mechanics depending on the tradition, and a useful API has to honor that difference rather than flatten it.

Vedic Drishti (graha drishti)

In Vedic astrology, aspects are counted in whole signs or houses from a planet’s position. Every planet aspects the 7th house from itself. Three planets cast additional special aspects at full strength, and these are deliberately asymmetric:

These rules come from Brihat Parashara Hora Shastra and are restated in Phaladeepika; they are the foundation every practising Jyotishi learns. A naive implementation that gives every planet the same aspects is simply wrong for Mars, Jupiter, and Saturn, so the engine encodes the special cases explicitly.

Western aspects

Western aspects are angular: you measure the ecliptic-longitude separation between two planets and check it against a set of recognised angles, each allowed a tolerance called an orb. The classical Ptolemaic aspects — conjunction (0°), sextile (60°), square (90°), trine (120°), and opposition (180°) — trace to Ptolemy’s Tetrabiblos. Here, direction of motion matters: an aspect tightening toward exactness is applying, while one loosening is separating.

KP and the others

KP (Krishnamurti Paddhati) works from the same sidereal longitudes as the Vedic model but layers significators and sub-lords on top. The API also exposes Jaimini, Tajaka, and Lal Kitab models for callers who need those frameworks. The point is that aspect logic is not bolted onto one tradition — it is part of a shared computation surface spanning 1,128 operations across 12 systems.

The endpoints you will use

There are two ways to get aspects, depending on whether you want raw computed data or a natural-language reading.

Both share the base URL https://api.vedika.io and authenticate with the Authorization: Bearer header carrying a vk_live_ key.

Computing an aspect table (cURL)

curl -X POST https://api.vedika.io/v2/western/transit-aspects \
  -H "Authorization: Bearer vk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "datetime": "1990-08-15T14:30:00",
    "latitude": 28.6139,
    "longitude": 77.2090,
    "timezone": "+05:30"
  }'

This returns degree-based Western aspects, each with its orb and whether it is applying. House-counted Vedic Drishti has no dedicated table yet (Planned: /v2/astrology/aspects). Until it ships, the natural-language query below answers Drishti questions from the computed chart, and /v2/astrology/jaimini/aspects returns the sign-based Jaimini aspects.

Asking about an aspect in natural language (JavaScript)

const res = await fetch("https://api.vedika.io/api/v1/astrology/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.VEDIKA_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    question: "Which houses does Saturn aspect in this chart, and what does that mean?",
    birthDetails: {
      datetime: "1990-08-15T14:30:00",
      latitude: 28.6139,
      longitude: 77.2090,
      timezone: "Asia/Kolkata"
    },
    speed: "fast"
  })
});

const data = await res.json();
console.log(data.response);

The speed: "fast" flag routes the request through Vedika Swift for lower latency when you do not need the deepest reasoning tier. Drop it to use the standard model.

Python equivalent

import os, requests

resp = requests.post(
    "https://api.vedika.io/v2/western/transit-aspects",
    headers={"Authorization": "Bearer " + os.environ["VEDIKA_API_KEY"]},
    json={
        "datetime": "1990-08-15T14:30:00",
        "latitude": 28.6139,
        "longitude": 77.2090,
        "timezone": "+05:30",
    },
)
for a in resp.json()["data"]["aspects"]:
    phase = "applying" if a["is_applying"] else "separating"
    print(a["planet1"]["name"], a["aspect"]["name"], a["planet2"]["name"], f"orb {a['orb']}°", phase)

Reading the response

The Western response is wrapped as { success, data, billing, meta }, and data.aspects lists the aspects. Each entry carries the numeric detail that lets you weight aspects:

For Vedic Drishti the planned table will list, for each aspecting planet, the aspected house and the aspect class (the universal 7th, or the special 4th/8th, 5th/9th and 3rd/10th). Today, /v2/astrology/jaimini/aspects returns Jaimini aspects as fromSignName, toSignName, planetsInFrom, planetsInTo and type.

Treating every aspect as equal is a common mistake; the orb and is_applying fields exist precisely so you can rank a 0.5° applying square above a 7° separating one.

Precision underneath the aspects

Aspect tables are only as trustworthy as the longitudes they are derived from. Vedika computes positions with the XALEN Ephemeris, its own open-source engine published under Apache-2.0 (crates.io/xalen, PyPI xalen, npm @xalen/wasm) and covered by roughly 2,200 tests. It is validated against JPL DE440 and swetest, with no chart deviating beyond 0.1° across a reproducible JPL DE440 benchmark. That figure is astronomical precision — the position of the planet — not a claim about astrological interpretation. But it does mean the inputs to every aspect calculation are stable across the systems you query, so a Vedic Drishti and a Western orb for the same birth rest on the same underlying coordinates.

How this compares to other providers

Several established APIs serve aspect data well. Prokerala (around $19/mo) and AstrologyAPI.com (around $29/mo) both offer solid Vedic computation and clean documentation, and RoxyAPI (around $39/mo) provides broad Western coverage. If your product only needs one tradition, any of them may be a fine fit, and it is worth evaluating them.

Where Vedika differs is consolidation and grounding. Three aspect systems — Vedic, Western, and KP — come from one API with one auth scheme, so a single integration covers sidereal Drishti and tropical orbs without standing up separate clients. Responses are available in 30 languages (15 of them Indic). And under Rule-22 sourcing, the rules behind the aspects map to the texts practitioners are actually trained on rather than paraphrased web summaries.

Key facts

Bringing it all together

Start in the free sandbox to confirm the request and response shapes against your data model with no key required. When the shapes match, generate a vk_live_ key and point at api.vedika.io; the full request and field reference lives in the API documentation, and plan tiers from Starter at $12/mo through Enterprise are on the pricing page. If your aspect work is part of a larger chart engine, the three-systems-in-one-API overview shows how Drishti, tropical aspects, and KP significators share the same call.

Build on the Vedika astrology API

1,128 operations, Vedic + Western + KP, 30 languages, an open-source XALEN ephemeris, and a built-in LLM. Free sandbox — no signup.

Try the free sandbox