Karana API with Electron
Integrate Karana API in Electron. Complete code examples and SDK documentation.
Operation
POST /v2/astrology/karana
Karana (half-tithi) for a given datetime and location, with its nature and recommended/avoided activities.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
datetime | body | string | — |
latitude | body | number | — |
longitude | body | number | — |
timezone | body | string | — |
Request example for Electron
Authenticate with Authorization: Bearer YOUR_API_KEY. This code runs on your users’ devices, so it must not hold your API key. Call a route on your own backend that adds the Authorization: Bearer YOUR_API_KEY header and forwards the request. The server-side pages linked below show such a route.
// Runs in the desktop app: call your own backend, not api.vedika.io.
const res = await fetch('https://your-backend.example.com/vedika/karana');
const data = await res.json();
Try it in the keyless sandbox
The sandbox mirrors the production route and needs no API key:
curl -X POST https://api.vedika.io/sandbox/astrology/karana \
-H "Content-Type: application/json" \
-d '{"datetime":"2026-03-23T12:00:00","latitude":28.6139,"longitude":77.209,"timezone":"+05:30"}'
Sandbox response from POST /sandbox/astrology/karana, abridged (billing block, long text fields and long lists trimmed). The sandbox answers with a fixed demo result and ignores your inputs; a production call computes the result for the details you send.
{
"data": {
"ayanamsa": {
"id": 1,
"name": "Lahiri",
"value": 23.79065
},
"coordinates": {
"latitude": 28.6139,
"longitude": 77.209
},
"datetime": "1995-01-01T12:00:00+05:30",
"disha_shool": {
"description": "West direction is inauspicious on Sunday.",
"direction": "West",
"directionHindi": "पश्चिम",
"remedies": [
"Eat jaggery before traveling west"
],
"safeDirections": [
"East"
]
},
"guidance": {
"activitiesToAvoid": [
"Starting new ventures"
],
"bestActivities": [
"Pitru worship"
],
"overallAuspiciousness": "Excellent",
"tips": [
"Amavasya is sacred for honoring ancestors - offer prayers and reflect on family lineage."
]
},
"hinduYear": {
"masa": {
"amanta": {
"adhika": false,
"label": "Margashirsha",
"name": "Margashirsha"
},
"purnimanta": {
"adhika": false,
"label": "Pausha",
"name": "Pausha"
}
},
"reckoning": "chaitradi",
"samvatsara": {
"label": "Bhava",
"name": "Bhava",
"number": 8,
"shaka": {
"label": "Bhava",
"name": "Bhava",
"number": 8,
"year": 1916
},
"vikram": {
"label": "Sarvajit",
"name": "Sarvajit",
"number": 21,
"year": 2051
}
},
"shakaSamvat": 1916,
"vikramSamvat": 2051,
"yearStartedAt": "1994-04-11T05:47:06+05:30"
}
},
"meta": {
"contentMode": "fixture",
"engine": "vedika-intelligence",
"fixtureId": "demo-birth-1995-new-delhi",
"inputUsage": "ignored",
"mode": "sandbox",
"sample": true
},
"success": true
}
Related
The same endpoint in other stacks:
Last updated: 22 November 2026