GET · HOROSCOPE

Weekly Horoscope

Endpoint 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:

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

See authentication for security considerations.

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 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:

FormatExampleResolves to
Keyword (hyphen or underscore)this-week or this_weekMon–Sun of current week (IST)
Keywordnext-week or next_weekMon–Sun of upcoming week
Keywordlast-week or last_weekMon–Sun of previous week
ISO week2026-W22The specific ISO 8601 week (May 25–31, 2026)
Any date in week2026-05-27Mon–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:

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 weekly for this endpoint.
data.period_keystringISO 8601 week key, e.g. 2026-W22. Stable cache key.
data.period_start_datestring (YYYY-MM-DD)Monday of the target week.
data.period_end_datestring (YYYY-MM-DD)Sunday of the target week.
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. Transformative, Inspirational).
data.lucky_numberintegerSuggested lucky number for the week.
data.lucky_colorstringSuggested lucky color.
data.lucky_timenullNot applicable for weekly — always null. See Daily Horoscope for time-of-day windows.
data.compatible_signstringMost compatible sign for the week.
data.ratings.loveinteger (1–5)Love rating for the week.
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 week.
data.dontsarray of stringsActions to avoid for the week.
data.key_themestringOne-phrase theme for the week.
data.generated_atstringWhen this content was generated (server time).
data.served_tierstringContent tier served (e.g. canonical).
data.partner_tierstringYour partner tier as configured on the API key.
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

  • Weekly tab in a mobile app — use content with Flutter Html widget, with period_start_date / period_end_date rendered as a "May 25 – May 31" header.
  • Monday morning newsletter — use content as email body, summary in the subject line. Send Monday 06:00 IST after Sunday generation.
  • Sunday evening push — notify users with summary for the week ahead.
  • WhatsApp / Telegram bot — use content_text for plain text with natural paragraph breaks.
  • Carousel UI — use content_paragraphs array to make each paragraph a swipeable card.
  • Weekly rating dashboard — use ratings for 5-star bars, mood for 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()))
);
Cache for 7 days. Weekly horoscopes don't change Mon–Sun. Use 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

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 yet generated for that week (querying a future week before its cron runs)
429RATE_LIMIT_EXCEEDEDPlan 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