Astrology API Reference Documentation

Basic Astro/bhav_madhya

API Endpoint

bhav_madhya

Method & URL
Method Full URL
POST https://json.astrologyapi.com/v1/bhav_madhya

Response Data

			
				{
  "ascendant": 203.81846280958547,
  "midheaven": 115.07742985224672,
  "ayanamsha": -23.74764710403383,
  "bhav_madhya": [
    {
      "house": 1,
      "degree": 203.81846280958547,
      "sign": "Libra",
      "norm_degree": 23.81846280958547,
      "sign_id": 6
    },
    {
      "house": 2,
      "degree": 234.23811849047257,
      "sign": "Scorpio",
      "norm_degree": 24.238118490472573,
      "sign_id": 7
    },
    {
      "house": 3,
      "degree": 264.6577741713596,
      "sign": "Sagittarius",
      "norm_degree": 24.65777417135962,
      "sign_id": 8
    },
    {
      "house": 4,
      "degree": 295.0774298522467,
      "sign": "Capricorn",
      "norm_degree": 25.077429852246723,
      "sign_id": 9
    },
    {
      "house": 5,
      "degree": 324.6577741713596,
      "sign": "Aquarius",
      "norm_degree": 24.65777417135962,
      "sign_id": 10
    },
    {
      "house": 6,
      "degree": 354.2381184904725,
      "sign": "Pisces",
      "norm_degree": 24.238118490472516,
      "sign_id": 11
    },
    {
      "house": 7,
      "degree": 23.81846280958547,
      "sign": "Aries",
      "norm_degree": 23.81846280958547,
      "sign_id": 0
    },
    {
      "house": 8,
      "degree": 54.23811849047257,
      "sign": "Taurus",
      "norm_degree": 24.238118490472573,
      "sign_id": 1
    },
    {
      "house": 9,
      "degree": 84.65777417135962,
      "sign": "Gemini",
      "norm_degree": 24.65777417135962,
      "sign_id": 2
    },
    {
      "house": 10,
      "degree": 115.07742985224672,
      "sign": "Cancer",
      "norm_degree": 25.077429852246723,
      "sign_id": 3
    },
    {
      "house": 11,
      "degree": 144.65777417135965,
      "sign": "Leo",
      "norm_degree": 24.657774171359648,
      "sign_id": 4
    },
    {
      "house": 12,
      "degree": 174.23811849047254,
      "sign": "Virgo",
      "norm_degree": 24.238118490472544,
      "sign_id": 5
    }
  ],
  "bhav_sandhi": [
    {
      "house": 1,
      "degree": 219.02829065002902,
      "sign": "Scorpio",
      "norm_degree": 9.028290650029021,
      "sign_id": 7
    },
    {
      "house": 2,
      "degree": 249.44794633091612,
      "sign": "Sagittarius",
      "norm_degree": 9.447946330916125,
      "sign_id": 8
    },
    {
      "house": 3,
      "degree": 279.86760201180317,
      "sign": "Capricorn",
      "norm_degree": 9.867602011803172,
      "sign_id": 9
    },
    {
      "house": 4,
      "degree": 309.86760201180317,
      "sign": "Aquarius",
      "norm_degree": 9.867602011803172,
      "sign_id": 10
    },
    {
      "house": 5,
      "degree": 339.4479463309161,
      "sign": "Pisces",
      "norm_degree": 9.447946330916125,
      "sign_id": 11
    },
    {
      "house": 6,
      "degree": 9.028290650029021,
      "sign": "Aries",
      "norm_degree": 9.028290650029021,
      "sign_id": 0
    },
    {
      "house": 7,
      "degree": 39.02829065002902,
      "sign": "Taurus",
      "norm_degree": 9.028290650029021,
      "sign_id": 1
    },
    {
      "house": 8,
      "degree": 69.44794633091612,
      "sign": "Gemini",
      "norm_degree": 9.447946330916125,
      "sign_id": 2
    },
    {
      "house": 9,
      "degree": 99.86760201180317,
      "sign": "Cancer",
      "norm_degree": 9.867602011803172,
      "sign_id": 3
    },
    {
      "house": 10,
      "degree": 129.86760201180317,
      "sign": "Leo",
      "norm_degree": 9.867602011803172,
      "sign_id": 4
    },
    {
      "house": 11,
      "degree": 159.4479463309161,
      "sign": "Virgo",
      "norm_degree": 9.447946330916096,
      "sign_id": 5
    },
    {
      "house": 12,
      "degree": 189.02829065002902,
      "sign": "Libra",
      "norm_degree": 9.028290650029021,
      "sign_id": 6
    }
  ]
}			
		
Params Data type Descriptions

day

month

year

hour

min

lat

lon

tzone

int

int

int

int

int

float

float

float

date of birth, eg: 10

month of birth, eg: 5

year of birth, eg: 1990

hour, eg: 19

minute, eg: 55

latitude, eg: 19.2056

longitude, eg: 25.2056

timezone, eg: 5.5

            
                var userId = '';
var apiKey = '';
var data = 'JSON Request Data';
var request = $.ajax({
url: "https://json.astrologyapi.com/v1/"+api,
    method: "POST",
    dataType:'json',
    headers: {
    "authorization": "Basic " + btoa(userId+":"+apiKey),
        "Content-Type":'application/json'
    },
    data:JSON.stringify(data)
});
// Returns A promiss
return( request.then( function(resp){
    return resp;
}, function(err){
    return err;
}));
}
            
		
                
                    require_once 'VedicRishiClient.php';
$userId = "";
$apiKey = "";
$data = array(
    'date' => 25,
    'month' => 12,
    'year' => 1988,
    'hour' => 4,
    'minute' => 0,
    'latitude' => 25.123,
    'longitude' => 82.34,
    'timezone' => 5.5
);
$resourceName = "astro_details";
$vedicRishi = new VedicRishiClient($userId, $apiKey);
$responseData = $vedicRishi->call($resourceName, $data['date'], $data['month'], $data['year'], $data['hour'], $data['minute'], $data['latitude'], $data['longitude'], $data['timezone']);
echo $responseData;


                

             
Download PHP Client