GET · HOROSCOPE

Daily Horoscope

Endpoint GET https://starsapi.com/api/v3/horoscope/daily

Returns daily horoscope content for a single zodiac sign. One endpoint covers every combination — 12 signs × 2 zodiac systems × 3 sub-types × supported languages. Content is generated nightly at 03:00 IST and served from cache thereafter (typical response under 50 ms).

Authentication

Required. Three methods accepted:

MethodExample
Header (recommended)X-Api-Key: sa_live_xxxxxxxxxxxx
BearerAuthorization: Bearer sa_live_xxxxxxxxxxxx
Query?api_key=sa_live_xxxxxxxxxxxx

See authentication for security considerations.

Free Plan Returns Sample Content

On the free plan this endpoint returns a fixed sample horoscope. The same content comes back for every date, sign system and language, and the response carries "is_sample": true along with "served_tier": "sample".

The sample matches the live response field for field, so you can build and test your entire integration on it — parsing, UI, caching, error handling. Live content, generated fresh every night, requires a paid plan. See pricing.

Query parameters

ParamRequiredDefaultAccepted values
sign Yes Aries, Taurus, Gemini, Cancer, Leo, Virgo, Libra, Scorpio, Sagittarius, Capricorn, Aquarius, Pisces
zodiac_system No vedic_moon vedic_moon · western_sun
sub_type No general general · love · career
date No today today · tomorrow · yesterday · YYYY-MM-DD
language No en en · hi (Tamil, Telugu, Bengali, Marathi, Gujarati, Kannada, Malayalam, Punjabi, Odia, Assamese coming soon)

Response shape

Successful responses contain a top-level status + success flag, a data object with the horoscope content, and a meta envelope with request metadata:

FieldTypeDescription
statusintegerHTTP status code echo (200 on success).
successbooleanAlways true on success.
data
data.signstringEcho of the requested sign.
data.zodiac_systemstringZodiac system used.
data.sub_typestringSub-type returned.
data.period_typestringAlways daily for this endpoint.
data.datestring (YYYY-MM-DD)The date this horoscope is for.
data.languagestringLanguage of the returned content.
data.summarystringShort single-line summary — ideal for push notifications, list previews.
data.contentstring (HTML)Full horoscope wrapped in <p> tags. Use for web, Flutter Html widget, email bodies.
data.content_textstringPlain text with \n\n between paragraphs. Use for SMS, WhatsApp/Telegram bots, voice TTS.
data.content_paragraphsarray of stringsEach paragraph as a separate string — for custom UI per-paragraph styling.
data.moodstringMood keyword (e.g. Nurturing, Introspective).
data.lucky_numberintegerSuggested lucky number.
data.lucky_colorstringSuggested lucky color.
data.lucky_timestringTime window of the day favourable for important actions.
data.compatible_signstringMost compatible sign for the day.
data.ratings.loveinteger (1–5)Love rating for the day.
data.ratings.careerinteger (1–5)Career rating.
data.ratings.moneyinteger (1–5)Money rating.
data.ratings.healthinteger (1–5)Health rating.
data.ratings.overallinteger (1–5)Overall rating.
data.dosarray of stringsRecommended actions for the day.
data.dontsarray of stringsActions to avoid for the day.
data.key_themestringOne-phrase theme for the day.
data.generated_atstringWhen this content was generated (server time).
data.served_tierstringContent tier served: sample (free plan), canonical, or premium.
data.partner_tierstringYour partner tier as configured on the API key.
data.is_samplebooleantrue when sample content was served (free plan). false on all paid plans.
data.noticestring | nullPlain-language explanation when is_sample is true. null otherwise.
meta
meta.endpointstringEcho of the called endpoint path.
meta.versionstringAPI version (currently 3.0).
meta.response_time_msintegerServer-side response time in milliseconds.
meta.timestampstring (ISO 8601)UTC time the response was served.
meta.credits_remainingintegerAPI credits remaining on your plan.
meta.request_idstringUnique request identifier — include in support tickets.

The three content formats

Each response returns the same horoscope in three pre-formatted variants so you don't need a parser:

FieldFormatUse for
contentHTMLWeb pages (drop into innerHTML), Flutter Html widget, WordPress, email bodies.
content_textPlain textSMS, WhatsApp/Telegram bots, voice TTS, plain Text widgets.
content_paragraphsArray of stringsCustom UI where each paragraph should be styled independently.

Use cases

  • Mobile app — use content with Flutter Html widget or React Native HTML renderer, or content_text for native Text widgets.
  • Web site — drop content into innerHTML. Paragraph tags render natively.
  • Email newsletter — use content directly in HTML email body.
  • WhatsApp / SMS bot — use content_text for plain text with paragraph breaks.
  • Voice / TTScontent_text with \n\n separators gives natural pauses.
  • Push notifications — use summary, purpose-built for short previews under 100 chars.
  • Dashboard widgets — use ratings for 5-star bars, lucky_* for highlight tiles, mood for emoji.

Fetching all 12 signs at once

For sign-picker UIs or dashboard widgets, fetch all 12 signs in parallel. Each call counts as one request against your quota.

// JavaScript
const signs = ['Aries','Taurus','Gemini','Cancer','Leo','Virgo',
               'Libra','Scorpio','Sagittarius','Capricorn','Aquarius','Pisces'];

const all = await Promise.all(
  signs.map(s => fetch(`https://starsapi.com/api/v3/horoscope/daily?sign=${s}`, {
    headers: { 'X-Api-Key': 'YOUR_API_KEY' }
  }).then(r => r.json()))
);
Cache for the day. Horoscope content does not change within a day. Fetch once per app session and cache until next IST midnight (localStorage, Hive, shared_preferences, Redis, etc.).

Errors

HTTPCodeCause
400MISSING_SIGNsign param not provided
400INVALID_SIGNSign name not in 12-sign list
400INVALID_ZODIAC_SYSTEMMust be vedic_moon or western_sun
400INVALID_SUB_TYPEMust be general, love, or career
400INVALID_LANGUAGEUnsupported language code
400INVALID_DATEBad date format
401AUTH_MISSING_KEYNo API key in request
401AUTH_INVALID_KEYKey format invalid or not found
401AUTH_REVOKED_KEYKey has been revoked
403AUTH_ORIGIN_DENIEDRequest from non-whitelisted origin
404HOROSCOPE_NOT_AVAILABLEContent not generated yet for that date
429RATE_LIMIT_EXCEEDEDPlan quota exceeded

Error response format

{
  "success": false,
  "error": {
    "code": "INVALID_SIGN",
    "message": "Invalid sign: 'Ares'. Must be one of: Aries, Taurus, ..."
  }
}

Content schedule

  • 03:00 IST — daily horoscopes generated for all 12 signs × 2 zodiac systems × 3 sub-types × supported languages.
  • ~04:00 IST — all content ready. Endpoint returns fresh content for ?date=today.
  • ~50ms response — after generation, the endpoint is a DB lookup; never blocks on AI at request time.

See also