Planetary Aspects
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:
| Method | Example |
|---|---|
| Header (recommended) | X-Api-Key: am_live_xxxxxxxxxxxx |
| Bearer | Authorization: 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.
| Field | Type | Required | Description |
|---|---|---|---|
year | integer | Yes | Birth year, 4-digit (e.g. 1990). |
month | integer | Yes | Birth month, 1–12. |
day | integer | Yes | Day of month, 1–31. |
hour | integer | Yes | Hour in 24-hour local clock time, 0–23. |
minute | integer | Yes | Minute, 0–59. |
second | integer | No | Second, 0–59. Default 0. |
latitude | number | Yes | Signed decimal degrees, −90…90. Positive = North (e.g. 28.6139). |
longitude | number | Yes | Signed decimal degrees, −180…180. Positive = East (e.g. 77.2090). |
timezone | string | Yes | IANA timezone identifier (e.g. Asia/Kolkata). DST is resolved automatically. |
name | string | No | Native’s name. Not returned by this endpoint; use /vedic/birth-details to retrieve it. |
place | string | No | Birth place label. Not returned by this endpoint; use /vedic/birth-details to retrieve it. |
ayanamsa | string | No | Sidereal mode. Default lahiri. Full list of 45+ ayanamsas → |
node_type | string | No | mean (default) or true. Controls Rahu/Ketu position calculation. |
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.
| Field | Type | Description |
|---|---|---|
| aspects[] | ||
source | string | The planet casting the aspect. |
target | string | The planet receiving the aspect. |
aspect_type | string | Which house distance: 7th (standard, all planets), 3rd/10th (Saturn), 4th/8th (Mars), 5th/9th (Jupiter, Rahu, Ketu). |
source_sign | string | Sign the source planet occupies. |
target_sign | string | Sign the target planet occupies. |
source_house | integer | House the source planet occupies (1–12). |
target_house | integer | House the target planet occupies (1–12). |
degree_distance | number | Distance in degrees from exact aspect (0–15). Lower = tighter. |
strength | number | Aspect strength on a 0–60 virupa scale. Formula: 60 × (1 − degree_distance / 15). 60 = exact, 0 = at orb boundary. |
| top-level | ||
total_aspects | integer | Total number of aspects found. |
| meta | ||
meta.endpoint | string | Echo of the called endpoint path. |
meta.version | string | API version (currently 3.0). |
meta.response_time_ms | integer | Server-side response time in milliseconds. |
meta.timestamp | string (ISO 8601) | Time the response was served. |
meta.credits_remaining | integer | API credits remaining on your plan. |
meta.request_id | string | Unique request identifier — include in support tickets. |
meta.ayanamsa.name | string | Sidereal mode applied. |
meta.ayanamsa.value | number | Ayanamsa offset in decimal degrees. |
meta.ayanamsa.value_dms | string | Same in D°M′S″ format. |
meta.node_type | string | Rahu/Ketu calculation mode: mean or true. |
Aspect rules
Parashari graha drishti follows fixed rules by planet:
| Planet | Aspects cast |
|---|---|
| All planets | 7th house from their position (standard opposition). |
| Mars | 4th and 8th (in addition to 7th). |
| Jupiter | 5th and 9th (in addition to 7th). |
| Saturn | 3rd and 10th (in addition to 7th). |
| Rahu / Ketu | 5th, 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_houseto see which bhavas are connected by planetary glances.
Errors
| HTTP | Code | Cause |
|---|---|---|
| 400 | MISSING_FIELD | A required birth field is absent. |
| 400 | INVALID_DATE | Invalid calendar date. |
| 400 | INVALID_TIME | Hour/minute/second out of range. |
| 400 | INVALID_TIMEZONE | Numeric or non-IANA timezone. |
| 400 | INVALID_COORDINATE | latitude / longitude out of range. |
| 401 | AUTH_MISSING_KEY | No API key in request. |
| 401 | AUTH_INVALID_KEY | Key format invalid or not found. |
| 401 | AUTH_REVOKED_KEY | Key has been revoked. |
| 403 | AUTH_ORIGIN_DENIED | Request from non-whitelisted origin. |
| 405 | METHOD_NOT_ALLOWED | Non-POST request. |
| 429 | RATE_LIMIT_EXCEEDED | Plan quota exceeded. |
| 500 | CALCULATION_ERROR | Ephemeris 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
- Planets in Houses — house-level view: occupants and aspecting planets per house
- Planets — full positional data for all 9 grahas
- Vedic Astrology overview — full category index
- Authentication — keys, headers, origin whitelisting
- Errors reference — universal error codes