Weekly Horoscope
GET https://starsapi.com/api/v3/horoscope/weekly
Returns the 7-day weekly horoscope (Monday through Sunday, IST) for a single zodiac sign. Shares the same response shape as Daily Horoscope — only the period fields differ. Cached per (sign, ISO week, sub_type, zodiac_system, language) tuple. 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 | this_week |
See the date formats section below |
language |
No | en |
en · hi |
Date formats
The date parameter accepts several formats — pick whichever fits your client code:
| Format | Example | Resolves to |
|---|---|---|
| Keyword (hyphen or underscore) | this-week or this_week | Mon–Sun of current week (IST) |
| Keyword | next-week or next_week | Mon–Sun of upcoming week |
| Keyword | last-week or last_week | Mon–Sun of previous week |
| ISO week | 2026-W22 | The specific ISO 8601 week (May 25–31, 2026) |
| Any date in week | 2026-05-27 | Mon–Sun of the week containing that date |
ISO 8601 weeks always start Monday and end Sunday. The week containing January 4 is always W01.
Use meta.endpoint + data.period_key as a stable cache key — rotates naturally each week.
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 weekly for this endpoint. |
data.period_key | string | ISO 8601 week key, e.g. 2026-W22. Stable cache key. |
data.period_start_date | string (YYYY-MM-DD) | Monday of the target week. |
data.period_end_date | string (YYYY-MM-DD) | Sunday of the target week. |
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. Transformative, Inspirational). |
data.lucky_number | integer | Suggested lucky number for the week. |
data.lucky_color | string | Suggested lucky color. |
data.lucky_time | null | Not applicable for weekly — always null. See Daily Horoscope for time-of-day windows. |
data.compatible_sign | string | Most compatible sign for the week. |
data.ratings.love | integer (1–5) | Love rating for the week. |
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 week. |
data.donts | array of strings | Actions to avoid for the week. |
data.key_theme | string | One-phrase theme for the week. |
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
- Weekly tab in a mobile app — use
contentwith FlutterHtmlwidget, withperiod_start_date/period_end_daterendered as a "May 25 – May 31" header. - Monday morning newsletter — use
contentas email body,summaryin the subject line. Send Monday 06:00 IST after Sunday generation. - Sunday evening push — notify users with
summaryfor the week ahead. - WhatsApp / Telegram bot — use
content_textfor plain text with natural paragraph breaks. - Carousel UI — use
content_paragraphsarray to make each paragraph a swipeable card. - Weekly rating dashboard — use
ratingsfor 5-star bars,moodfor emoji headers.
Fetching all 12 signs at once
For weekly sign-picker screens or full-zodiac dashboards, 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/weekly?sign=${s}&date=this_week`,
{ headers: { 'X-Api-Key': 'YOUR_API_KEY' } }
).then(r => r.json()))
);
data.period_key (e.g. 2026-W22) as
your cache key — it rotates automatically when the week changes.
Fetch once at app open or week start, cache until the next Sunday after generation.
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 yet generated for that week (querying a future week before its cron runs) |
| 429 | RATE_LIMIT_EXCEEDED | Plan quota exceeded |
Error response format
{
"status": 404,
"success": false,
"error": {
"code": "HOROSCOPE_NOT_AVAILABLE",
"message": "Weekly horoscope not yet generated for Aries / vedic_moon / general / 2026-W25 / en"
},
"meta": {
"endpoint": "/api/v3/horoscope/weekly",
"version": "3.0",
"response_time_ms": 2,
"timestamp": "2026-05-31T13:56:38+05:30",
"request_id": "321ce360c8fef1aa"
}
}
See also
- Daily Horoscope — one-day variant with
lucky_timewindows - 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