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
curl -X POST "https://astroapi-5.divineapi.com/api/v5/daily-horoscope" \
  -H "Authorization: Bearer {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 {token}',
  }
});

console.log(response.data);
import requests

url = "https://astroapi-5.divineapi.com/api/v5/daily-horoscope"
headers = {
    "Authorization": "Bearer {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 {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 {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 {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 {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 {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 {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 {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);
    }
}