ASTROLOGY API REFERENCE DOCUMENTATION

Horoscope Prediction/Previous Day Horoscope Prediction

Get Horoscope Prediction for Previous Day

API Endpoint
horoscope_prediction/previous/:signName
Method & Url
MethodFull Url
POSThttps://json.apireports.com/v1/horoscope_prediction/previous/:signName

signName

signName means the name of the Zodiac Sign for which you want data.

For example:-

  • aries : Aries
  • taurus : Taurus
  • gemini : Gemini
  • cancer : Cancer
  • leo : Leo
  • virgo : Virgo
  • libra : Libra
  • scorpio : Scorpio
  • sagittarius : Sagittarius
  • capricorn : Capricorn
  • aquarius : Aquarius
  • pisces : Pisces

Response Data

{
  "status_code": 200,
  "status": true,
  "data": {
    "sign": "Aries",
    "prediction": [
      "If you can bring yourself to think logically then there is nothing to worry about. Today you need to control your strong ego.",
      "Your mind will remain tense today. Meditation can help you deal with this. Sitting continuously in one place can cause neck and back pain.",
      "You will experience joy and excitement all around. You will move forward with renewed vigor and confidence and also achieve impossible tasks.",
      "Today you can be buried under the burden of work, due to which your nature can become very angry. Think logically, don’t lose your temper and don’t make hasty decisions. You need to be patient in executing projects; pointless actions and anger can give trouble.",
      "An atmosphere of romance may prevail, which is likely to be thrilling, though it is temporary. Reaching out to a relative or a mature, experienced person can prove to be mutually beneficial. You will be sensitive to the feelings and needs of others.",
      "Today you will be feeling calm and realistic in love affairs and will be interested in being with your oldest, most trusted friends. You will feel the warmth of happiness in the company of your spouse and children."
    ],
    "prediction_date": "26-10-2021"
  }
}
JSON
Params Data Type Description Example
timezone float Timezone of Prediction 5.5
# cURL Request Example

curl --location --request POST 'https://json.apireports.com/v1/horoscope_prediction/previous/:signName' \
-u '{YourUserID}:{YourApiKey}'\
--header 'Accept-Language: en' \
--header 'Content-Type: application/json' \
--data-raw '{
    "timezone": 5.5
}'

# END
cURL
/* JavaScript Request Example */

var apiEndPoint = "horoscope_prediction/previous/:signName";
var userId = "{YourUserID}";
var apiKey = "{YourApiKey}";
var language = "en";
var data = {
    "timezone": 5.5
};
var url = 'https://json.apireports.com/v1/'+apiEndPoint;

var request = $.ajax({
	url: url,
	method: "POST",
	dataType:'json',
	headers: {
		"Authorization": "Basic " + btoa(userId+":"+apiKey),
		"Accept-Language": "en",
		"Content-Type":'application/json'
	},
	data:JSON.stringify(data)
});

request.then(
	function(resp){
		console.log(resp);
	},
	function(err){
		console.log(err);
	}
);

/* END */
JavaScript
<?php
/* PHP Request Example */

$apiEndPoint = "horoscope_prediction/previous/:signName";
$userId = "{YourUserID}";
$apiKey = "{YourApiKey}";
$url = "https://json.apireports.com/v1/";
$data = array(
	"timezone" => 5.5
);
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url.$apiEndPoint);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
$header[] = 'Authorization: Basic '. base64_encode($userId.":".$apiKey);
$header[] = 'Accept-Language: en';
$header[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
$error = curl_error($ch);
$http_code = curl_getinfo($ch ,CURLINFO_HTTP_CODE);
curl_close($ch);
echo $response;

/* END */
PHP
# Python Request Example

import requests
import json

apiEndPoint = "horoscope_prediction/previous/:signName";
userId = "{YourUserID}";
apiKey = "{YourApiKey}";
url = "https://json.apireports.com/v1/"+apiEndPoint

data = json.dumps({
    "timezone": 5.5
})

headers = {
  'Accept-Language': 'en',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, auth=(userId, apiKey),data=data)

print(response.text)

# END
Python
/* NodeJS Request Example */

var request = require('request');
var apiEndPoint = "horoscope_prediction/previous/:signName";
var userId = "{YourUserID}";
var apiKey = "{YourApiKey}";
var url = 'https://json.apireports.com/v1/'+apiEndPoint;
var options = {
  'method': 'POST',
  'url': url,
  'auth': {
    'user': userId,
    'password': apiKey
  },
  'headers': {
    'Accept-Language': 'en',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "timezone": 5.5
})
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

/* END */
NodeJS

Astrology API Reports in News