Horoscope API
The Horoscope API provides daily horoscopes for all zodiac signs.
From 3,700 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 218ms | 235ms | 276ms | 528ms | 882ms |
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
zodiacrequiredThe zodiac sign to get a horoscope for. Valid values are:
aries,taurus,gemini,cancer,leo,virgo,libra,scorpio,sagittarius,capricorn,aquarius,pisces.dateoptional premium onlyThe 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-KeyrequiredAPI Key associated with your account.
Response
A JSON object with the following fields or an error if the request is unsuccessful.
dateThe date for the horoscope in YYYY-MM-DD format.
zodiacThe zodiac sign the horoscope is for.
horoscopeThe daily horoscope text for the specified zodiac sign.
Sample Request Live Demo!
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=virgoHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
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
Can I use the Horoscope API for commercial purposes?
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.How do I get an API key and start using the Horoscope API?
Sign up for a free account to instantly get your API key, then pass it in theX-Api-Keyheader on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.What happens if I exceed my quota for the month?
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.What happens if a request to the Horoscope API fails?
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.How do I get a horoscope for a specific zodiac sign?
Send a GET request to the/v1/horoscopeendpoint with the requiredzodiacparameter, which accepts any of the twelve signs:aries,taurus,gemini,cancer,leo,virgo,libra,scorpio,sagittarius,capricorn,aquarius, orpisces. Get a free key on the registration page to start making requests.Can I retrieve horoscopes for past dates?
Yes, you can pass an optionaldateparameter 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 thedateparameter is a premium-only feature, so review the pricing page for details.What fields does the Horoscope API response include?
Each successful response is a JSON object containing thedateof the horoscope (YYYY-MM-DD), thezodiacsign it applies to, and thehoroscopetext itself; unsuccessful requests return an error code described on the error codes page.What are some use cases for the Horoscope API?