POST · VEDIC
Sun Sign
Endpoint
POST https://starsapi.com/api/v3/vedic/natal/sun-sign
Returns the sidereal Sun sign (Surya Rashi) — the zodiac sign occupied by the Sun at the moment of birth. The sidereal Sun sign differs from the tropical (Western) Sun sign by roughly one sign due to the precession of equinoxes. In Vedic astrology the Sun sign indicates the native’s soul nature, authority, vitality, and relationship with the father.
The response includes the sign (English and Hindi), sign lord, element, quality, and the Sun’s exact sidereal longitude.
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. |
longitude | number | Yes | Signed decimal degrees, −180…180. Positive = East. |
timezone | string | Yes | IANA timezone identifier. |
name | string | No | Use /vedic/birth-details to retrieve. |
place | string | No | Use /vedic/birth-details to retrieve. |
ayanamsa | string | No | Default lahiri. Full list → |
Response shape
| Field | Type | Description |
|---|---|---|
| data.sun_sign | ||
sign | string | Sun sign in English (e.g. Taurus). |
sign_hindi | string | Hindi name (e.g. Vrishabha). |
sign_number | integer | 1 = Aries … 12 = Pisces. |
sign_lord | string | Ruling planet of the Sun sign. |
element | string | Fire, Earth, Air, or Water. |
quality | string | Movable, Fixed, or Dual. |
sun_longitude | number | Sun’s sidereal longitude (0–360). |
sun_longitude_dms | string | Same in D°M′S″ format. |
sun_degree_in_sign | number | Sun’s degree within the sign (0–30). |
sun_degree_in_sign_dms | string | Same in D°M′S″ format. |
Use cases
- Sidereal vs tropical comparison — show users how their Vedic Sun sign differs from their Western one.
- Sankranti tracking — the Sun’s sign ingress marks the start of a new solar month in the Hindu calendar.
- Profile cards — pair Sun sign, Moon sign, and Lagna for a three-point personality summary.
- Solar return — use the Sun’s exact degree to compute Varshphal (annual chart) timing.
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
- Moon Sign — the sidereal Moon sign
- Ascendant — the rising sign
- Planets — all 9 grahas with positional data
- Vedic Astrology overview — full category index