{
  "openapi": "3.1.0",
  "info": {
    "title": "Astro Timing API",
    "version": "1.0.0",
    "summary": "Moon, planets, panchang and timing data as JSON.",
    "description": "Free, read-only and calculated with Astronomy Engine. Attribution required: link to Astro Timing wherever you show the data. Fair use; API keys arrive with launch. Calculations describe the sky; they are not predictions.",
    "license": {
      "name": "CC BY 4.0 (data)",
      "identifier": "CC-BY-4.0"
    },
    "contact": {
      "name": "Astro Timing",
      "url": "https://whenstar.com/developers/"
    }
  },
  "servers": [
    {
      "url": "https://whenstar.com"
    }
  ],
  "externalDocs": {
    "url": "https://whenstar.com/developers/",
    "description": "Quick start, field guide and terms"
  },
  "paths": {
    "/api/v1/moon": {
      "get": {
        "operationId": "moon",
        "summary": "Moon phase, illumination, lunar day and sign",
        "parameters": [
          {
            "in": "query",
            "name": "date",
            "required": false,
            "description": "Instant with explicit UTC offset, 1900–2100. Defaults to now.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calculated result",
            "headers": {
              "Cache-Control": {
                "description": "public, max-age=60, s-maxage=300 for \"now\" requests; s-maxage=86400 when a date is given",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Moon"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters. The body explains which one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/positions": {
      "get": {
        "operationId": "positions",
        "summary": "Geocentric positions of the Sun through Pluto, nodes and Lilith in both zodiacs",
        "parameters": [
          {
            "in": "query",
            "name": "date",
            "required": false,
            "description": "Instant with explicit UTC offset, 1900–2100. Defaults to now.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calculated result",
            "headers": {
              "Cache-Control": {
                "description": "public, max-age=60, s-maxage=300 for \"now\" requests; s-maxage=86400 when a date is given",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Positions"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters. The body explains which one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/retrograde": {
      "get": {
        "operationId": "retrograde",
        "summary": "Mercury retrograde periods with shadow dates for a year",
        "parameters": [
          {
            "in": "query",
            "name": "year",
            "required": false,
            "description": "Calendar year. Defaults to the current year.",
            "schema": {
              "type": "integer",
              "minimum": 1901,
              "maximum": 2098
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calculated result",
            "headers": {
              "Cache-Control": {
                "description": "public, max-age=3600, s-maxage=86400",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Retrograde"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters. The body explains which one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/panchang": {
      "get": {
        "operationId": "panchang",
        "summary": "The five limbs of the day from local sunrise, plus Rahu kaal and the daily windows",
        "parameters": [
          {
            "in": "query",
            "name": "date",
            "required": false,
            "description": "Local civil date. Defaults to today in tz.",
            "schema": {
              "type": "string",
              "format": "date",
              "examples": [
                "2026-10-12"
              ]
            }
          },
          {
            "in": "query",
            "name": "city",
            "required": false,
            "description": "City name from the offline GeoNames directory (cities over 15,000 people), optionally \",CC\" for the country, or a GeoNames id. Use instead of lat, lon and tz.",
            "schema": {
              "type": "string",
              "examples": [
                "Mumbai",
                "Springfield,US",
                "1275339"
              ]
            }
          },
          {
            "in": "query",
            "name": "lat",
            "required": false,
            "description": "Latitude, north positive.",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            }
          },
          {
            "in": "query",
            "name": "lon",
            "required": false,
            "description": "Longitude, east positive.",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          {
            "in": "query",
            "name": "tz",
            "required": false,
            "description": "IANA time zone for local dates and sunrise.",
            "schema": {
              "type": "string",
              "examples": [
                "Asia/Kolkata"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calculated result",
            "headers": {
              "Cache-Control": {
                "description": "public, max-age=60, s-maxage=300 for \"now\" requests; s-maxage=86400 when a date is given",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Panchang"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters. The body explains which one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/today": {
      "get": {
        "operationId": "today",
        "summary": "A compact summary of today's sky for a city",
        "parameters": [
          {
            "in": "query",
            "name": "city",
            "required": false,
            "description": "City name from the offline GeoNames directory (cities over 15,000 people), optionally \",CC\" for the country, or a GeoNames id. Use instead of lat, lon and tz.",
            "schema": {
              "type": "string",
              "examples": [
                "Mumbai",
                "Springfield,US",
                "1275339"
              ]
            }
          },
          {
            "in": "query",
            "name": "lat",
            "required": false,
            "description": "Latitude, north positive.",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            }
          },
          {
            "in": "query",
            "name": "lon",
            "required": false,
            "description": "Longitude, east positive.",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          {
            "in": "query",
            "name": "tz",
            "required": false,
            "description": "IANA time zone for local dates and sunrise.",
            "schema": {
              "type": "string",
              "examples": [
                "Asia/Kolkata"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calculated result",
            "headers": {
              "Cache-Control": {
                "description": "public, max-age=60, s-maxage=300",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Today"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters. The body explains which one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lunations": {
      "get": {
        "operationId": "lunations",
        "summary": "Every new and full moon in a year",
        "parameters": [
          {
            "in": "query",
            "name": "year",
            "required": false,
            "description": "Calendar year (UTC). Defaults to the current year.",
            "schema": {
              "type": "integer",
              "minimum": 1900,
              "maximum": 2099
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calculated result",
            "headers": {
              "Cache-Control": {
                "description": "public, max-age=3600, s-maxage=86400",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lunations"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters. The body explains which one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/eclipses": {
      "get": {
        "operationId": "eclipses",
        "summary": "Solar and lunar eclipses in a year",
        "parameters": [
          {
            "in": "query",
            "name": "year",
            "required": false,
            "description": "Calendar year (UTC). Defaults to the current year.",
            "schema": {
              "type": "integer",
              "minimum": 1900,
              "maximum": 2099
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calculated result",
            "headers": {
              "Cache-Control": {
                "description": "public, max-age=3600, s-maxage=86400",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Eclipses"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters. The body explains which one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/best-days": {
      "get": {
        "operationId": "bestDays",
        "summary": "Days ranked by the disclosed pin-a-date factors for a goal",
        "description": "Editorial scoring with published weights, not a personalised muhurta. Dates must fall inside the precomputed range reported in the response (about a month back to two years ahead of the last deploy).",
        "parameters": [
          {
            "in": "query",
            "name": "goal",
            "required": true,
            "description": "What the day is for.",
            "schema": {
              "type": "string",
              "enum": [
                "reflection",
                "creativity",
                "contracts",
                "launch",
                "love",
                "money",
                "travel"
              ]
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "description": "First date (UTC). Defaults to today.",
            "schema": {
              "type": "string",
              "format": "date",
              "examples": [
                "2026-10-12"
              ]
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "description": "Last date (UTC), at most 92 days after from. Defaults to from + 30.",
            "schema": {
              "type": "string",
              "format": "date",
              "examples": [
                "2026-10-12"
              ]
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "How many ranked days to return.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 92,
              "default": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calculated result",
            "headers": {
              "Cache-Control": {
                "description": "public, max-age=3600, s-maxage=86400",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BestDays"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters. The body explains which one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/chart": {
      "post": {
        "operationId": "chart",
        "summary": "Birth chart for an instant and place (server-side; the website calculators never call this)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "date",
                  "latitude",
                  "longitude"
                ],
                "additionalProperties": false,
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Explicit UTC offset required, 1900–2100."
                  },
                  "latitude": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90
                  },
                  "longitude": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Chart",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters. The body explains which one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload exceeds 2048 bytes"
          },
          "415": {
            "description": "Content type must be application/json"
          }
        }
      }
    },
    "/api/v1/yogas": {
      "post": {
        "operationId": "yogas",
        "summary": "Vedic yoga rule matches from birth inputs",
        "description": "Server-side alternative. No application persistence; no-store. Birth instant requires an explicit offset; unknownTime does not change the supplied instant.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "date",
                  "latitude",
                  "longitude"
                ],
                "additionalProperties": false,
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Explicit UTC offset required, 1900–2100."
                  },
                  "latitude": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90
                  },
                  "longitude": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180
                  },
                  "unknownTime": {
                    "type": "boolean",
                    "default": false,
                    "description": "If true, dates are approximate and lagna-dependent yogas are hidden. Supply local noon with an explicit offset when time is unknown."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculated result",
            "headers": {
              "Cache-Control": {
                "description": "no-store",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Yogas"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters. The body explains which one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Use POST"
          },
          "413": {
            "description": "Payload exceeds 2048 bytes"
          },
          "415": {
            "description": "Use application/json"
          }
        },
        "parameters": [
          {
            "name": "all",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1
              ],
              "default": 0
            },
            "description": "1 returns all 108 patterns. The default shows formed patterns only. Null formation means not assessed, not disproved."
          }
        ]
      }
    },
    "/api/v1/dasha": {
      "post": {
        "operationId": "dasha",
        "summary": "Vimshottari maha and antar timeline from birth inputs",
        "description": "Server-side alternative. No application persistence; no-store. Birth instant requires an explicit offset; unknownTime does not change the supplied instant.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "date",
                  "latitude",
                  "longitude"
                ],
                "additionalProperties": false,
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Explicit UTC offset required, 1900–2100."
                  },
                  "latitude": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90
                  },
                  "longitude": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180
                  },
                  "unknownTime": {
                    "type": "boolean",
                    "default": false,
                    "description": "If true, dates are approximate and lagna-dependent yogas are hidden. Supply local noon with an explicit offset when time is unknown."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculated result",
            "headers": {
              "Cache-Control": {
                "description": "no-store",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dasha"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters. The body explains which one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Use POST"
          },
          "413": {
            "description": "Payload exceeds 2048 bytes"
          },
          "415": {
            "description": "Use application/json"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        }
      },
      "Attribution": {
        "type": "object",
        "required": [
          "text",
          "url"
        ],
        "properties": {
          "text": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "description": "Show this link next to anything you display from the API."
      },
      "Moon": {
        "type": "object",
        "required": [
          "date",
          "phase",
          "illumination",
          "tithi",
          "waxing",
          "sign"
        ],
        "properties": {
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "phase": {
            "type": "number",
            "description": "Moon–Sun elongation in degrees, 0 = new, 180 = full."
          },
          "illumination": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "tithi": {
            "type": "integer",
            "minimum": 1,
            "maximum": 30
          },
          "waxing": {
            "type": "boolean"
          },
          "sign": {
            "type": "string",
            "enum": [
              "Aries",
              "Taurus",
              "Gemini",
              "Cancer",
              "Leo",
              "Virgo",
              "Libra",
              "Scorpio",
              "Sagittarius",
              "Capricorn",
              "Aquarius",
              "Pisces"
            ],
            "description": "Tropical sign of the Moon."
          },
          "nextNew": {
            "type": "string",
            "format": "date-time"
          },
          "nextFull": {
            "type": "string",
            "format": "date-time"
          },
          "attribution": {
            "$ref": "#/components/schemas/Attribution"
          }
        }
      },
      "Positions": {
        "type": "object",
        "required": [
          "date",
          "positions"
        ],
        "properties": {
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "positions": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "longitude": {
                  "type": "number"
                },
                "siderealLongitude": {
                  "type": "number"
                },
                "tropical": {
                  "type": "object",
                  "properties": {
                    "sign": {
                      "type": "string",
                      "enum": [
                        "Aries",
                        "Taurus",
                        "Gemini",
                        "Cancer",
                        "Leo",
                        "Virgo",
                        "Libra",
                        "Scorpio",
                        "Sagittarius",
                        "Capricorn",
                        "Aquarius",
                        "Pisces"
                      ]
                    },
                    "degree": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 30
                    }
                  }
                },
                "sidereal": {
                  "type": "object",
                  "properties": {
                    "sign": {
                      "type": "string",
                      "enum": [
                        "Aries",
                        "Taurus",
                        "Gemini",
                        "Cancer",
                        "Leo",
                        "Virgo",
                        "Libra",
                        "Scorpio",
                        "Sagittarius",
                        "Capricorn",
                        "Aquarius",
                        "Pisces"
                      ]
                    },
                    "degree": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 30
                    }
                  }
                },
                "speed": {
                  "type": "number",
                  "description": "Degrees per day; negative means retrograde."
                },
                "retrograde": {
                  "type": "boolean"
                }
              }
            }
          },
          "attribution": {
            "$ref": "#/components/schemas/Attribution"
          }
        }
      },
      "Retrograde": {
        "type": "object",
        "required": [
          "year",
          "body",
          "periods"
        ],
        "properties": {
          "year": {
            "type": "integer"
          },
          "body": {
            "type": "string",
            "const": "Mercury"
          },
          "periods": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "start": {
                  "type": "string",
                  "format": "date-time"
                },
                "end": {
                  "type": "string",
                  "format": "date-time"
                },
                "shadowStart": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "shadowEnd": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "from": {
                  "type": "object",
                  "properties": {
                    "sign": {
                      "type": "string",
                      "enum": [
                        "Aries",
                        "Taurus",
                        "Gemini",
                        "Cancer",
                        "Leo",
                        "Virgo",
                        "Libra",
                        "Scorpio",
                        "Sagittarius",
                        "Capricorn",
                        "Aquarius",
                        "Pisces"
                      ]
                    },
                    "degree": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 30
                    }
                  }
                },
                "to": {
                  "type": "object",
                  "properties": {
                    "sign": {
                      "type": "string",
                      "enum": [
                        "Aries",
                        "Taurus",
                        "Gemini",
                        "Cancer",
                        "Leo",
                        "Virgo",
                        "Libra",
                        "Scorpio",
                        "Sagittarius",
                        "Capricorn",
                        "Aquarius",
                        "Pisces"
                      ]
                    },
                    "degree": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 30
                    }
                  }
                }
              }
            }
          },
          "attribution": {
            "$ref": "#/components/schemas/Attribution"
          }
        }
      },
      "Place": {
        "type": "object",
        "required": [
          "lat",
          "lon",
          "tz"
        ],
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "geonameId": {
            "type": [
              "string",
              "null"
            ]
          },
          "lat": {
            "type": "number"
          },
          "lon": {
            "type": "number"
          },
          "tz": {
            "type": "string"
          }
        }
      },
      "Panchang": {
        "type": "object",
        "required": [
          "day",
          "place",
          "tithi",
          "nakshatra",
          "yoga",
          "karana",
          "vara"
        ],
        "properties": {
          "day": {
            "type": "string",
            "format": "date",
            "examples": [
              "2026-10-12"
            ]
          },
          "place": {
            "$ref": "#/components/schemas/Place"
          },
          "sunrise": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "sunset": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "vara": {
            "type": "string"
          },
          "tithi": {
            "type": "object",
            "properties": {
              "number": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "paksha": {
                "type": "string",
                "enum": [
                  "Shukla",
                  "Krishna"
                ]
              }
            }
          },
          "tithis": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "end": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "nakshatra": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "pada": {
                "type": "integer"
              },
              "lord": {
                "type": "string"
              }
            }
          },
          "nakshatras": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "end": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "yoga": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "end": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "karana": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "end": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "windows": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "rahu": {
                "type": "object",
                "required": [
                  "start",
                  "end"
                ],
                "properties": {
                  "start": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "end": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              "yamaganda": {
                "type": "object",
                "required": [
                  "start",
                  "end"
                ],
                "properties": {
                  "start": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "end": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              "gulika": {
                "type": "object",
                "required": [
                  "start",
                  "end"
                ],
                "properties": {
                  "start": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "end": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              "abhijit": {
                "type": "object",
                "required": [
                  "start",
                  "end"
                ],
                "properties": {
                  "start": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "end": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              "brahma": {
                "type": "object",
                "required": [
                  "start",
                  "end"
                ],
                "properties": {
                  "start": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "end": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              }
            }
          },
          "polar": {
            "type": "boolean"
          },
          "attribution": {
            "$ref": "#/components/schemas/Attribution"
          }
        }
      },
      "Today": {
        "type": "object",
        "required": [
          "day",
          "place",
          "moon",
          "panchang",
          "mercury",
          "next"
        ],
        "properties": {
          "day": {
            "type": "string",
            "format": "date",
            "examples": [
              "2026-10-12"
            ]
          },
          "place": {
            "$ref": "#/components/schemas/Place"
          },
          "moon": {
            "type": "object",
            "properties": {
              "phase": {
                "type": "string"
              },
              "angle": {
                "type": "number",
                "description": "Moon–Sun elongation in degrees."
              },
              "illumination": {
                "type": "number"
              },
              "tropicalSign": {
                "type": "string",
                "enum": [
                  "Aries",
                  "Taurus",
                  "Gemini",
                  "Cancer",
                  "Leo",
                  "Virgo",
                  "Libra",
                  "Scorpio",
                  "Sagittarius",
                  "Capricorn",
                  "Aquarius",
                  "Pisces"
                ]
              },
              "siderealSign": {
                "type": "string",
                "enum": [
                  "Aries",
                  "Taurus",
                  "Gemini",
                  "Cancer",
                  "Leo",
                  "Virgo",
                  "Libra",
                  "Scorpio",
                  "Sagittarius",
                  "Capricorn",
                  "Aquarius",
                  "Pisces"
                ]
              },
              "nakshatra": {
                "type": "string"
              }
            }
          },
          "panchang": {
            "type": "object",
            "properties": {
              "tithi": {
                "type": "string"
              },
              "paksha": {
                "type": "string"
              },
              "nakshatra": {
                "type": "string"
              },
              "yoga": {
                "type": "string"
              },
              "karana": {
                "type": "string"
              },
              "vara": {
                "type": "string"
              },
              "sunrise": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "sunset": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "rahuKaal": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "start",
                      "end"
                    ],
                    "properties": {
                      "start": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "end": {
                        "type": "string",
                        "format": "date-time"
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "mercury": {
            "type": "object",
            "properties": {
              "retrograde": {
                "type": "boolean"
              }
            }
          },
          "next": {
            "type": "object",
            "properties": {
              "newMoon": {
                "type": "string",
                "format": "date-time"
              },
              "fullMoon": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "attribution": {
            "$ref": "#/components/schemas/Attribution"
          }
        }
      },
      "Lunations": {
        "type": "object",
        "required": [
          "year",
          "lunations"
        ],
        "properties": {
          "year": {
            "type": "integer"
          },
          "lunations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "New",
                    "Full"
                  ]
                },
                "date": {
                  "type": "string",
                  "format": "date-time"
                },
                "sign": {
                  "type": "string",
                  "enum": [
                    "Aries",
                    "Taurus",
                    "Gemini",
                    "Cancer",
                    "Leo",
                    "Virgo",
                    "Libra",
                    "Scorpio",
                    "Sagittarius",
                    "Capricorn",
                    "Aquarius",
                    "Pisces"
                  ]
                },
                "siderealSign": {
                  "type": "string",
                  "enum": [
                    "Aries",
                    "Taurus",
                    "Gemini",
                    "Cancer",
                    "Leo",
                    "Virgo",
                    "Libra",
                    "Scorpio",
                    "Sagittarius",
                    "Capricorn",
                    "Aquarius",
                    "Pisces"
                  ]
                },
                "longitude": {
                  "type": "number"
                }
              }
            }
          },
          "attribution": {
            "$ref": "#/components/schemas/Attribution"
          }
        }
      },
      "Eclipses": {
        "type": "object",
        "required": [
          "year",
          "eclipses"
        ],
        "properties": {
          "year": {
            "type": "integer"
          },
          "eclipses": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "Solar",
                    "Lunar"
                  ]
                },
                "kind": {
                  "type": "string"
                },
                "date": {
                  "type": "string",
                  "format": "date-time"
                },
                "obscuration": {
                  "type": "number"
                },
                "latitude": {
                  "type": "number"
                },
                "longitude": {
                  "type": "number"
                }
              }
            }
          },
          "attribution": {
            "$ref": "#/components/schemas/Attribution"
          }
        }
      },
      "BestDays": {
        "type": "object",
        "required": [
          "goal",
          "from",
          "to",
          "days"
        ],
        "properties": {
          "goal": {
            "type": "string"
          },
          "from": {
            "type": "string",
            "format": "date",
            "examples": [
              "2026-10-12"
            ]
          },
          "to": {
            "type": "string",
            "format": "date",
            "examples": [
              "2026-10-12"
            ]
          },
          "range": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "format": "date",
                "examples": [
                  "2026-10-12"
                ]
              },
              "to": {
                "type": "string",
                "format": "date",
                "examples": [
                  "2026-10-12"
                ]
              }
            }
          },
          "method": {
            "type": "string",
            "format": "uri"
          },
          "days": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string",
                  "format": "date",
                  "examples": [
                    "2026-10-12"
                  ]
                },
                "score": {
                  "type": "integer"
                },
                "factors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string"
                      },
                      "points": {
                        "type": "integer"
                      },
                      "text": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "excluded": {
            "type": "integer",
            "description": "Days skipped (rikta tithi, new-moon day, or within three days of an eclipse)."
          },
          "attribution": {
            "$ref": "#/components/schemas/Attribution"
          }
        }
      },
      "Yogas": {
        "type": "object",
        "required": [
          "approximate",
          "summary",
          "yogas"
        ],
        "properties": {
          "approximate": {
            "type": "boolean"
          },
          "summary": {
            "type": "object",
            "required": [
              "total",
              "text",
              "strong",
              "present",
              "weakened",
              "cancelled"
            ],
            "properties": {
              "total": {
                "type": "integer"
              },
              "text": {
                "type": "string"
              },
              "overview": {
                "type": "string"
              },
              "strong": {
                "type": "integer"
              },
              "present": {
                "type": "integer"
              },
              "weakened": {
                "type": "integer"
              },
              "cancelled": {
                "type": "integer"
              }
            }
          },
          "yogas": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name",
                "url",
                "status",
                "meaning",
                "formation",
                "cancellation",
                "qualification",
                "confirmed",
                "note"
              ],
              "properties": {
                "name": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "strong",
                    "present",
                    "weakened",
                    "cancelled",
                    "absent"
                  ],
                  "description": "Strong requires a matched own/exalted sign condition. Absent means no assessed match; check formation for false versus null."
                },
                "meaning": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                },
                "devanagari": {
                  "type": "string"
                },
                "group": {
                  "type": "string"
                },
                "planets": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "sign": {
                        "type": "string"
                      },
                      "house": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      }
                    }
                  }
                },
                "formation": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "cancellation": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "qualification": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "confirmed": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "note": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Dasha": {
        "type": "object",
        "required": [
          "approximate",
          "periods",
          "yearDays",
          "asOf"
        ],
        "properties": {
          "approximate": {
            "type": "boolean"
          },
          "asOf": {
            "type": "string",
            "format": "date-time"
          },
          "yearDays": {
            "type": "number",
            "const": 365.2425
          },
          "timezone": {
            "type": "string",
            "const": "UTC"
          },
          "periods": {
            "type": "array",
            "minItems": 10,
            "maxItems": 10,
            "items": {
              "type": "object",
              "required": [
                "lord",
                "start",
                "end",
                "url",
                "current"
              ],
              "properties": {
                "lord": {
                  "type": "string"
                },
                "start": {
                  "type": "string",
                  "format": "date-time"
                },
                "end": {
                  "type": "string",
                  "format": "date-time"
                },
                "url": {
                  "type": "string"
                },
                "current": {
                  "type": "boolean"
                },
                "subperiods": {
                  "type": "array",
                  "minItems": 9,
                  "maxItems": 9,
                  "items": {
                    "type": "object",
                    "required": [
                      "lord",
                      "start",
                      "end",
                      "url",
                      "current"
                    ],
                    "properties": {
                      "lord": {
                        "type": "string"
                      },
                      "start": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "end": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "url": {
                        "type": "string"
                      },
                      "current": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}