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

Daily Horoscope Prediction API

Introducing the Daily Horoscope Prediction API, a simple and reliable way to fetch day-wise astrological guidance for any zodiac sign. This API is designed for websites, mobile apps, chatbots, CRM dashboards, or astrology portals that want to display daily horoscopes in multiple languages.

It supports two endpoints: one for English (default) and one routed through the DivineAPI translator service for other languages.


Step by Step Horoscope API Postman Testing Integration

https://support.divineapi.com/horoscope-apis/testing-the-daily-horoscope-prediction-api-using-postman


API Endpoint for English

POST https://astroapi-5.divineapi.com/api/v5/daily-horoscope

Guide: If you only need English, use this endpoint.


API Endpoint for other Languages

POST https://astroapi-5-translator.divineapi.com/api/v5/daily-horoscope

Guide: If you want the prediction in any other language use this translator endpoint.


Supported Language Codes

This API supports a wide range of languages. Pass the language code in the lan field in the request body.

Supported Reference Article:
https://support.divineapi.com/general-api-support/translating-apis-into-a-different-language

CodeLanguage
enEnglish
hiHindi
zhChinese
jaJapanese
arArabic
ruRussian
ptPortuguese
esSpanish
frFrench
deGerman
itItalian
nlDutch
plPolish
trTurkish
ukUkrainian
huHungarian
grGreek
bnBengali
maMarathi
tmTamil
tlTelugu
mlMalayalam
knKannada
taFilipino/Tagalog
bahIndonesian

Guide: Ensure that your translator configuration is up to date via DivineAPI Translator.


Headers

NameTypeDescription
Authorization*StringYour API Access Token. Example: Bearer {token}

Fields marked with * are mandatory.


Request Body

NameTypeDescription
api_key*StringYour API key from the DivineAPI dashboard.
sign*StringZodiac sign, e.g. aries, leo, capricorn. Case-insensitive in most implementations.
h_day*StringOne of yesterday, today, tomorrow. Use this when you want relative-day horoscope.
tzone*FloatTimezone of the user, e.g. 5.5 for IST. Refer to the DivineAPI timezone guide.
lanStringLanguage code as per the table above. Default is en.

200: OK Fetched Daily Horoscope Prediction Successfully

{
    "success": 1,
    "data": {
        "sign": "Leo",
        "date": "2025-10-07",
        "prediction": {
            "personal": "Your personal life is full of vibrant energy today, encouraging you to connect with those around you. Spend quality time with family and friends, as meaningful interactions could strengthen your bonds. New avenues for self-expression might open up, allowing you to explore creative pursuits more deeply. Stay open to change and embrace versatility; it could bring about personal growth and new opportunities to thrive on a personal level.",
            "health": "Pay attention to physical wellness today, Leo. A balanced approach to nutrition and hydration will keep you energized. Incorporate moderate exercise into your routine to boost endorphins and alleviate stress. Meditation or yoga might also be beneficial for maintaining mental clarity and emotional equilibrium. Listen to your body's signals and don't ignore any signs of fatigue. Rest is crucial to rejuvenate your energy levels.",
            "profession": "Today, you may find yourself inspired at work, Leo. New ideas are likely to flow freely, and you could impress colleagues with your creativity. However, balance innovation with practicality to achieve the best outcomes. Be open to collaboration and networking to advance your professional goals. By day's end, you may unlock new pathways for growth or receive an opportunity that aligns with your ambitions.",
            "emotions": "Emotionally, you may feel heightened sensitivity, Leo, which can deepen connections with others. Trust your intuition, as it guides you through complex situations with grace. Surround yourself with positivity, as it elevates your mood and fortifies your spirit. Take time to reflect on personal desires and goals, aligning actions with intentions. Moments of solitude could provide the clarity you seek today.",
            "travel": "Adventure calls today, Leo! Whether it's a spontaneous day trip or planning a future vacation, your travel aspirations demand attention. Explore new places that inspire creativity and broaden your horizons. If immediate travel isn't possible, let wanderlust fuel your dreams and research your next escape. Local excursions could offer a refreshing change and bring a sense of novelty to your routine.",
            "luck": [
                "Colors of the day : Gold, Orange",
                "Lucky Numbers of the day : 4, 9, 13",
                "Lucky Alphabets you will be in sync with : L, S",
                "Cosmic Tip : Beware of impulsive actions; stay grounded and focused.",
                "Tips for Singles : Express your interests confidently; attract genuine connections today.",
                "Tips for Couples : Share your dreams; strengthen your bond through open dialogue."
            ]
        },
        "special": {
            "lucky_color_codes": [
                "#FFD700",
                "#FFA500"
            ],
            "horoscope_percentage": {
                "personal": 85,
                "health": 75,
                "profession": 80,
                "emotions": 78,
                "travel": 72,
                "luck": 83
            }
        }
    }
}

