search

Copy page

Copy page as Markdown for LLMs

View as Markdown

View this page as plain text


Open in ChatGPT

Ask ChatGPT about this page

Open in Claude

Ask Claude about this page

Transit House

The Transit House API calculates the house-wise placement of transiting planets for a given month and time window, based on natal birth details and a specified transit date and time.


API Endpoint

POST https://astroapi-4.divineapi.com/western-api/v1/transit/house

Headers

NameTypeDescription
Authorization*Stringyour API Access Token (eg: Bearer {token})

Request Body

NameTypeDescription
api_key*StringYour API key {{api_key}}
full_name*StringFull name of the user Rahul Kumar
gender*StringGender of the user male
day*IntegerBirth day 3
month*IntegerBirth month 11
year*IntegerBirth year 2025
hour*IntegerBirth hour (24-hour format) 4
min*IntegerBirth minutes 47
sec*IntegerBirth seconds 56
place*StringBirth place New Delhi, India
lat*FloatBirth latitude 28.7041
lon*FloatBirth longitude 77.1025
tzone*FloatBirth timezone (decimal) 5.5
transit_day*IntegerTransit day 5
transit_month*IntegerTransit month 8
transit_year*IntegerTransit year 2021
transit_hour*IntegerTransit hour (24-hour format) 4
transit_min*IntegerTransit minutes 56
transit_sec*IntegerTransit seconds 45
transit_place*StringTransit place New Delhi, India
transit_lat*FloatTransit latitude 28.7041
transit_lon*FloatTransit longitude 77.1025
transit_tzone*FloatTransit timezone (decimal) 5.5

200: OK Transit House Details fetched successfully

{
    "success": 1,
    "data": [
        {
            "transit_planet": "Ascendant",
            "transit_house": 10
        },
        {
            "transit_planet": "Sun",
            "transit_house": 10
        },
        {
            "transit_planet": "Moon",
            "transit_house": 9
        },
        {
            "transit_planet": "Mars",
            "transit_house": 11
        },
        {
            "transit_planet": "Mercury",
            "transit_house": 10
        },
        {
            "transit_planet": "Venus",
            "transit_house": 11
        },
        {
            "transit_planet": "Jupiter",
            "transit_house": 5
        },
        {
            "transit_planet": "Saturn",
            "transit_house": 4
        },
        {
            "transit_planet": "North node",
            "transit_house": 8
        },
        {
            "transit_planet": "South node",
            "transit_house": 2
        },
        {
            "transit_planet": "Uranus",
            "transit_house": 7
        },
        {
            "transit_planet": "Neptune",
            "transit_house": 6
        },
        {
            "transit_planet": "Pluto",
            "transit_house": 4
        },
        {
            "transit_planet": "MC",
            "transit_house": 7
        },
        {
            "transit_planet": "Vertex",
            "transit_house": 2
        },
        {
            "transit_planet": "Chiron",
            "transit_house": 6
        },
        {
            "transit_planet": "Part of fortune",
            "transit_house": 11
        },
        {
            "transit_planet": "Lilith",
            "transit_house": 8
        }
    ]
}

Example Code Implementations

Below are example implementations in various programming environments.


cURL

curl --location 'https://astroapi-4.divineapi.com/western-api/v1/transit/house' \
--header 'Authorization: Bearer {token}' \
--form 'api_key="Your API Key"' \
--form 'full_name="Rahul Kumar"' \
--form 'gender="male"' \
--form 'day="3"' \
--form 'month="11"' \
--form 'year="2025"' \
--form 'place="New Delhi, India"' \
--form 'lat="28.7041"' \
--form 'lon="77.1025"' \
--form 'tzone="5.5"' \
--form 'hour="4"' \
--form 'min="47"' \
--form 'sec="56"' \
--form 'transit_day="5"' \
--form 'transit_month="8"' \
--form 'transit_year="2021"' \
--form 'transit_hour="4"' \
--form 'transit_min="56"' \
--form 'transit_sec="45"' \
--form 'transit_lat="28.7041"' \
--form 'transit_lon="77.1025"' \
--form 'transit_tzone="5.5"' \
--form 'transit_place="New Delhi, India"'

NodeJS

var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://astroapi-4.divineapi.com/western-api/v1/transit/house',
  'headers': {
    'Authorization': 'Bearer {token}'
  },
  formData: {
    'api_key': 'Your API Key',
    'full_name': 'Rahul Kumar',
    'gender': 'male',
    'day': '3',
    'month': '11',
    'year': '2025',
    'place': 'New Delhi, India',
    'lat': '28.7041',
    'lon': '77.1025',
    'tzone': '5.5',
    'hour': '4',
    'min': '47',
    'sec': '56',
    'transit_day': '5',
    'transit_month': '8',
    'transit_year': '2021',
    'transit_hour': '4',
    'transit_min': '56',
    'transit_sec': '45',
    'transit_lat': '28.7041',
    'transit_lon': '77.1025',
    'transit_tzone': '5.5',
    'transit_place': 'New Delhi, India'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

JavaScript jQuery AJAX

var form = new FormData();
form.append("api_key", "Your API Key");
form.append("full_name", "Rahul Kumar");
form.append("gender", "male");
form.append("day", "3");
form.append("month", "11");
form.append("year", "2025");
form.append("place", "New Delhi, India");
form.append("lat", "28.7041");
form.append("lon", "77.1025");
form.append("tzone", "5.5");
form.append("hour", "4");
form.append("min", "47");
form.append("sec", "56");
form.append("transit_day", "5");
form.append("transit_month", "8");
form.append("transit_year", "2021");
form.append("transit_hour", "4");
form.append("transit_min", "56");
form.append("transit_sec", "45");
form.append("transit_lat", "28.7041");
form.append("transit_lon", "77.1025");
form.append("transit_tzone", "5.5");
form.append("transit_place", "New Delhi, India");

var settings = {
  "url": "https://astroapi-4.divineapi.com/western-api/v1/transit/house",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer {token}"
  },
  "processData": false,
  "mimeType": "multipart/form-data",
  "contentType": false,
  "data": form
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Python

import requests

url = "https://astroapi-4.divineapi.com/western-api/v1/transit/house"

payload = {'api_key': 'Your API Key',
'full_name': 'Rahul Kumar',
'gender': 'male',
'day': '3',
'month': '11',
'year': '2025',
'place': 'New Delhi, India',
'lat': '28.7041',
'lon': '77.1025',
'tzone': '5.5',
'hour': '4',
'min': '47',
'sec': '56',
'transit_day': '5',
'transit_month': '8',
'transit_year': '2021',
'transit_hour': '4',
'transit_min': '56',
'transit_sec': '45',
'transit_lat': '28.7041',
'transit_lon': '77.1025',
'transit_tzone': '5.5',
'transit_place': 'New Delhi, India'}
files=[

]
headers = {
  'Authorization': 'Bearer {token}'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)

Implementation Notes

Use Authorization: Bearer {Your Auth Token} and {Your API Key} securely; never expose them in client-side code.

Provide date, time, and coordinates in correct numeric formats; use decimal timezone values (e.g., 5.5).

Check HTTP status codes, log responses, and handle 4xx/5xx errors gracefully.