Skip to content
AstroWay/api v2.19.0 · docs
all systems operational
UA EN

Credits & Rate Limits

AstroWay uses a credit-based model instead of a simple request counter.

This is fairer: lightweight endpoints (/planets) cost 10 credits, heavy ones (/rectification) — 500.

Credits per month depend on your plan:

PlanCredits/moRate limit
Free10,00010 req/min
Indie50,00030 req/min
Starter200,000120 req/min
Pro800,000400 req/min
Business3,500,0001,000 req/min
EnterpriseCustomCustom

When credits run out — subsequent requests return 402 Payment Required (Free) or trigger overage billing (Indie+).

Rate limit uses a sliding window. If you fire 120 requests in 10 seconds, the next 50 seconds on that key return 429.

The 14 reference dictionaries /v1/reference/* (signs, planets, houses, aspects, elements, modalities, polarities, dignities, decans, nakshatras, lots, asteroids, zodiac-systems, glyphs) are served publicly without an X-Api-Key and cost 0 credits. Limit — 30 requests / hour per IP. The same data is also exposed as MCP Resources at astroway://reference/<slug> for LLM agents.

Full transparent per-endpoint table with all 705+ endpoints and their costs — at Per-endpoint Cost. DivineAPI / AstrologyAPI / Prokerala don’t publish anything similar. Quick reference:

TierCreditsTypical timeExamples
110< 50 ms/planets, /moon-voc, /iching
22050–200 ms/chart, /harmonics, /horary
350200–500 ms/synastry, /progressions, /acg
4100> 500 ms/transit-calendar, /forecast-calendar
5250seconds/rectification/trutine
6500up to 120s/rectification

Every response includes:

X-Credits-Used: 20
X-Credits-Remaining: 9980
X-Credits-Reset: 2026-05-01T00:00:00Z
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 118
X-RateLimit-Reset: 1714521600
X-Request-Id: 01HXY2A7ZM...
  • X-Credits-Used — credits charged for this request
  • X-Credits-Remaining — remainder of monthly budget
  • X-Credits-Reset — ISO-8601 balance reset date
  • X-RateLimit-* — current sliding window state (standard format)
  • X-Request-Id — ULID for this request, use in support requests

Identical requests within 5 minutes return from cache without consuming credits. This is a separate header:

X-Cache: HIT
X-Credits-Used: 0

What counts as “identical”:

  • Same endpoint
  • Same JSON body (byte-for-byte after whitespace normalization)
  • Same API key

This is safe because all endpoints are deterministic — same input always produces same output.

{
"error": {
"code": "credits_exhausted",
"message": "Monthly credit budget exhausted. Upgrade plan or wait for reset.",
"credits_remaining": 0,
"credits_reset": "2026-05-01T00:00:00Z",
"upgrade_url": "https://api.astroway.info/dashboard/billing"
}
}

Options:

  • Upgrade plan — immediate new budget
  • Overage (Starter/Pro) — auto-enabled unless disabled in settings
  • Wait for reset (Free) — 1st of next month
{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Retry after 12 seconds.",
"retry_after_seconds": 12
}
}

Retry-After: 12 header — standard HTTP, your HTTP client should understand it.

Correct handling:

async function callWithRetry(endpoint: string, body: object) {
const response = await fetch(endpoint, {
method: 'POST',
headers: { 'X-Api-Key': key, 'Content-Type': 'application/json' },
body: JSON.stringify(body),
});
if (response.status === 429) {
const retryAfter = Number(response.headers.get('Retry-After') ?? 1);
await new Promise((r) => setTimeout(r, retryAfter * 1000));
return callWithRetry(endpoint, body);
}
return response.json();
}

Before integrating, estimate monthly credits:

monthly_credits = daily_active_users × calls_per_user × avg_cost_per_call × 30

Example: app with 500 DAU, each making 3 chart calculations + 1 synastry per day:

500 × (3 × 20 + 1 × 50) × 30 = 500 × 110 × 30 = 1,650,000 credits/mo
→ Enterprise (custom)

Budget calculator — on the Pricing page.

Was this helpful?
Suggest an edit

Last updated: