NewConnect Claude, Gemini, ChatGPT, and other AI agents to API Ninjas via our MCP server

Horoscope API

The Horoscope API provides daily horoscopes for all zodiac signs.

(4.7)

From 3,700 users

2,000+

Applications using this API

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
218ms235ms276ms528ms882ms

Similar APIs

Didn't find what you were looking for? Suggest an improvement


/v1/horoscope GET

https://api.api-ninjas.com/v1/horoscope

Returns the daily horoscope for a specific zodiac sign. Optionally, you can provide a date parameter to get historical horoscopes.

Parameters

  • zodiac  required

    The zodiac sign to get a horoscope for. Valid values are: aries, taurus, gemini, cancer, leo, virgo, libra, scorpio, sagittarius, capricorn, aquarius, pisces.

  • date  optional premium only

    The date for the horoscope in YYYY-MM-DD format. The date must be either current or in the past. It cannot be in the future. If not provided, returns the horoscope for today's date.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

A JSON object with the following fields or an error if the request is unsuccessful.

  • date

    The date for the horoscope in YYYY-MM-DD format.

  • zodiac

    The zodiac sign the horoscope is for.

  • horoscope

    The daily horoscope text for the specified zodiac sign.

Sample Request Live Demo!

zodiac
date premium

Try our APIs in the API playground

Sign up for a free API key to get started — no credit card required.

https://api.api-ninjas.com/v1/horoscope?zodiac=virgo

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
{
    date:"2023-07-15",
    zodiac:"virgo",
    horoscope:"Today is a day for careful planning and attention to detail, Virgo. Your analytical skills are heightened, making it an excellent time to tackle complex problems. In your personal relationships, clear communication will prevent misunderstandings. Take some time for self-care and don't be too critical of yourself or others. A small act of kindness could have unexpected positive results."
}

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v1/horoscope?zodiac=virgo" \ -H "X-Api-Key: YOUR_API_KEY"

If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.

Frequently Asked Questions

  • Yes, but you must have a premium subscription. Commercial use of the Horoscope API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.
  • Sign up for a free account to instantly get your API key, then pass it in the X-Api-Key header on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.
  • Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.
  • The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.
  • Send a GET request to the /v1/horoscope endpoint with the required zodiac parameter, which accepts any of the twelve signs: aries, taurus, gemini, cancer, leo, virgo, libra, scorpio, sagittarius, capricorn, aquarius, or pisces. Get a free key on the registration page to start making requests.
  • Yes, you can pass an optional date parameter in YYYY-MM-DD format to fetch a historical horoscope, but it must be the current date or in the past and cannot be in the future. Note that the date parameter is a premium-only feature, so review the pricing page for details.
  • Each successful response is a JSON object containing the date of the horoscope (YYYY-MM-DD), the zodiac sign it applies to, and the horoscope text itself; unsuccessful requests return an error code described on the error codes page.
  • The Horoscope API is great for adding daily astrology content to astrology apps, lifestyle websites, chatbots, or social media bots that post a fresh reading for each zodiac sign. It pairs well with other content APIs like Quotes, Advice, and Facts for building engaging daily-content experiences.