Authentication
Send your key in the Authorization header of every request:
Authorization: Bearer al_test_…
These need no key at all: GET /v1/meta/conventions.
Key kinds
| Kind | Starts with | What it does |
|---|---|---|
| Test | al_test_ |
Real engine, never charged; meta.mode is test. Each project has a daily allowance of test calls, shared by all its test keys. |
| Live | al_live_ |
Spends your plan's credits. Only successful (2xx) calls are charged. |
| Publishable | al_pub_ |
For widgets in the browser: read-only operations without birth data, and only from the web origins you list. |
Test and live keys are secret. Use them only from your server, never in a web page or a mobile app.
Publishable keys
A publishable key can call only these operations:
GET /v1/planets/nowThe sky now: sidereal positions at the top of the current hourGET /v1/outer-planets/cycleThe retrograde cycle of Saturn, Uranus, Neptune or Pluto: its stations and whether it is retrograde nowGET /v1/panchangPanchang for a date and placeGET /v1/panchang/choghadiyaDay and night choghadiyaGET /v1/muhurat/activitiesSupported muhurat activitiesGET /v1/muhurat/dayOne day judged for an activity: the panchang, the verdict, the windows left after Rahu Kaal, Yamaganda and GulikaGET /v1/muhurat/{occasion}/yearThe dated muhurat list of a year for an occasion: the days that hold a window, with the windowsGET /v1/muhurat/{occasion}Every local day between two dates for an occasion: available with its windows, or the reason it is notGET /v1/panchang/horaHora: the 24 planetary hours of a dayGET /v1/calendar/tithisTithi start and end moments between two dates, and the tithi at each sunriseGET /v1/calendar/ekadashiEvery Ekadashi of a year: the vrat date, the tithi and the paran windowGET /v1/calendar/festivalsFestivals of a year, each by its own rule, with its windows and momentsGET /v1/horoscope/{sign}Horoscope for one signGET /v1/horoscopeAll 12 signs (publisher feed)GET /v1/transits/eventsPlanetary events: sign changes, retrograde stations and eclipses, with IST timesGET /v1/transitsIngresses, stations and combustion between datesGET /v1/transits/graha-yuddhaGraha yuddha (planetary war) now: Mercury, Venus, Mars, Jupiter and Saturn within 1.5°GET /v1/horoscope/weekly/rashi-tonesThe week's tone for each rashi: a 0–100 score per day, the band, the best and worst days and the planet behind itGET /v1/kp/ruling-planetsThe seven KP ruling planets at a moment and placeGET /v1/kp/horaryKP horary (prashna) for a number from 1 to 249GET /v1/vastu/referenceThe 32 padas with their door effects and verses, the 45 devatas, the room rules and the score's weights
The request's Origin header must exactly match one of the key's allowed origins, such as https://www.example.com. Otherwise the API answers 403 domain_not_allowed. Any other operation answers 403 scope_not_allowed.
Rotating a key
- On API keys, choose Rotate. A new key with the same name and settings is created, and the old one keeps working.
- Deploy the new key.
- Revoke the old key. It stops working on the next request.
When a key is refused
Missing, malformed, unknown, revoked and expired keys all get the same answer, 401 invalid_api_key, so nobody can probe which keys exist.