New Numerology API
Docs menu
Download

Get the ascendant from the astrology API

Updated

To get the ascendant from API for Astrology (apiforastrology.com), send one POST request to /v1/ascendant. Put the birth date, local time, latitude, longitude and time zone name in a JSON body. The answer gives the rising sign, its degree, nakshatra and pada. Birth details never go in the URL, and the API key goes in a header.

How to get the ascendant from the astrology API

  1. Get an API key. A test key is free, allows 1,000 calls a month and works for this call with any birth details.
  2. Send a POST request to /v1/ascendant. Put the birth date, local time, latitude, longitude and time zone name in a JSON body.
  3. Put the key in the Authorization: Bearer header.
  4. Read ascendant.sign in the answer. That is the rising sign.

The ascendant is the sign rising in the east at the moment of birth. It is also called the rising sign, and in Vedic astrology the lagna. It starts the first house, so every house in a chart is counted from it. A house is one of the 12 parts of the chart. The planet that rules the rising sign is the lagnesh (ascendant lord).

Send the birth details to POST /v1/ascendant. You must send year, month, day, latitude, longitude and timezone. Send hour and minute too, on the local 24-hour clock. They are optional, but they default to 0, which means midnight.

This example is John Doe, born on August 15, 1990 at 10:30 AM in New York:

# John Doe, born Aug 15, 1990, 10:30 AM, New York
curl -X POST "https://apiforastrology.com/api/astrology/v1/ascendant" \
  -H "Authorization: Bearer $ASTROLOGY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"year":1990,"month":8,"day":15,"hour":10,"minute":30,"second":0,"latitude":40.7128,"longitude":-74.006,"timezone":"America/New_York"}'

The examples read your key from the ASTROLOGY_API_KEY environment variable. Run them on your server. The quickstart shows how to get a key and set the variable. You can also run this call in the API reference. Or import the Postman collection, which has John Doe’s details filled in.

Have only a city name? Look up its latitude, longitude and time zone name first, then send those three.

Read the answer

A good call returns 200 and JSON. Here is the part of John Doe’s answer that matters most. His rising sign is Virgo:

POST /v1/ascendant (shortened)
{
  "ascendant": {
    "sign": "Virgo",
    "sign_number": 6,
    "degree_in_sign": 19.934155,
    "degree_dms": "19 : 56 : 03",
    "longitude": 169.934155,
    "nakshatra": "Hast",
    "nakshatra_lord": "Moon",
    "pada": 3,
    "house": 1
  },
  "meta": {
    "ayanamsa": "lahiri",
    "timezone": {
      "offset_hours": -4
    }
  }
}
  • sign is the rising sign. sign_number is the same sign as a number, 1 for Aries to 12 for Pisces. Use the number in your code, because the name changes with the language.
  • degree_in_sign is how far into the sign the ascendant is, from 0 to 30 degrees. degree_dms is the same value in degrees, minutes and seconds.
  • longitude is the place on the whole circle of the zodiac, from 0 to 360 degrees. Each sign takes 30 degrees, starting with Aries at 0.
  • nakshatra is one of 27 nakshatras (star groups), and nakshatra_lord is the planet that rules it. pada is the quarter of the nakshatra, from 1 to 4.
  • house is always 1. The ascendant is where the first house begins.

The meta block says how the answer was worked out. Check meta.timezone.offset_hours first when a chart looks wrong. For John Doe it is -4, because New York was on daylight saving time that day. meta.ephemeris names the planetary data the position comes from: JPL DE440s, from NASA’s Jet Propulsion Laboratory. The accuracy page shows how the positions were checked.

The names come in English. For another language, add a lang value to the URL. Use ?lang=hi for Hindi. Only the language goes in the URL. The birth details stay in the body.

Can I get the ascendant with GET and URL parameters?

Not for a natal chart. Birth details go in a JSON body sent with POST. A birth date, time and place together point to one person. A URL gets copied into server logs, browser history and analytics tools. A request body usually stays out of them. Every chart endpoint takes the same body, so one small function in your code can send all of them.

