# AstroWay API Documentation

The technical documentation hub for AstroWay API. {siteMeta.endpoints} endpoints powered by Swiss Ephemeris, a machine-readable OpenAPI spec, ready-to-import Postman/Insomnia collections, official SDKs for TypeScript, Python and PHP, plus an MCP server for Claude and Cursor.

## Reference

<CardGrid>
  <LinkCard
    title="API Reference"
    href="/en/docs/api/"
    description={`Full catalogue of ${siteMeta.endpoints} endpoints — parameters, response schemas, error codes. Regenerated from the OpenAPI spec on every release.`}
  />
  <LinkCard
    title="OpenAPI specification"
    href="https://api.astroway.info/v1/openapi.json"
    description="Machine-readable spec. Import into Postman or Insomnia, or generate your own SDK with openapi-generator."
  />
  <LinkCard
    title="Postman collection"
    href="https://api.astroway.info/postman/astroway-api.json"
    description="Ready-to-import collection with examples for every endpoint."
  />
  <LinkCard
    title="Per-endpoint cost"
    href="/en/credits/"
    description="Cost in credits for every endpoint — from 0 to 500 credits per call."
  />
</CardGrid>

## Getting started

<CardGrid>
  <LinkCard
    title="Quick start"
    href="/en/getting-started/"
    description="Sign up, grab a key, make your first call in 5 minutes."
  />
  <LinkCard
    title="Authentication"
    href="/en/authentication/"
    description="X-Api-Key vs Bearer, live (aw_live_*) vs sandbox (aw_test_*) keys, JWT for the dashboard."
  />
  <LinkCard
    title="Credits & rate limits"
    href="/en/rate-limits-credits/"
    description="Credit pooling, monthly quotas, rate limits per plan."
  />
  <LinkCard
    title="Language support"
    href="/en/languages/"
    description="21 active languages. Response-text localisation via `Accept-Language` header."
  />
</CardGrid>

## SDKs and integrations

<CardGrid>
  <LinkCard
    title="TypeScript SDK"
    href="https://www.npmjs.com/package/@astroway/sdk"
    description="Official `@astroway/sdk` package on npm. ESM, Node 20+, browser-compatible."
  />
  <LinkCard
    title="Python SDK"
    href="https://pypi.org/project/astroway/"
    description="Official `astroway` package on PyPI. Sync and async clients, Python 3.9+."
  />
  <LinkCard
    title="PHP SDK"
    href="https://packagist.org/packages/astroway/sdk"
    description="Official `astroway/sdk` package on Packagist. PSR-18 HTTP, PHP 8.1+."
  />
  <LinkCard
    title="MCP server"
    href="https://www.npmjs.com/package/@astroway/mcp"
    description="`@astroway/mcp` — Model Context Protocol server for Claude Desktop, Cursor and other MCP-compatible AI agents."
  />
</CardGrid>

## Engineering

<CardGrid>
  <LinkCard
    title="Calculation accuracy"
    href="/en/accuracy/"
    description="Swiss Ephemeris arc-second precision. CI snapshot tests against the NASA Eclipse Catalog."
  />
  <LinkCard
    title="Errors"
    href="/en/errors/"
    description="Error codes, HTTP statuses, and the error envelope structure."
  />
  <LinkCard
    title="Idempotency"
    href="/en/idempotency/"
    description="`Idempotency-Key` header for safe POST retries."
  />
  <LinkCard
    title="Versioning"
    href="/en/versioning/"
    description="How we bump versions, what breaks compatibility, how to read the changelog."
  />
</CardGrid>

## Use cases and examples

<CardGrid>
  <LinkCard
    title="Products overview"
    href="/en/products/"
    description="Four product groups — Birth Chart, Human Design, Synastry, Horoscope."
  />
  <LinkCard
    title="Vedic astrology"
    href="/en/vedic/"
    description="354+ endpoints for Vedic — Vargas, dashas (8 systems), Panchang, Shadbala, Yogas, Doshas."
  />
  <LinkCard
    title="Code examples"
    href="/en/examples/"
    description="Ready snippets for natal chart, synastry, transits, Human Design, MCP."
  />
  <LinkCard
    title="Use cases"
    href="/en/use-cases/"
    description="Integration scenarios for astrology apps, AI agents, and dating platforms."
  />
</CardGrid>
