Platform

Your usage and the conventions this API computes with.

Credits used and remaining this period

GET/v1/usage

0 credits · Secret key (test or live) · getUsage

Response

JSON { data, meta, warnings }, where data is:

  • period_start string (date) required

    e.g. "1990-08-13"

  • period_end string (date) required

    e.g. "1990-08-13"

  • credits_included integer required
  • credits_used integer required
  • by_group map of integer required

Errors: 400, 401, 403, 404, 422, 429, 500. See error codes.

Example request

curl 'https://api.astrologics.in/v1/usage' \
  -H 'Authorization: Bearer al_test_YOUR_KEY'
Node.js
const res = await fetch("https://api.astrologics.in/v1/usage", {
  headers: { Authorization: "Bearer al_test_YOUR_KEY" },
});
console.log(JSON.stringify(await res.json(), null, 2));
Python
import json
import urllib.error
import urllib.request

req = urllib.request.Request(
    "https://api.astrologics.in/v1/usage",
    method="GET",
    headers={"Authorization": "Bearer al_test_YOUR_KEY"},
)
try:
    with urllib.request.urlopen(req) as res:
        print(json.dumps(json.load(res), indent=2, ensure_ascii=False))
except urllib.error.HTTPError as err:
    print(err.code, err.read().decode())
PHP
<?php
$ch = curl_init('https://api.astrologics.in/v1/usage');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer al_test_YOUR_KEY'],
    CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch), PHP_EOL;

Example response

200 OK · 334 characters
{
  "data": {
    "period_start": "2026-09-01",
    "period_end": "2026-09-30",
    "credits_included": 1500000,
    "credits_used": 81,
    "by_group": {}
  },
  "meta": {
    "request_id": "req_example",
    "api_version": "v1",
    "engine_version": "2026.9.28",
    "mode": "live",
    "credits_charged": 0
  },
  "warnings": []
}
Try it

Leave empty to use the shared demo key (limited). Test keys only: never charged. Kept in this browser tab and sent through this site to the API. Create one

Defaults and conventions (ayanamsa, node, sunrise definition, what is not computed)

GET/v1/meta/conventions

0 credits · No key needed · getConventions

Response

JSON { data, meta, warnings }, where data is:

  • engine_version string required
  • ayanamsa string required
  • kp_ayanamsa string required
  • house_system string required
  • node string required
  • sunrise string required
  • moonrise string required
  • lunar_month string required
  • ayanamsa_options string required
  • not_computed array of string required

Errors: 400, 401, 403, 404, 422, 429, 500. See error codes.

Example request

curl 'https://api.astrologics.in/v1/meta/conventions'
Node.js
const res = await fetch("https://api.astrologics.in/v1/meta/conventions", {
});
console.log(JSON.stringify(await res.json(), null, 2));
Python
import json
import urllib.error
import urllib.request

req = urllib.request.Request(
    "https://api.astrologics.in/v1/meta/conventions",
    method="GET",
    headers={},
)
try:
    with urllib.request.urlopen(req) as res:
        print(json.dumps(json.load(res), indent=2, ensure_ascii=False))
except urllib.error.HTTPError as err:
    print(err.code, err.read().decode())
PHP
<?php
$ch = curl_init('https://api.astrologics.in/v1/meta/conventions');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch), PHP_EOL;

Example response

200 OK · 977 characters
{
  "data": {
    "engine_version": "2026.9.28",
    "ayanamsa": "lahiri",
    "kp_ayanamsa": "kp_new (Lahiri − 5′24″)",
    "house_system": "whole_sign",
    "node": "true",
    "sunrise": "upper limb, refracted",
    "moonrise": "the Moon's centre on the true horizon (festival moments; the panchang does not give moonrise)",
    "lunar_month": "amanta (new moon to new moon); purnimanta names alongside",
    "ayanamsa_options": "lahiri (default), raman, krishnamurti, yukteshwar, fagan_bradley: options.ayanamsa on chart operations; the calendar, panchang and KP are unaffected",
    "not_computed": [
      "moonrise in the panchang",
      "yoga/karana end times",
      "Vaishnava paran (Ekadashi)",
      "Vaishnava Janmashtami",
      "Ghatak Chakra",
      "Chara-dasha antardashas"
    ]
  },
  "meta": {
    "request_id": "req_example",
    "api_version": "v1",
    "engine_version": "2026.9.28",
    "mode": "live",
    "credits_charged": 0
  },
  "warnings": []
}
Try it

This operation needs no key.