Horoscopes API Documentation

Unveil cosmic mysteries with the Horoscopes API—an enchanting gateway to personalized astrological insights. Tailored to meet your preferences, this API delivers straightforward horoscope predictions in versatile formats, offering an astrological experience that suits your needs.

Contents

  1. Object Properties & Structure
  2. Operating Modes
    1. Get a Simple Horoscope
    2. Read a specific sign
    3. Get all signs
  3. Use Limits

1. Object Properties

A horoscope object has the following properties.

PropertyDescription
timestampCreation date in UNIX format
nameZodiac Sign
iconZodiac Icon
datesDates of Birth for Zodiac Sign
predictionThe horoscope text

Example Horoscope {object}

{ 
"timeStamp":1706551318, 
"name":"Virgo", 
"icon":"\u264d", 
"dates":"(August 23 - September 22)", 
"prediction":"Horoscope text" 
}

2. Operating Modes

The horoscopes API delivers simple predictions in various formats, depending on your needs. There are three main calls you can make:

i. Get a Simple Horoscope

https://api.viewbits.com/v1/horoscope

This will return a random prediction in plain text format.

Response

Horoscope text will be returned in plain text format.

ii. Read a specific sign

https://api.viewbits.com/v1/horoscope?sign=[sign]

A random prediction will be generated for the selected sign with icon and birth dates in JSON format.

Available Signs:

aries 
taurus
gemini
cancer
leo
virgo
libra
scorpio
sagittarius
capricorn
aquarius
pisces

Response:

{object with timestamp}

iii. Get All Signs

https://api.viewbits.com/v1/horoscope?sign=all

A random prediction will be generated for all signs with icons and birth dates in JSON format.

Response:

{ "timeStamp":1706551498, "data":[ {object},{object},...{object} ]}

3. Use Limits

When no API key is provided, calls are limited to 5 per 30 second period. Its recommended that you use batch mode to cache the data in a local file, then updating only as needed. To increase rate limits and disable CORS, you must provide an API key by adding &key=[YOUR_KEY] to the end of your call.

API Key Example

https://api.viewbits.com/v1/horoscope?sign=all&key=[YOUR_KEY]