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:
| Method | Example |
|---|---|
| Header (recommended) | X-Api-Key: am_live_xxxxxxxxxxxx |
| Bearer | Authorization: Bearer am_live_xxxxxxxxxxxx |
| Query | ?api_key=am_live_xxxxxxxxxxxx |
See authentication for security considerations.
Query parameters
| Param | Required | Default | Accepted 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:
| Field | Type | Description |
|---|---|---|
status | integer | HTTP status code echo (200 on success). |
success | boolean | Always true on success. |
| data | ||
data.sign | string | Echo of the requested sign. |
data.zodiac_system | string | Zodiac system used. |
data.sub_type | string | Sub-type returned. |
data.period_type | string | Always daily for this endpoint. |
data.date | string (YYYY-MM-DD) | The date this horoscope is for. |
data.language | string | Language of the returned content. |
data.summary | string | Short single-line summary — ideal for push notifications, list previews. |
data.content | string (HTML) | Full horoscope wrapped in <p> tags. Use for web, Flutter Html widget, email bodies. |
data.content_text | string | Plain text with \n\n between paragraphs. Use for SMS, WhatsApp/Telegram bots, voice TTS. |
data.content_paragraphs | array of strings | Each paragraph as a separate string — for custom UI per-paragraph styling. |
data.mood | string | Mood keyword (e.g. Nurturing, Introspective). |
data.lucky_number | integer | Suggested lucky number. |
data.lucky_color | string | Suggested lucky color. |
data.lucky_time | string | Time window of the day favourable for important actions. |
data.compatible_sign | string | Most compatible sign for the day. |
data.ratings.love | integer (1–5) | Love rating for the day. |
data.ratings.career | integer (1–5) | Career rating. |
data.ratings.money | integer (1–5) | Money rating. |
data.ratings.health | integer (1–5) | Health rating. |
data.ratings.overall | integer (1–5) | Overall rating. |
data.dos | array of strings | Recommended actions for the day. |
data.donts | array of strings | Actions to avoid for the day. |
data.key_theme | string | One-phrase theme for the day. |
data.generated_at | string | When this content was generated (server time). |
data.served_tier | string | Content tier served (e.g. canonical). |
data.partner_tier | string | Your partner tier as configured on the API key. |
| meta | ||
meta.endpoint | string | Echo of the called endpoint path. |
meta.version | string | API version (currently 3.0). |
meta.response_time_ms | integer | Server-side response time in milliseconds. |
meta.timestamp | string (ISO 8601) | UTC time the response was served. |
meta.credits_remaining | integer | API credits remaining on your plan. |
meta.request_id | string | Unique 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:
| Field | Format | Use for |
|---|---|---|
content | HTML | Web pages (drop into innerHTML), Flutter Html widget, WordPress, email bodies. |
content_text | Plain text | SMS, WhatsApp/Telegram bots, voice TTS, plain Text widgets. |
content_paragraphs | Array of strings | Custom UI where each paragraph should be styled independently. |
Use cases
- Mobile app — use
contentwith FlutterHtmlwidget or React Native HTML renderer, orcontent_textfor native Text widgets. - Web site — drop
contentintoinnerHTML. Paragraph tags render natively. - Email newsletter — use
contentdirectly in HTML email body. - WhatsApp / SMS bot — use
content_textfor plain text with paragraph breaks. - Voice / TTS —
content_textwith\n\nseparators gives natural pauses. - Push notifications — use
summary, purpose-built for short previews under 100 chars. - Dashboard widgets — use
ratingsfor 5-star bars,lucky_*for highlight tiles,moodfor 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
| HTTP | Code | Cause |
|---|---|---|
| 400 | MISSING_SIGN | sign param not provided |
| 400 | INVALID_SIGN | Sign name not in 12-sign list |
| 400 | INVALID_ZODIAC_SYSTEM | Must be vedic_moon or western_sun |
| 400 | INVALID_SUB_TYPE | Must be general, love, or career |
| 400 | INVALID_LANGUAGE | Unsupported language code |
| 400 | INVALID_DATE | Bad date format |
| 401 | AUTH_MISSING_KEY | No API key in request |
| 401 | AUTH_INVALID_KEY | Key format invalid or not found |
| 401 | AUTH_REVOKED_KEY | Key has been revoked |
| 403 | AUTH_ORIGIN_DENIED | Request from non-whitelisted origin |
| 404 | HOROSCOPE_NOT_AVAILABLE | Content not generated yet for that date |
| 429 | RATE_LIMIT_EXCEEDED | Plan 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
- Weekly Horoscope — 7-day variant (Monday–Sunday)
- Monthly Horoscope — calendar-month variant with structured sections
- Yearly Horoscope — full-year variant with 10 structured sections
- Horoscope overview — full category
- Errors reference — universal error codes