Example Code Implementations

Below are example implementations in various programming environments.


cURL

curl --location 'https://astroapi-5.divineapi.com/api/v5/daily-horoscope' \
--header 'Authorization: Bearer {token}' \
--form 'api_key="Your API Key"' \
--form 'sign="Aries"' \
--form 'h_day="today"' \
--form 'tzone="5.5"' \
--form 'lan="en"'

NodeJS

var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://astroapi-5.divineapi.com/api/v5/daily-horoscope',
  'headers': {
    'Authorization': 'Bearer {token}'
  },
  formData: {
    'api_key': 'Your API Key',
    'sign': 'Aries',
    'h_day': 'today',
    'tzone': '5.5',
    'lan': 'en'
  }
};
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("sign", "Aries");
form.append("h_day", "today");
form.append("tzone", "5.5");
form.append("lan", "en");

var settings = {
  "url": "https://astroapi-5.divineapi.com/api/v5/daily-horoscope",
  "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-5.divineapi.com/api/v5/daily-horoscope"

payload = {'api_key': 'Your API Key',
'sign': 'Aries',
'h_day': 'today',
'tzone': '5.5',
'lan': 'en'}
files=[

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

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

print(response.text)

Notes and Best Practices

Always send the correct timezone so the API can match the correct day to the user’s region.

Use the translator endpoint when you need localized content and pass the right lan code from the table above.

sign should be a valid zodiac sign supported by DivineAPI (Aries through Pisces).

You can store the response for the day to reduce calls if you are showing the same sign to many users.

curl -X POST "https://astroapi-5.divineapi.com/api/v5/daily-horoscope" \
  -H "Authorization: Bearer {Your Auth Token}" \
  --form 'api_key="{Your API Key}"' \
  --form 'sign="Aries"' \
  --form 'h_day="today"' \
  --form 'tzone="5.5"' \
  --form 'lan="en"'
const FormData = require('form-data');
const axios = require('axios');

const form = new FormData();
form.append('api_key', '{Your API Key}');
form.append('sign', 'Aries');
form.append('h_day', 'today');
form.append('tzone', '5.5');
form.append('lan', 'en');

const response = await axios.post('https://astroapi-5.divineapi.com/api/v5/daily-horoscope', form, {
  headers: {
    ...form.getHeaders(),
    'Authorization': 'Bearer {Your Auth Token}',
  }
});

console.log(response.data);
import requests

url = "https://astroapi-5.divineapi.com/api/v5/daily-horoscope"
headers = {
    "Authorization": "Bearer {Your Auth Token}",
}
payload = {
    "api_key": "{Your API Key}",
    "sign": "Aries",
    "h_day": "today",
    "tzone": "5.5",
    "lan": "en",
}

response = requests.post(url, headers=headers, data=payload)

print(response.json())
const formData = new FormData();
formData.append('api_key', '{Your API Key}');
formData.append('sign', 'Aries');
formData.append('h_day', 'today');
formData.append('tzone', '5.5');
formData.append('lan', 'en');

const response = await fetch('https://astroapi-5.divineapi.com/api/v5/daily-horoscope', {
  method: 'POST',
  headers: {
      'Authorization': "Bearer {Your Auth Token}",
    },
  body: formData,
});

const data = await response.json();
console.log(data);
<?php

use GuzzleHttp\Client;

$client = new Client();

$response = $client->request('POST', 'https://astroapi-5.divineapi.com/api/v5/daily-horoscope', [
    'headers' => [
        'Authorization' => 'Bearer {Your Auth Token}',
    ],
    'multipart' => [
        ['name' => 'api_key', 'contents' => '{Your API Key}'],
        ['name' => 'sign', 'contents' => 'Aries'],
        ['name' => 'h_day', 'contents' => 'today'],
        ['name' => 'tzone', 'contents' => '5.5'],
        ['name' => 'lan', 'contents' => 'en'],
    ],
]);

echo $response->getBody();
package main

import (
    "bytes"
    "fmt"
    "mime/multipart"
    "net/http"
    "io"
)

func main() {
    body := &bytes.Buffer{}
    writer := multipart.NewWriter(body)
    writer.WriteField("api_key", "{Your API Key}")
    writer.WriteField("sign", "Aries")
    writer.WriteField("h_day", "today")
    writer.WriteField("tzone", "5.5")
    writer.WriteField("lan", "en")
    writer.Close()

    req, _ := http.NewRequest("POST", "https://astroapi-5.divineapi.com/api/v5/daily-horoscope", body)
    req.Header.Set("Content-Type", writer.FormDataContentType())
    req.Header.Set("Authorization", "Bearer {Your Auth Token}")

    client := &http.Client{}
    resp, _ := client.Do(req)
    defer resp.Body.Close()

    body2, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body2))
}
import okhttp3.*;
import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        OkHttpClient client = new OkHttpClient();

        RequestBody body = new MultipartBody.Builder()
            .setType(MultipartBody.FORM)
            .addFormDataPart("api_key", "{Your API Key}")
            .addFormDataPart("sign", "Aries")
            .addFormDataPart("h_day", "today")
            .addFormDataPart("tzone", "5.5")
            .addFormDataPart("lan", "en")
            .build();

        Request request = new Request.Builder()
            .url("https://astroapi-5.divineapi.com/api/v5/daily-horoscope")
            .post(body)
            .addHeader("Authorization", "Bearer {Your Auth Token}")
            .build();

        Response response = client.newCall(request).execute();
        System.out.println(response.body().string());
    }
}
import Foundation

