Usage and Credits API
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_startstring (date) requirede.g.
"1990-08-13"period_endstring (date) requirede.g.
"1990-08-13"credits_includedinteger requiredcredits_usedinteger requiredby_groupmap 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 · 2,038 characters
{
"data": {
"period_start": "2026-10-01",
"period_end": "2026-10-31",
"credits_included": 1500000,
"credits_used": 104,
"by_group": {
"getAshtakavarga": 2,
"getAshtakoot": 1,
"getAspects": 1,
"getBirthDetails": 1,
"getBusinessNameNumber": 1,
"getChara": 2,
"getChartPng": 3,
"getChartSvg": 2,
"getChoghadiya": 1,
"getClassicalChart": 2,
"getCurrentDasha": 2,
"getD12Analysis": 2,
"getDashaTransitConfluence": 2,
"getDivisional": 2,
"getEclipseImpact": 2,
"getEkadashis": 1,
"getFavourableDays": 1,
"getFestivals": 2,
"getGrahaYuddha": 1,
"getHora": 1,
"getHoroscope": 1,
"getHoroscopeFeed": 5,
"getKaalSarp": 1,
"getKpChart": 2,
"getKpHorary": 2,
"getKpRulingPlanets": 1,
"getKpSignificators": 2,
"getKundli": 2,
"getLalKitabChart": 2,
"getLalKitabDebts": 1,
"getLalKitabVarshphal": 2,
"getLoShu": 1,
"getLuckyName": 1,
"getManglik": 1,
"getManglikMatch": 2,
"getMobileNumber": 1,
"getMuhuratDay": 1,
"getMuhuratDays": 2,
"getMuhuratYear": 2,
"getNameNumber": 1,
"getNatalTransits": 2,
"getNumerologyCompatibility": 1,
"getNumerologyCore": 1,
"getOuterPlanets": 2,
"getPanchang": 1,
"getPersonalHoroscope": 2,
"getPersonalTiming": 2,
"getPlace": 1,
"getPlanetPositions": 1,
"getSadeSati": 1,
"getSadeSatiTimeline": 2,
"getShadbala": 2,
"getTimezone": 1,
"getTithis": 1,
"getVimshottari": 2,
"getYogas": 2,
"getYogini": 2,
"listMuhuratActivities": 0,
"listTransits": 1,
"reversePlace": 1,
"searchMuhurat": 2,
"searchMuhuratPersonal": 3,
"searchPlaces": 2
}
},
"meta": {
"request_id": "req_example",
"api_version": "v1",
"engine_version": "2026.10.4",
"mode": "live",
"credits_charged": 0
},
"warnings": []
}Try it
More in Platform
- Calculation Conventions API: Defaults and conventions (ayanamsa, node, sunrise definition, what is not computed)