Build with StarsAPI.
Make your first API call in 60 seconds. Browse 84+ endpoints across eight domains, all returning structured JSON with documented fields.
Quickstart
5 MINYour first call in under a minute. Get your key, hit /natal, parse JSON.
Start now →Authentication
X-API-KEYEvery request needs an API key in the X-Api-Key header. Rotate from your dashboard.
Read auth →API Reference
84+ ENDPOINTSLive, interactive endpoint explorer. Try every endpoint with sample data.
Open reference →OpenAPI Spec
3.1Machine-readable schema. Generate type-safe clients in any language.
Get spec →Quickstart
Three steps from zero to a working call.
1. Get an API key
Sign up on the pricing page, pick a plan, and your key arrives instantly. Test keys for trial integration are available on request via contact.
2. Resolve a birth place
Use the free Location API to turn a place name into coordinates and timezone:
curl -H "X-Api-Key: YOUR_KEY" \
"https://starsapi.com/include/suggest-location.php?term=Mumbai"
# returns [{ locationid: 1275339, label: "Mumbai, Maharashtra, IN" }, ...]
curl -H "X-Api-Key: YOUR_KEY" \
"https://starsapi.com/include/location-info.php?id=1275339"
# returns { latitude: 19.0760, longitude: 72.8777, timezone: "Asia/Kolkata", ... }
3. Generate a kundli
curl -X POST https://starsapi.com/api/v2/vedic/natal \
-H "X-Api-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Test User",
"datetime": "1991-11-21T21:21:00",
"latitude": 28.6139,
"longitude": 77.2090,
"timezone": "Asia/Kolkata",
"ayanamsa": "lahiri"
}'
That's it. Every endpoint follows the same pattern: X-Api-Key header, decimal lat/lon, IANA timezone.
Authentication
Every request needs an X-Api-Key header. Keys are tied to a plan and tracked per-request for usage. Rotate at any time from the dashboard — old keys deactivate instantly.
API Reference
The interactive reference is the fastest way to explore endpoints. Every endpoint has a "Try it" button that hits the live API with your test key and returns real data.
OpenAPI 3.1 Spec
Download the full schema and generate clients for any language:
curl https://starsapi.com/api/v2/openapi.json > starsapi.json npx openapi-typescript starsapi.json -o starsapi-types.ts
Postman Collection
Import our pre-built collection with all 84+ endpoints, environment variables, and example requests:
Status & SLA
Live status at status.starsapi.com. Builder and Scale plans get a 99.9% uptime SLA with credits for breaches.