let url = URL(string: "https://astroapi-5.divineapi.com/api/v5/daily-horoscope")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer {Your Auth Token}", forHTTPHeaderField: "Authorization")

let boundary = "Boundary-\(UUID().uuidString)"
request.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type")

var bodyData = Data()
bodyData.append("--\(boundary)\r\n".data(using: .utf8)!)
bodyData.append("Content-Disposition: form-data; name=\"api_key\"\r\n\r\n".data(using: .utf8)!)
bodyData.append("{Your API Key}\r\n".data(using: .utf8)!)
bodyData.append("--\(boundary)\r\n".data(using: .utf8)!)
bodyData.append("Content-Disposition: form-data; name=\"sign\"\r\n\r\n".data(using: .utf8)!)
bodyData.append("Aries\r\n".data(using: .utf8)!)
bodyData.append("--\(boundary)\r\n".data(using: .utf8)!)
bodyData.append("Content-Disposition: form-data; name=\"h_day\"\r\n\r\n".data(using: .utf8)!)
bodyData.append("today\r\n".data(using: .utf8)!)
bodyData.append("--\(boundary)\r\n".data(using: .utf8)!)
bodyData.append("Content-Disposition: form-data; name=\"tzone\"\r\n\r\n".data(using: .utf8)!)
bodyData.append("5.5\r\n".data(using: .utf8)!)
bodyData.append("--\(boundary)\r\n".data(using: .utf8)!)
bodyData.append("Content-Disposition: form-data; name=\"lan\"\r\n\r\n".data(using: .utf8)!)
bodyData.append("en\r\n".data(using: .utf8)!)
bodyData.append("--\(boundary)--\r\n".data(using: .utf8)!)
request.httpBody = bodyData

let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data {
        print(String(data: data, encoding: .utf8) ?? "")
    }
}
task.resume()
import okhttp3.*

fun main() {
    val client = OkHttpClient()

    val body = MultipartBody.Builder()
        .setType(MultipartBody.FORM)
        .addFormDataPart("api_key", "{Your API Key}")
        .addFormDataPart("sign", "Aries")
        .addFormDataPart("h_day", "today")
        .addFormDataPart("tzone", "5.5")
        .addFormDataPart("lan", "en")
        .build()

    val request = Request.Builder()
        .url("https://astroapi-5.divineapi.com/api/v5/daily-horoscope")
        .post(body!!)
        .addHeader("Authorization", "Bearer {Your Auth Token}")
        .build()

    client.newCall(request).execute().use { response ->
        println(response.body?.string())
    }
}
using System;
using System.Net.Http;
using System.Threading.Tasks;

