POST · VEDIC

Planetary Aspects

Endpoint POST https://starsapi.com/api/v3/vedic/natal/planetary-aspects

Returns planet-to-planet Parashari graha drishti for the 9 Vedic grahas. Every planet casts a full 7th-house aspect. Mars additionally aspects the 4th and 8th houses from its position; Jupiter the 5th and 9th; Saturn the 3rd and 10th; Rahu and Ketu the 5th, 7th, and 9th.

Each aspect includes the source and target planets, their signs and houses, the aspect type (e.g. 7th, 4th, 9th), the exact degree distance, and an aspect strength score on a 0–60 virupa scale. Rahu–Ketu mutual aspects are excluded since the nodes are always exactly 180° apart. For a house-level view (which planets aspect each house), use /natal/planets-in-houses instead.

Authentication

Required. Three methods accepted:

MethodExample
Header (recommended)X-Api-Key: am_live_xxxxxxxxxxxx
BearerAuthorization: Bearer am_live_xxxxxxxxxxxx
Query?api_key=am_live_xxxxxxxxxxxx

See authentication for security considerations.

Request body

Send a JSON object with Content-Type: application/json. All core fields are required.

FieldTypeRequiredDescription
yearintegerYesBirth year, 4-digit (e.g. 1990).
monthintegerYesBirth month, 112.
dayintegerYesDay of month, 131.
hourintegerYesHour in 24-hour local clock time, 023.
minuteintegerYesMinute, 059.
secondintegerNoSecond, 059. Default 0.
latitudenumberYesSigned decimal degrees, −90…90. Positive = North (e.g. 28.6139).
longitudenumberYesSigned decimal degrees, −180…180. Positive = East (e.g. 77.2090).
timezonestringYesIANA timezone identifier (e.g. Asia/Kolkata). DST is resolved automatically.
namestringNoNative’s name. Not returned by this endpoint; use /vedic/birth-details to retrieve it.
placestringNoBirth place label. Not returned by this endpoint; use /vedic/birth-details to retrieve it.
ayanamsastringNoSidereal mode. Default lahiri. Full list of 45+ ayanamsas →
node_typestringNomean (default) or true. Controls Rahu/Ketu position calculation.
Use the local clock time of birth. Pass the wall-clock time as recorded on the birth certificate together with the IANA timezone of the birth place — the backend converts to UTC internally. Do not pre-convert to UTC yourself.

Response shape

The data.aspects array contains one object per planet-to-planet aspect found. Only aspects where the two planets are within a 15° orb are included. Birth input is not echoed back — call /vedic/birth-details separately to retrieve resolved birth details.

FieldTypeDescription
aspects[]
sourcestringThe planet casting the aspect.
targetstringThe planet receiving the aspect.
aspect_typestringWhich house distance: 7th (standard, all planets), 3rd/10th (Saturn), 4th/8th (Mars), 5th/9th (Jupiter, Rahu, Ketu).
source_signstringSign the source planet occupies.
target_signstringSign the target planet occupies.
source_houseintegerHouse the source planet occupies (1–12).
target_houseintegerHouse the target planet occupies (1–12).
degree_distancenumberDistance in degrees from exact aspect (0–15). Lower = tighter.
strengthnumberAspect strength on a 0–60 virupa scale. Formula: 60 × (1 − degree_distance / 15). 60 = exact, 0 = at orb boundary.
top-level
total_aspectsintegerTotal number of aspects found.
meta
meta.endpointstringEcho of the called endpoint path.
meta.versionstringAPI version (currently 3.0).
meta.response_time_msintegerServer-side response time in milliseconds.
meta.timestampstring (ISO 8601)Time the response was served.
meta.credits_remainingintegerAPI credits remaining on your plan.
meta.request_idstringUnique request identifier — include in support tickets.
meta.ayanamsa.namestringSidereal mode applied.
meta.ayanamsa.valuenumberAyanamsa offset in decimal degrees.
meta.ayanamsa.value_dmsstringSame in D°M′S″ format.
meta.node_typestringRahu/Ketu calculation mode: mean or true.

Aspect rules

Parashari graha drishti follows fixed rules by planet:

PlanetAspects cast
All planets7th house from their position (standard opposition).
Mars4th and 8th (in addition to 7th).
Jupiter5th and 9th (in addition to 7th).
Saturn3rd and 10th (in addition to 7th).
Rahu / Ketu5th, 7th, and 9th. Mutual Rahu–Ketu aspects are excluded (always 180° apart).

Strength calculation

Aspect strength is a linear function of how close the two planets are to the exact aspect point. The formula is:

strength = 60 × (1 − degree_distance / 15)

At exact aspect (degree_distance = 0), strength is 60 virupa (full). At the 15° orb boundary, strength drops to 0. Only aspects within this 15° window are returned.

Use cases

  • Aspect grid — render a 9×9 planet matrix showing who aspects whom, with strength as colour intensity.
  • Yoga detection — scan the list for specific source–target pairs to identify classical yogas (e.g. Gajakesari: Jupiter aspecting Moon).
  • Strength filtering — surface only tight aspects (strength > 30) for quick analysis, or include weaker ones for detailed work.
  • House-based grouping — use source_house / target_house to see which bhavas are connected by planetary glances.

Errors

HTTPCodeCause
400MISSING_FIELDA required birth field is absent.
400INVALID_DATEInvalid calendar date.
400INVALID_TIMEHour/minute/second out of range.
400INVALID_TIMEZONENumeric or non-IANA timezone.
400INVALID_COORDINATElatitude / longitude out of range.
401AUTH_MISSING_KEYNo API key in request.
401AUTH_INVALID_KEYKey format invalid or not found.
401AUTH_REVOKED_KEYKey has been revoked.
403AUTH_ORIGIN_DENIEDRequest from non-whitelisted origin.
405METHOD_NOT_ALLOWEDNon-POST request.
429RATE_LIMIT_EXCEEDEDPlan quota exceeded.
500CALCULATION_ERROREphemeris calculation failed.

Error response format

{
  "success": false,
  "error": {
    "code": "INVALID_TIMEZONE",
    "message": "Unrecognised timezone: 'Asia/Calcutta_'. Use a valid IANA identifier such as 'Asia/Kolkata'."
  }
}

See also