A panchang API returns the Hindu calendar for one date at one place. You send a date, a latitude, a longitude and a time zone. You get back the five parts of the day. They are the tithi (lunar day), the nakshatra (the Moon's star group), the yoga, the karana and the vara (weekday). You also get sunrise and sunset, rahu kaal and the choghadiya. Rahu kaal is a daily window that tradition avoids for new starts. The choghadiya splits the daytime into eight slices, and each one is marked good, neutral or best avoided.

Every one of these values depends on the city. The Hindu day starts at sunrise, and the Sun rises at a different moment in each place. So the parts running at sunrise can differ, and every window is cut from that city's own daylight.

Here is a real case. We asked our API for New York and Los Angeles on Monday, Oct 26, 2026. New York's day opens in the Ashwini nakshatra. Los Angeles opens in Bharani, because Ashwini ended before the Sun rose there. Rahu kaal starts at 8:39 AM in New York and 8:29 AM in Los Angeles. In real time, those two windows start 2 hours 50 minutes apart.

Below are both answers side by side, a month of measured differences, and code that puts one city's panchang on a page.

What a daily panchang holds

This is what GET /v1/panchang/daily returned for New York on Oct 26, 2026. Times are local and cut to the minute. The API gives seconds.

Part

What it is

New York, Oct 26, 2026

Tithi

The lunar day: one step of 12° the Moon gains on the Sun

Pratipada, the 1st day of the waning half, until 9:32 PM

Nakshatra

Which of the 27 star groups the Moon is in

Ashwini, until 8:11 AM

Yoga

One of 27 steps, from the Sun's and Moon's positions added together

Siddhi, until 1:23 AM on Oct 27

Karana

Half a tithi

Balava, until 10:54 AM

Vara

The weekday and its planet

Monday, ruled by the Moon

Sunrise and sunset

Where the day starts and the daylight ends

7:19 AM and 5:59 PM

Rahu kaal

One eighth of the daylight, picked by the weekday

8:39 AM to 9:59 AM

Choghadiya

The daylight in 8 slices and the night in 8 more

First slice: Amrit, 7:19 AM to 8:39 AM

The answer also holds moonrise, the lunar month, horas (planetary hours) and the night choghadiya. It lists two more windows kept free of new starts, yamaganda and gulika kaal. Each part has a start and an end time, because most of them change during the day.

Why every value depends on the city

In the Hindu calendar, a day runs from one sunrise to the next (PA-04). So the API reads the day at sunrise. The tithi of a date is the one running when the Sun comes up, not the one running at midnight.

The tithi, nakshatra, yoga and karana are set by the Sun and the Moon alone. Each one ends at the same moment everywhere on Earth. On Oct 26, Pratipada ended at 9:32 PM in New York and at 6:32 PM in Los Angeles. That is one moment on two clocks. What changes from city to city is which part is running when your Sun rises.

The windows depend on the city even more. For rahu kaal, the time from sunrise to sunset is cut into eight equal parts. The weekday picks one of them (PA-09). On a Monday it is the 2nd part. The day choghadiya cuts the same daylight into eight slices. The first slice belongs to the weekday's planet, and the rest follow a fixed order of planets (MU-03). On a Monday the day opens with Amrit, the Moon's slice. A later sunrise or a longer day moves every one of these times.

New York and Los Angeles on the same date

Here are the two answers for Monday, Oct 26, 2026, from the same endpoint. Each time is on that city's own clock: EDT for New York and PDT for Los Angeles.

Oct 26, 2026

New York

Los Angeles

Sunrise

7:19 AM

7:07 AM

Sunset

5:59 PM

6:05 PM

Daylight

10 h 40 min

10 h 58 min

Tithi at sunrise

Pratipada

Pratipada

Tithi ends

9:32 PM, 3 h 32 min after sunset

6:32 PM, 26 min after sunset

Nakshatra at sunrise

Ashwini, until 8:11 AM

Bharani, since 5:11 AM

Yoga at sunrise

Siddhi

Siddhi

Karana at sunrise

Balava, until 10:54 AM

Balava, until 7:54 AM

Rahu kaal

8:39 AM to 9:59 AM (80 min)

8:29 AM to 9:52 AM (82 min)

First choghadiya

Amrit, 7:19 AM to 8:39 AM

Amrit, 7:07 AM to 8:29 AM

Two day timelines for Oct 26, 2026: in New York the Ashwini nakshatra ends after sunrise and rahu kaal runs 8:39 to 9:59 AM; in Los Angeles Ashwini ended before sunrise and rahu kaal runs 8:29 to 9:52 AM

Three rows matter most for a page.

The nakshatra. Ashwini ended at 8:11 AM in New York, which is 5:11 AM in Los Angeles. New York's Sun rose 52 minutes before that change. In Los Angeles, the Sun rose almost 2 hours after it. So the two cities show different nakshatras for the same date.

Rahu kaal. On the clock, the two windows start about 10 minutes apart. Los Angeles has 18 more minutes of daylight, so each eighth runs about 2 minutes longer. In real time, Los Angeles's window starts 2 hours 50 minutes after New York's. A page that shows New York's times to a reader in Los Angeles starts rahu kaal about 10 minutes late.

The evening differs too. Pratipada ends 26 minutes after sunset in Los Angeles. So most of that evening belongs to Dwitiya, the next lunar day. In New York, Pratipada runs for 3 h 32 min after sunset.

If you send no place at all, the API answers for Ujjain, India, the traditional reference place, on India time. For this date, Ujjain's sunrise tithi is Purnima, the full moon, not Pratipada.

How often two US cities differ

One date can be a lucky pick, so we checked a whole month. We asked GET /v1/panchang/month for October 2026 in both cities. It returns one row per day, with the four parts running at sunrise.

On 11 of the 31 days, New York and Los Angeles differed in at least one part:

Part at sunrise

Days it differed in October 2026

Tithi

2 (Oct 30 and 31)

Nakshatra

3 (Oct 20, 25 and 26)

Yoga

3

Karana

7

At least one part

11

Rahu kaal moves with the season too

Rahu kaal shifts inside one city as well. Here it is for New York on three Mondays in 2026:

Monday

Sunrise

Sunset

Rahu kaal

Length

Jun 22

5:25 AM

8:30 PM

7:18 AM to 9:11 AM

1 h 53 min

Oct 26

7:19 AM

5:59 PM

8:39 AM to 9:59 AM

80 min

Dec 21

7:16 AM

4:31 PM

8:25 AM to 9:35 AM

69 min

So rahu kaal has no fixed clock time, even in one city. A table copied from another city or another month is off. The API works out each window from the real daylight at the place you send.

The daily sign horoscope carries this same panchang in its panchang field, as how to add a daily horoscope shows. Try a city of your own. Our free panchang tool runs on this same call. Pick any city and date to see the tithi, rahu kaal and choghadiya for that place.

Open the free panchang tool to see the tithi, rahu kaal and choghadiya for any city

The call and the code

Send the date and the place as query parameters to GET /v1/panchang/daily. The code below asks for New York on Oct 26, 2026, and prints the lines a panchang box shows. Run it on your server, so your API key stays private.

// The panchang for one city and date (Node 18 or later).
const BASE_URL = "https://apiforastrology.com/api/astrology/v1";

// The reader's city and the date the page shows.
const city = {
  date: "2026-10-26",
  latitude: "40.7128",
  longitude: "-74.006",
  timezone: "America/New_York",
};

// "2026-10-26T08:39:34-04:00" becomes "8:39 AM", on the city's own clock.
function clockTime(isoText) {
  const hour = Number(isoText.slice(11, 13));
  const minute = isoText.slice(14, 16);
  const suffix = hour < 12 ? "AM" : "PM";
  const hour12 = hour % 12 === 0 ? 12 : hour % 12;
  return `${hour12}:${minute} ${suffix}`;
}

const response = await fetch(`${BASE_URL}/panchang/daily?${new URLSearchParams(city)}`, {
  headers: { Authorization: `Bearer ${process.env.ASTROLOGY_API_KEY}` },
});
const day = await response.json();

console.log(`Tithi: ${day.tithi.name} until ${clockTime(day.tithi.ends)}`);
console.log(`Nakshatra: ${day.nakshatra.name} until ${clockTime(day.nakshatra.ends)}`);
const rahu = day.inauspicious.rahu_kaal;
console.log(`Rahu kaal: ${clockTime(rahu.starts)} to ${clockTime(rahu.ends)}`);
for (const slice of day.muhurta.choghadiya.day) {
  console.log(`${clockTime(slice.starts)}  ${slice.name} (${slice.quality})`);
}

It printed:

Tithi: Pratipada until 9:32 PM
Nakshatra: Ashwini until 8:11 AM
Rahu kaal: 8:39 AM to 9:59 AM
7:19 AM  Amrit (auspicious)
8:39 AM  Kaal (inauspicious)
9:59 AM  Shubh (auspicious)
11:19 AM  Rog (inauspicious)
12:39 PM  Udveg (inauspicious)
1:59 PM  Char (neutral)
3:19 PM  Labh (auspicious)
4:39 PM  Amrit (auspicious)

Every time in the answer carries the city's offset from UTC, here -04:00. The API reference lists every field, and a real answer is shown under this post.

Four choices for your panchang page

Send the reader's city. Send latitude, longitude and timezone together. Use a zone name such as America/Los_Angeles, not a fixed offset like -7. A zone name gets the daylight saving rule for that date.

Show the end times as well. A part that ends at 8:11 AM is gone for most of the day. Write "Ashwini until 8:11 AM", then name the next one. The changes field lists every change of tithi, nakshatra, yoga and karana until the next sunrise. If an end time falls after midnight, show its date too.

Show both tables when they overlap. On a Monday, rahu kaal sits exactly on Kaal, the 2nd choghadiya. On Tuesdays and Thursdays the two tables disagree. On Tuesday, Oct 27, New York's rahu kaal, 3:19 PM to 4:38 PM, covers Shubh, a good slice. The conflicts field names each overlap like this and does not pick a side (MU-04).

For a Hindi page, add lang=hi, and the names come in Hindi: the tithi reads प्रतिपदा and the weekday सोमवार. The English names stay in the name_en fields.

See everything the endpoint covers. The panchang API page lists every field, up to tara bala, a daily rating from a person's birth star. For festival dates and month calendars, see the Hindu calendar API.

See what the panchang API returns for any date and place

The same date gave two US cities different nakshatras and rahu kaal windows 2 hours 50 minutes apart. Send each reader's city, and the box is right for them.