Skip to content

Modules

AstroAPI features are organized into modules.

Available Modules

ModuleDescription
natalBasic natal chart calculations
transitsTransit calculations and tracking
synastrySynastry and composite charts
content-basicBasic interpretation library
content-premiumExtended interpretation library
chartsSVG/PNG chart rendering
horoscopesAI-powered daily horoscopes

Checking Module Access

bash
curl -X GET "https://api.astroapi.cloud/api/modules" \
  -H "X-Api-Key: your-api-key"

Response

json
{
  "data": [
    {
      "type": "module",
      "id": "natal",
      "attributes": {
        "name": "Natal Charts",
        "enabled": true,
        "expiresAt": null
      }
    },
    {
      "type": "module",
      "id": "transits",
      "attributes": {
        "name": "Transits",
        "enabled": true,
        "expiresAt": "2024-12-31T23:59:59Z"
      }
    }
  ]
}

Module-Gated Endpoints

When accessing an endpoint that requires a module you don't have:

json
{
  "errors": [{
    "status": "403",
    "title": "Module Required",
    "detail": "This endpoint requires the 'synastry' module.",
    "meta": {
      "requiredModule": "synastry"
    }
  }]
}

API Key Permissions

API keys can be restricted to specific modules. Even if your organization has access to a module, individual API keys can be scoped to exclude it:

json
{
  "apiKey": {
    "modules": ["natal", "content-basic"]
  }
}

AstroAPI Documentation