Skip to content
POST/api/panchpakshi/1 credit

Pancha Pakshi

Pancha Pakshi is a South Indian timing system that assigns every person one of five birds — vulture, owl, crow, cock or peacock — and divides the day into ten periods called yamas, five between sunrise and sunset and five between sunset and the next sunrise. In the full tradition each bird passes through five states of activity (ruling, eating, walking, sleeping and dying) across those periods, and work is timed to the periods when your own bird is strong. This endpoint returns the two inputs that scheme is built on: the yama boundaries for a given day and place, and the birth bird for a given moment. `datetime`, `latitude`, `longitude` and `timezone_as_float` set the day and the place. `fixed` chooses how the day is divided: false uses real local sunrise and sunset, so daytime and nighttime yamas have different lengths and shift through the year; true uses a flat 06:00 to 18:00 day, which gives ten equal 2 hour 24 minute periods and is what the traditional tables assume. The response is `{yamas, birth panchpakshi}`. `yamas` has `daytime` and `nighttime`, each a list of five `{start, end}` local timestamps in 'YYYY-MM-DD HH:MM:SS' form. `birth panchpakshi` is a single string, one of Vulture, Owl, Crow, Cock or Peacock, derived from the Moon's nakshatra group at that instant together with the paksha: the same nakshatra group yields a different bird in the waxing and waning fortnights, except for the middle group, which gives Crow in both.

https://yogataraapi.prahlad.app/api/panchpakshi/
Test Request

Authentication

Send your key in the X-API-Key header. Keys are server-side credentials — never put one in browser JavaScript or a mobile app.

X-API-Key: yt_live_a1b2c3d4_…
Content-Type: application/json

Request fields

FieldTypeRequiredNotes
datetimestring (date-time)required

The moment to calculate for, ISO 8601. ALWAYS include an offset or a trailing Z - a value with no zone is read as Asia/Kolkata (UTC+05:30), not UTC. Same meaning as date_time, which other endpoints call the same thing by a different name.

fixedbooleanrequired
latitudenumber (double)required

Latitude of the place, in decimal degrees. Positive is north, negative is south. Example: 26.9124 for Jaipur, 40.7128 for New York. Minutes and seconds are not accepted - convert first.

min -90 · max 90

longitudenumber (double)required

Longitude of the place, in decimal degrees. Positive is east, negative is west. Example: 75.7873 for Jaipur, -74.0060 for New York. Note the sign: a missing minus puts New York in China.

min -180 · max 180

timezone_as_floatnumber (double)required

UTC offset of the place, in hours, as a decimal. Example: 5.5 for India (UTC+05:30), -5 for New York in winter, 5.75 for Nepal. This is NOT validated against date_time - if the two disagree you get a successful response for the wrong moment, so derive both from the same source. Use the offset in force on that date, not today's: a summer birth in a country with daylight saving needs the summer offset.

min -12 · max 14

nakshatrasstringoptional
special

DEAD PARAMETER at the HTTP layer - PanchpakshiView calls get_birth_panchpakshi(date_time=... only. In the engine the only meaningful value is the literal 'special', which selects the 28-entry nakshatras_special table over the default 27-entry one.

Example request

curl -X POST https://yogataraapi.prahlad.app/api/panchpakshi/ \
  -H "X-API-Key: $OCCULT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fixed":true,"datetime":"2024-11-21T09:39:20.910Z","latitude":26.1046,"longitude":74.319,"timezone_as_float":5.5}'

Response

{
  "data": {
    "yamas": {
      "daytime": [
        {
          "start": "2024-11-21 06:00:00",
          "end": "2024-11-21 08:24:00"
        },
        {
          "start": "2024-11-21 08:24:00",
          "end": "2024-11-21 10:48:00"
        },
        {
          "start": "2024-11-21 10:48:00",
          "end": "2024-11-21 13:12:00"
        },
        {
          "start": "2024-11-21 13:12:00",
          "end": "2024-11-21 15:36:00"
        },
        {
          "start": "2024-11-21 15:36:00",
          "end": "2024-11-21 18:00:00"
        }
      ],
      "nighttime": [
        {
          "start": "2024-11-21 18:00:00",
          "end": "2024-11-21 20:24:00"
        },
        {
          "start": "2024-11-21 20:24:00",
          "end": "2024-11-21 22:48:00"
        },
        {
          "start": "2024-11-21 22:48:00",
          "end": "2024-11-22 01:12:00"
        },
        {
          "start": "2024-11-22 01:12:00",
          "end": "2024-11-22 03:36:00"
        },
        {
          "start": "2024-11-22 03:36:00",
          "end": "2024-11-22 06:00:00"
        }
      ]
    },
    "birth panchpakshi": "Cock"
  },
  "message": "successful",
  "is_error": false
}

Captured from a real call using the exact request above. Results sit under data.

Errors

Metering errors return { "error": "…", "message": "<code>", "is_error": true }. Show error to people and branch on message. See the error reference.