{
  "openapi": "3.1.0",
  "info": {
    "title": "Tara Nirnay Vedic Astrology API",
    "version": "1.0.0",
    "description": "Free, read-only Vedic astrology calculations from taranirnay.com: birth charts, Vimshottari dashas, Panchang, Tara Dasha Nirnay (Net Dasha Flow) and Timing of Events. Every chart result includes a chartLink that opens the full chart on taranirnay.com."
  },
  "servers": [
    {
      "url": "https://taranirnay.com"
    }
  ],
  "paths": {
    "/api/v1/place": {
      "get": {
        "operationId": "find_place",
        "summary": "Find a birth place",
        "description": "Look up a city to get its coordinates and timezone. Use it when a place name may be ambiguous, or to confirm the place before calculating.",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "description": "City name, optionally with region/country, e.g. \"Springfield, IL, US\"",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 120
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The request could not be answered as given, e.g. an ambiguous or unknown place. The message says what to ask the user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/chart": {
      "get": {
        "operationId": "get_birth_chart",
        "summary": "Vedic birth chart (Kundli)",
        "description": "Calculate a Vedic birth chart: ascendant and planets with sign, degree, nakshatra and pada, house, navamsha and retrograde status, the Panchang at birth, and the currently running Vimshottari dasha. Includes a chartLink to view it on taranirnay.com.",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": true,
            "description": "Birth date, YYYY-MM-DD",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "time",
            "in": "query",
            "required": true,
            "description": "Local birth time at the birth place, 24-hour HH:MM or HH:MM:SS",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,2}:\\d{2}(:\\d{2})?$"
            }
          },
          {
            "name": "place",
            "in": "query",
            "required": false,
            "description": "Birth city, optionally with region/country, e.g. \"Delhi\", \"London, GB\". Not needed if lat/lon are given.",
            "schema": {
              "type": "string",
              "maxLength": 120
            }
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "description": "Birth latitude (decimal degrees). Use with lon instead of place.",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            }
          },
          {
            "name": "lon",
            "in": "query",
            "required": false,
            "description": "Birth longitude (decimal degrees, east positive).",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          {
            "name": "tz",
            "in": "query",
            "required": false,
            "description": "IANA timezone such as Asia/Kolkata. Looked up automatically if omitted.",
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Optional name for the chart",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          },
          {
            "name": "ayanamsha",
            "in": "query",
            "required": false,
            "description": "Ayanamsha (default Raman, as on the website). Lahiri is the most common in India.",
            "schema": {
              "type": "string",
              "enum": [
                "Raman",
                "Lahiri",
                "TrueCitra",
                "KP",
                "Pushya",
                "SuryaSiddhanta",
                "UshaShashi",
                "Yukteshwar",
                "JNBhasin",
                "Fagan",
                "Deluce",
                "DjwhalKhul",
                "Aldebaran15",
                "GalCenter0",
                "Hipparchos",
                "Sassanian",
                "Tropical"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The request could not be answered as given, e.g. an ambiguous or unknown place. The message says what to ask the user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/dasha": {
      "get": {
        "operationId": "get_dasha_periods",
        "summary": "Vimshottari dasha periods",
        "description": "List Vimshottari Mahadasha periods with their Antardashas between a start date and a number of years ahead, and the dasha running today.",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": true,
            "description": "Birth date, YYYY-MM-DD",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "time",
            "in": "query",
            "required": true,
            "description": "Local birth time at the birth place, 24-hour HH:MM or HH:MM:SS",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,2}:\\d{2}(:\\d{2})?$"
            }
          },
          {
            "name": "place",
            "in": "query",
            "required": false,
            "description": "Birth city, optionally with region/country, e.g. \"Delhi\", \"London, GB\". Not needed if lat/lon are given.",
            "schema": {
              "type": "string",
              "maxLength": 120
            }
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "description": "Birth latitude (decimal degrees). Use with lon instead of place.",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            }
          },
          {
            "name": "lon",
            "in": "query",
            "required": false,
            "description": "Birth longitude (decimal degrees, east positive).",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          {
            "name": "tz",
            "in": "query",
            "required": false,
            "description": "IANA timezone such as Asia/Kolkata. Looked up automatically if omitted.",
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Optional name for the chart",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          },
          {
            "name": "ayanamsha",
            "in": "query",
            "required": false,
            "description": "Ayanamsha (default Raman, as on the website). Lahiri is the most common in India.",
            "schema": {
              "type": "string",
              "enum": [
                "Raman",
                "Lahiri",
                "TrueCitra",
                "KP",
                "Pushya",
                "SuryaSiddhanta",
                "UshaShashi",
                "Yukteshwar",
                "JNBhasin",
                "Fagan",
                "Deluce",
                "DjwhalKhul",
                "Aldebaran15",
                "GalCenter0",
                "Hipparchos",
                "Sassanian",
                "Tropical"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Start of the window, YYYY-MM-DD (default today)",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "years",
            "in": "query",
            "required": false,
            "description": "Years to cover (default 20)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 120
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The request could not be answered as given, e.g. an ambiguous or unknown place. The message says what to ask the user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tara-nirnay": {
      "get": {
        "operationId": "get_tara_nirnay",
        "summary": "Tara Dasha Nirnay (Net Dasha Flow)",
        "description": "Tara Nirnay's Net Dasha Flow: how favourable the running dasha periods are, from -100 to +100, weighted by transits. Returns the score now, the Mahadasha/Antardasha periods with their scores, a month-by-month score, the best windows and the hardest months. Use for \"how will the coming years be\" questions.",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": true,
            "description": "Birth date, YYYY-MM-DD",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "time",
            "in": "query",
            "required": true,
            "description": "Local birth time at the birth place, 24-hour HH:MM or HH:MM:SS",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,2}:\\d{2}(:\\d{2})?$"
            }
          },
          {
            "name": "place",
            "in": "query",
            "required": false,
            "description": "Birth city, optionally with region/country, e.g. \"Delhi\", \"London, GB\". Not needed if lat/lon are given.",
            "schema": {
              "type": "string",
              "maxLength": 120
            }
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "description": "Birth latitude (decimal degrees). Use with lon instead of place.",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            }
          },
          {
            "name": "lon",
            "in": "query",
            "required": false,
            "description": "Birth longitude (decimal degrees, east positive).",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          {
            "name": "tz",
            "in": "query",
            "required": false,
            "description": "IANA timezone such as Asia/Kolkata. Looked up automatically if omitted.",
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Optional name for the chart",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          },
          {
            "name": "ayanamsha",
            "in": "query",
            "required": false,
            "description": "Ayanamsha (default Raman, as on the website). Lahiri is the most common in India.",
            "schema": {
              "type": "string",
              "enum": [
                "Raman",
                "Lahiri",
                "TrueCitra",
                "KP",
                "Pushya",
                "SuryaSiddhanta",
                "UshaShashi",
                "Yukteshwar",
                "JNBhasin",
                "Fagan",
                "Deluce",
                "DjwhalKhul",
                "Aldebaran15",
                "GalCenter0",
                "Hipparchos",
                "Sassanian",
                "Tropical"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "First month of the window, YYYY-MM-DD (default this month)",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "months",
            "in": "query",
            "required": false,
            "description": "Months to cover (default 24)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 120
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The request could not be answered as given, e.g. an ambiguous or unknown place. The message says what to ask the user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/timing": {
      "get": {
        "operationId": "get_timing_of_events",
        "summary": "Timing of Events (Uttar)",
        "description": "Answer \"when\" questions with Tara Nirnay's Uttar method: best months for getting a job or career progress (job), gaining wealth (wealth), or a generally good period (goodTime). Returns the best windows and a month-by-month score. For marriage, moving abroad, health or anything else, use get_timing_of_custom_question.",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": true,
            "description": "Birth date, YYYY-MM-DD",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "time",
            "in": "query",
            "required": true,
            "description": "Local birth time at the birth place, 24-hour HH:MM or HH:MM:SS",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,2}:\\d{2}(:\\d{2})?$"
            }
          },
          {
            "name": "place",
            "in": "query",
            "required": false,
            "description": "Birth city, optionally with region/country, e.g. \"Delhi\", \"London, GB\". Not needed if lat/lon are given.",
            "schema": {
              "type": "string",
              "maxLength": 120
            }
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "description": "Birth latitude (decimal degrees). Use with lon instead of place.",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            }
          },
          {
            "name": "lon",
            "in": "query",
            "required": false,
            "description": "Birth longitude (decimal degrees, east positive).",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          {
            "name": "tz",
            "in": "query",
            "required": false,
            "description": "IANA timezone such as Asia/Kolkata. Looked up automatically if omitted.",
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Optional name for the chart",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          },
          {
            "name": "ayanamsha",
            "in": "query",
            "required": false,
            "description": "Ayanamsha (default Raman, as on the website). Lahiri is the most common in India.",
            "schema": {
              "type": "string",
              "enum": [
                "Raman",
                "Lahiri",
                "TrueCitra",
                "KP",
                "Pushya",
                "SuryaSiddhanta",
                "UshaShashi",
                "Yukteshwar",
                "JNBhasin",
                "Fagan",
                "Deluce",
                "DjwhalKhul",
                "Aldebaran15",
                "GalCenter0",
                "Hipparchos",
                "Sassanian",
                "Tropical"
              ]
            }
          },
          {
            "name": "question",
            "in": "query",
            "required": true,
            "description": "job, wealth or goodTime",
            "schema": {
              "type": "string",
              "enum": [
                "job",
                "wealth",
                "goodTime"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "First month to search, YYYY-MM-DD (default this month)",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "months",
            "in": "query",
            "required": false,
            "description": "Months to search (default 36)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 120
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The request could not be answered as given, e.g. an ambiguous or unknown place. The message says what to ask the user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/timing-method": {
      "get": {
        "operationId": "get_timing_method",
        "summary": "How Tara Nirnay scores and multipliers are made",
        "description": "Explains the method: how the Net Dasha Score and every transit multiplier (Ashtakavarga, Navtara, lordship) are calculated, every rule of the built-in job, wealth and good-time questions with its multiplier, and the rule format for custom questions (targets, reference types, relations, levels) with an example. Call it before designing a custom question or to explain results in depth.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The request could not be answered as given, e.g. an ambiguous or unknown place. The message says what to ask the user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/custom-timing": {
      "post": {
        "operationId": "get_timing_of_custom_question",
        "summary": "Timing of Events for a custom question",
        "description": "Timing of Events for any question you define with rules, in the format of the website's Custom Question Builder (see get_timing_method): e.g. marriage, travel abroad, property, children. Returns the best windows and month-by-month scores with every multiplier and the rules that applied, like get_timing_of_events.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "date": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "Birth date, YYYY-MM-DD"
                  },
                  "time": {
                    "type": "string",
                    "pattern": "^\\d{1,2}:\\d{2}(:\\d{2})?$",
                    "description": "Local birth time at the birth place, 24-hour HH:MM or HH:MM:SS"
                  },
                  "place": {
                    "description": "Birth city, optionally with region/country, e.g. \"Delhi\", \"London, GB\". Not needed if lat/lon are given.",
                    "type": "string",
                    "maxLength": 120
                  },
                  "lat": {
                    "description": "Birth latitude (decimal degrees). Use with lon instead of place.",
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90
                  },
                  "lon": {
                    "description": "Birth longitude (decimal degrees, east positive).",
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180
                  },
                  "tz": {
                    "description": "IANA timezone such as Asia/Kolkata. Looked up automatically if omitted.",
                    "type": "string",
                    "maxLength": 64
                  },
                  "name": {
                    "description": "Optional name for the chart",
                    "type": "string",
                    "maxLength": 80
                  },
                  "ayanamsha": {
                    "description": "Ayanamsha (default Raman, as on the website). Lahiri is the most common in India.",
                    "type": "string",
                    "enum": [
                      "Raman",
                      "Lahiri",
                      "TrueCitra",
                      "KP",
                      "Pushya",
                      "SuryaSiddhanta",
                      "UshaShashi",
                      "Yukteshwar",
                      "JNBhasin",
                      "Fagan",
                      "Deluce",
                      "DjwhalKhul",
                      "Aldebaran15",
                      "GalCenter0",
                      "Hipparchos",
                      "Sassanian",
                      "Tropical"
                    ]
                  },
                  "question": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80,
                        "description": "Short name, e.g. \"Marriage\""
                      },
                      "dashaRules": {
                        "default": [],
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "target": {
                              "type": "string",
                              "maxLength": 200,
                              "description": "Planet, \"Lord of 7th\", \"Lord of 7th from Moon\", \"DK\", \"MD Lord\", \"Benefic planets only\", \"D9 Lagna Lord\"..."
                            },
                            "level": {
                              "type": "string",
                              "enum": [
                                "MD",
                                "AD",
                                "PD",
                                "Both",
                                "Any",
                                "SD",
                                "PrD"
                              ],
                              "description": "MD, AD, PD, Both (MD or AD) or Any (MD, AD or PD)"
                            },
                            "multiplier": {
                              "type": "number",
                              "exclusiveMinimum": 0,
                              "maximum": 5,
                              "description": "Above 1 strengthens, below 1 weakens"
                            }
                          },
                          "required": [
                            "target",
                            "level",
                            "multiplier"
                          ]
                        }
                      },
                      "transitRules": {
                        "default": [],
                        "maxItems": 30,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "target": {
                              "type": "string",
                              "maxLength": 200,
                              "description": "Transiting planet or group, same names as dasha targets"
                            },
                            "relation": {
                              "type": "string",
                              "enum": [
                                "Occupying",
                                "House aspect",
                                "Vedha",
                                "Latta"
                              ],
                              "description": "Occupying; House aspect (houses only); Vedha or Latta (nakshatras and Sahamas)"
                            },
                            "referenceType": {
                              "type": "string",
                              "enum": [
                                "House in ascendant chart",
                                "House in moon chart",
                                "Nakshatra (SBC 28)",
                                "Nakshatra (27)",
                                "Rasi",
                                "Sahama"
                              ]
                            },
                            "referenceValue": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "maxLength": 120
                                }
                              ],
                              "description": "House 1-12; nakshatra counted from the birth star (1-28 SBC, 1-27); Rasi like \"7 (Libra)\" or \"Exalted\"/\"Own\"/...; Sahama name like \"Vivaha\""
                            },
                            "multiplier": {
                              "type": "number",
                              "exclusiveMinimum": 0,
                              "maximum": 5
                            }
                          },
                          "required": [
                            "target",
                            "relation",
                            "referenceType",
                            "referenceValue",
                            "multiplier"
                          ]
                        }
                      }
                    },
                    "required": [
                      "name"
                    ]
                  },
                  "from": {
                    "description": "First month to search, YYYY-MM-DD (default this month)",
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "months": {
                    "description": "Months to search (default 36)",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 120
                  }
                },
                "required": [
                  "date",
                  "time",
                  "question"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The request could not be answered as given, e.g. an ambiguous or unknown place. The message says what to ask the user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/panchang": {
      "get": {
        "operationId": "get_panchang",
        "summary": "Panchang",
        "description": "Panchang for a date, time and place: weekday, tithi, nakshatra, yoga, karana, Sun and Moon signs and the ascendant. Defaults to now.",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD (default today at the place)",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "time",
            "in": "query",
            "required": false,
            "description": "Local time HH:MM (default now at the place)",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,2}:\\d{2}(:\\d{2})?$"
            }
          },
          {
            "name": "place",
            "in": "query",
            "required": false,
            "description": "Birth city, optionally with region/country, e.g. \"Delhi\", \"London, GB\". Not needed if lat/lon are given.",
            "schema": {
              "type": "string",
              "maxLength": 120
            }
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "description": "Birth latitude (decimal degrees). Use with lon instead of place.",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            }
          },
          {
            "name": "lon",
            "in": "query",
            "required": false,
            "description": "Birth longitude (decimal degrees, east positive).",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          {
            "name": "tz",
            "in": "query",
            "required": false,
            "description": "IANA timezone such as Asia/Kolkata. Looked up automatically if omitted.",
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The request could not be answered as given, e.g. an ambiguous or unknown place. The message says what to ask the user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/chart-link": {
      "get": {
        "operationId": "get_chart_link",
        "summary": "Link to a chart on taranirnay.com",
        "description": "Build a link that opens taranirnay.com with this chart already calculated, optionally on a given tab (dasha, taranirnay, uttar...) and Timing of Events question.",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": true,
            "description": "Birth date, YYYY-MM-DD",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "time",
            "in": "query",
            "required": true,
            "description": "Local birth time at the birth place, 24-hour HH:MM or HH:MM:SS",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,2}:\\d{2}(:\\d{2})?$"
            }
          },
          {
            "name": "place",
            "in": "query",
            "required": false,
            "description": "Birth city, optionally with region/country, e.g. \"Delhi\", \"London, GB\". Not needed if lat/lon are given.",
            "schema": {
              "type": "string",
              "maxLength": 120
            }
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "description": "Birth latitude (decimal degrees). Use with lon instead of place.",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            }
          },
          {
            "name": "lon",
            "in": "query",
            "required": false,
            "description": "Birth longitude (decimal degrees, east positive).",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          {
            "name": "tz",
            "in": "query",
            "required": false,
            "description": "IANA timezone such as Asia/Kolkata. Looked up automatically if omitted.",
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Optional name for the chart",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          },
          {
            "name": "ayanamsha",
            "in": "query",
            "required": false,
            "description": "Ayanamsha (default Raman, as on the website). Lahiri is the most common in India.",
            "schema": {
              "type": "string",
              "enum": [
                "Raman",
                "Lahiri",
                "TrueCitra",
                "KP",
                "Pushya",
                "SuryaSiddhanta",
                "UshaShashi",
                "Yukteshwar",
                "JNBhasin",
                "Fagan",
                "Deluce",
                "DjwhalKhul",
                "Aldebaran15",
                "GalCenter0",
                "Hipparchos",
                "Sassanian",
                "Tropical"
              ]
            }
          },
          {
            "name": "tab",
            "in": "query",
            "required": false,
            "description": "Tab to open",
            "schema": {
              "type": "string",
              "enum": [
                "D1",
                "Panchang",
                "Ashtakavarga",
                "Strength",
                "Transit",
                "Awasthas",
                "Dasha",
                "TaraNirnay",
                "Uttar",
                "Yog"
              ]
            }
          },
          {
            "name": "question",
            "in": "query",
            "required": false,
            "description": "Opens the Uttar tab with this question",
            "schema": {
              "type": "string",
              "enum": [
                "job",
                "wealth",
                "goodTime"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The request could not be answered as given, e.g. an ambiguous or unknown place. The message says what to ask the user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      }
    }
  }
}