GET is for calls that need no birth details. GET /v1/sky gives where every planet is at one moment, for everyone. You put the moment and the time zone in the URL:

curl
# Where every planet is at 9:00 AM in New York on December 1, 2026
curl "https://apiforastrology.com/api/astrology/v1/sky?at=2026-12-01T09%3A00&timezone=America/New_York" \
  -H "Authorization: Bearer $ASTROLOGY_API_KEY"

The sky has no ascendant, because the rising sign depends on a place on Earth. Want the rising sign right now in one city? Send today’s date and the current time to POST /v1/ascendant, with that city’s latitude, longitude and time zone. Other GET calls include GET /v1/panchang/daily, the day’s Hindu calendar. They are all in the API reference.

Where the API key goes

In a header: Authorization: Bearer <key> or X-API-Key: <key>. The API never reads a key from the URL. Keep the call on your server. A key inside a web page or a mobile app can be copied by anyone who opens it. Limits and key safety are in authentication and rate limits.

Why the rising sign may not match

Your app shows one rising sign, and another site shows a different one. We ran John Doe’s chart with each of the usual causes. Here is what came back.

  • The zodiac can differ. This API uses the Vedic (sidereal) zodiac, with the Lahiri ayanamsa by default. Western sites use the tropical zodiac, about 24 degrees away. John Doe’s ascendant is Virgo here and Libra on a Western site. Both are right for their zodiac. Vedic vs Western astrology explains what to tell your users.
  • The birth time matters a lot. The ascendant goes through all 12 signs in a day. Between 10:00 and 11:00 AM, John Doe’s ascendant moves about 12 degrees, from 14 to 26 degrees of Virgo. That is about 5 minutes for each degree. Near the edge of a sign, a few minutes matter. When degree_in_sign is under 1 or over 29, a small time error can change the sign. Leave out hour and minute, and the API reads midnight: the rising sign comes back as Taurus.
  • A west longitude needs a minus sign. New York is -74.006. With 74.006, the chart is for Central Asia, and the rising sign comes back as Aquarius. The API can’t tell this is a mistake, so it gives no error.
  • A fixed time zone offset can be wrong. Send the zone name, such as America/New_York, and the API applies daylight saving time for that exact date. With "timezone": -5, John Doe’s rising sign moves to Libra. On the night the clocks go back, a time such as 1:30 AM happens twice. The API returns a 422 and asks which one, rather than guess. More cases are in times and time zones.

No birth time?

Then don’t show an ascendant. Without hour and minute, the API reads midnight. On average, the sign it returns is right for only about 2 of the 24 hours. Ask the user for the birth time, or hide the rising sign until you have it. The Moon changes sign only every two to three days. So the Moon sign from POST /v1/planets is often right all day.

The ascendant with the whole natal chart

POST /v1/ascendant returns only the ascendant. POST /v1/planets takes the same body. It returns the same ascendant object, plus every planet with its sign, house and nakshatra. Use it when you also show the planets, so you make one call instead of two. The quickstart walks through that answer.

More ascendants the API returns

The same birth details give other ascendants too. Astrologers read each one for a different purpose.

  • POST /v1/chart/D9 gives the ascendant in the navamsa (D9) chart. Any of the 16 divisional charts works the same way. For John Doe, the navamsa ascendant is Gemini.
  • POST /v1/kp gives the KP ascendant: cusp 1, with Placidus houses and the KP ayanamsa. Its house numbers differ from the whole-sign houses of every other endpoint. For John Doe, cusp 1 is in Virgo, 0.1 degrees past the default ascendant.
  • POST /v1/special-lagnas gives special lagnas, extra rising points that start from the Sun at sunrise. The hora lagna moves one sign an hour. The ghati lagna moves one sign every 24 minutes. For John Doe, they are Sagittarius and Gemini.
  • POST /v1/chart/svg draws the chart as a picture. In the default North Indian style, the top diamond is house 1, which holds the rising sign. The South and East Indian styles label it Asc.

Every other endpoint and guide is in the astrology API documentation.