---
title: "Calculate yoga combinations"
method: POST
path: "/v1/astro/yoga"
tags: ["Astrology"]
---

# Calculate yoga combinations

`POST /v1/astro/yoga`

## Request

- Base URL: `https://api.asterwise.com`
- URL: `https://api.asterwise.com/v1/astro/yoga`
- Auth: HTTP bearer

Detects classical Vedic yogas in a natal chart, such as Pancha Mahapurusha, Raja, Gajakesari and Neecha Bhanga Raja Yoga. Others include Budhaditya, Chandra Mangala, Viparita Raja, Amala, and more. House lords are taken by whole sign from the lagna (so they are found at polar latitudes too) and aspects are full Parashari graha drishti only. Each detected yoga returns formation conditions, the classical texts it is drawn from, a modern summary, and keywords. When no birth time is given, yogas that depend on the lagna are marked needs_birth_time.

## Request body

- YogaRequest
  - `location` string, nullable: City name to resolve to lat/lon/tz automatically. Example: 'Mumbai' or 'New Delhi, India'. If provided, latitude, longitude and timezone are not required.
  - `name` string: Person name associated with the birth record
  - `date` string, required: Birth date in YYYY-MM-DD format
  - `time` string, nullable: Birth time in HH:MM 24-hour format. If omitted, sunrise chart is used as fallback.
  - `latitude` number, nullable: Latitude. Required if location not provided.
  - `longitude` number, nullable: Longitude. Required if location not provided.
  - `timezone` string, nullable: IANA timezone. Required if location not provided (unless utc_offset is given). For dates before the zone adopted a standard time, the birthplace's local mean time (longitude / 15 hours) is used.
  - `utc_offset` string, nullable: Optional explicit UTC offset of the birth time, as ±HH:MM or ±HH:MM:SS (e.g. '+04:51:31' for Bombay mean time). Overrides the offset `timezone` would give. Use it when the birth record states the offset, or for historical local times the IANA database cannot represent.
  - `ayanamsa` 'lahiri' | 'raman' | 'kp' | 'tropical': Sidereal ayanamsa mode used in calculations

## Response `200`

List of detected yoga combinations

- ApiResponseYogaEndpointResponse
  - `success` boolean: True if the request succeeded
  - `message` string: Human-readable status message
  - `data` YogaEndpointResponse, required
    - `yogas` YogaResult[], required
      - `yoga_name` string, required: Detected yoga name
      - `category` string, required: Yoga category bucket
      - `formation` string, required: Formation condition
      - `modern_summary` string, required: Modern interpretation summary
      - `keywords` string[]: Interpretation keywords
      - `classical_sources` ClassicalSource[]: Classical texts this yoga is drawn from (empty when the yoga comes from general tradition rather than a named text)
        - `text` string, required: Classical text
        - `section` string, nullable: Section of the text (topic, not an edition-dependent chapter number)
      - `needs_birth_time` boolean: True when this yoga depends on the lagna (houses or house lordship counted from the ascendant) and no birth time was given, so the result may change with the real birth time. Yogas read only from the Moon or from signs are never marked.
    - `birth_time_provided` boolean: Whether a precise birth time was provided. False when birth time was not supplied or treated as unknown — calculations using this field will have lagna-dependent accuracy limits.

## Other responses

- `401`: Authentication failed
- `403`: Authorization failed
- `404`: Resource not found
- `413`: Payload too large
- `422`: Validation error
- `429`: Rate limit exceeded
- `500`: Internal error
- `502`: Upstream provider error
- `503`: Service unavailable

---

[API](https://skmtc.dev/asterwise/apis/asterwise-api.md) · [All operations](https://skmtc.dev/asterwise/apis/asterwise-api/llms.txt) · [OpenAPI document](https://skmtc.dev/asterwise/apis/asterwise-api/revisions/3c4bbb1194e2?raw)