class Program {
    static async Task Main() {
        using var client = new HttpClient();
        client.DefaultRequestHeaders.Add("Authorization", "Bearer {Your Auth Token}");

        var content = new MultipartFormDataContent();
        content.Add(new StringContent("{Your API Key}"), "api_key");
        content.Add(new StringContent("Aries"), "sign");
        content.Add(new StringContent("today"), "h_day");
        content.Add(new StringContent("5.5"), "tzone");
        content.Add(new StringContent("en"), "lan");

        var response = await client.PostAsync("https://astroapi-5.divineapi.com/api/v5/daily-horoscope", content);
        var result = await response.Content.ReadAsStringAsync();
        Console.WriteLine(result);
    }
}
Response 200
{
    "success": 1,
    "data": {
        "sign": "Aries",
        "date": "2026-08-06",
        "prediction": {
            "personal": "Thursday arrives with the quiet steadiness of a Sun-Saturn harmonious flow at its tightest, Aries, and the day has unusual grip under your shoes. The Moon still moves through your 2nd house, keeping focus on tangible matters. The Venus-Mars friction lingers on a wider arc, so a small annoyance at midday is not the cause it pretends to be. Mars in your communication zone keeps conversations sharp. Choose two important ones, give them your full attention, and let the rest blur past. The takeaway rests in the hands: today's progress is measurable in finished things, not started ones.",
            "health": "Shoulders carry the unsaid today, Aries, and the lunar pull into your 2nd house concentrates tension across the upper back. Roll the shoulders ten times in each direction before the first email. Skip the second coffee, the nervous system is already wired enough under Mars sitting in your communication zone. Take a brisk 20-minute walk before lunch, not after. Eat a real lunch sitting down. Sleep tonight asks for cooler air and an earlier wind-down. Treat the body as the day's first appointment, not the last. The shoulders forgive you by morning when you forgive them today.",
            "profession": "Sun-Saturn harmonious flow perfects today, Aries, and the career angle steadies into one of the strongest configurations of the week. Use the morning for the conversation that requires authority. A senior figure listens more carefully than they let on. The work zone rewards a long-term commitment made publicly today, not a quick win. Mars in your 3rd house makes writing dense and clear, draft the document that has to land well next week. Skip the social lunch and use that hour for the harder task. The career zone closes Thursday in your favour if you push the one thing forward that nobody else will push for you.",
            "emotions": "The nervous system runs tight under the surface, Aries, even as the Taurus Moon offers a sturdy outer calm. A loved one's silence today is not what you think it is, do not fill it with anxious guesses. The relational insight is that patience often reads as love more clearly than words do. Mars-Venus friction holds wide but real through the late afternoon, so save the difficult conversation for tomorrow when Mercury softens. Eat dinner without your phone. Walk after dinner if the night is warm. By bedtime the inner weather has cleared and the heart, quietly, has chosen kindness over correction.",
            "travel": "Outward travel signals stay quiet again today, Aries, and the chart asks for engagement closer to home. Pivot to the active 2nd house and walk through your own world like a tourist of your own possessions. The drawer of objects you have not opened in a year, the box of photographs in the cupboard, the books on the second shelf you have never finished. Pick one object and place it where you will see it daily. The journey today is the inventory of what you already own, the slow recognition of how much you have. By dusk the room feels different even though nothing has moved far.",
            "luck": [
                "Colors of the day : Steel Grey, Moss Green",
                "Lucky Numbers of the day : 8, 17, 26",
                "Lucky Alphabets you will be in sync with : D, P",
                "Cosmic Tip : Authority used quietly today shapes a long arc of trust that loud authority never could.",
                "Tips for Singles : Show up for one commitment you would normally cancel and notice who is also there.",
                "Tips for Couples : Make a promise tonight that is small enough to keep daily for a month, then keep it."
            ]
        },
        "special": {
            "lucky_color_codes": [
                "#71797E",
                "#8A9A5B"
            ],
            "horoscope_percentage": {
                "personal": 74,
                "health": 66,
                "profession": 84,
                "emotions": 70,
                "travel": 65,
                "luck": 74
            }
        }
    }
}