ഉള്ളടക്കത്തിലേക്ക് പോകുക
API key നേടുക

ഗൈഡുകൾ · ജ്യോതിഷം

Vedic birth chart

ഐച്ഛികമായ ദശാകാലങ്ങളോടെ ഒരു ലാഹിരി ജനന ചാർട്ട് നിർമ്മിക്കുക.

ഈ റിക്വസ്റ്റ് സാൻഡ്‌ബോക്സിൽ പരീക്ഷിക്കുക

1 പ്രവർത്തിക്കുന്ന ഒരു റിക്വസ്റ്റ് നടത്തുക

POST /v1/astrology/calculate
curl -X POST "$MANTRILO_API_URL/v1/astrology/calculate" \
  -H "Authorization: Bearer $MANTRILO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"birth":{"datetime":"1995-06-20T12:30:00+05:30","latitude":28.6139,"longitude":77.209,"timezone":"Asia/Kolkata"},"divisions":[1,9],"dashaLevels":1,"referenceDate":"2026-11-12","operation":"chart"}'
പരിശോധിച്ചുറപ്പിച്ച കൃത്രിമ D1/D9, വിംശോത്തരി ദശ റെസ്പോൺസിന്റെ ഭാഗം200 OK
{
  "data": {
    "operation": "chart",
    "engineVersion": "mantrilo-vedic-1",
    "timezone": "Asia/Kolkata",
    "ayanamsa": "lahiri",
    "houseSystem": "whole_sign",
    "nodeType": "mean",
    "charts": [
      {
        "division": 1,
        "ascendant": {
          "rashi": {
            "number": 6,
            "name": "Virgo"
          },
          "house": 1,
          "siderealLongitudeDegrees": 156.4105,
          "degreesWithinRashi": null,
          "retrograde": null,
          "nakshatra": {
            "number": 12,
            "name": "Uttara Phalguni",
            "pada": 3,
            "lord": "Sun"
          }
        },
        "planets": [
          {
            "body": "Sun",
            "rashi": {
              "number": 3,
              "name": "Gemini"
            },
            "house": 10,
            "siderealLongitudeDegrees": 64.7152,
            "degreesWithinRashi": 4.7152,
            "retrograde": false,
            "nakshatra": {
              "number": 5,
              "name": "Mrigashira",
              "pada": 4,
              "lord": "Mars"
            }
          },
          {
            "body": "Moon",
            "rashi": {
              "number": 12,
              "name": "Pisces"
            },
            "house": 7,
            "siderealLongitudeDegrees": 339.132,
            "degreesWithinRashi": 9.132,
            "retrograde": false,
            "nakshatra": {
              "number": 26,
              "name": "Uttara Bhadrapada",
              "pada": 2,
              "lord": "Saturn"
            }
          }
        ],
        "houses": [
          {
            "number": 1,
            "rashi": {
              "number": 6,
              "name": "Virgo"
            }
          }
        ]
      },
      {
        "division": 9,
        "ascendant": {
          "rashi": {
            "number": 11,
            "name": "Aquarius"
          },
          "house": 1,
          "siderealLongitudeDegrees": null,
          "degreesWithinRashi": null,
          "retrograde": null,
          "nakshatra": null
        },
        "planets": [
          {
            "body": "Sun",
            "rashi": {
              "number": 8,
              "name": "Scorpio"
            },
            "house": 10,
            "siderealLongitudeDegrees": null,
            "degreesWithinRashi": null,
            "retrograde": null,
            "nakshatra": null
          },
          {
            "body": "Moon",
            "rashi": {
              "number": 6,
              "name": "Virgo"
            },
            "house": 8,
            "siderealLongitudeDegrees": null,
            "degreesWithinRashi": null,
            "retrograde": null,
            "nakshatra": null
          }
        ],
        "houses": [
          {
            "number": 1,
            "rashi": {
              "number": 11,
              "name": "Aquarius"
            }
          }
        ]
      }
    ],
    "vimshottariDasha": {
      "referenceDate": "2026-11-12",
      "birthBalance": {
        "lord": "Saturn",
        "end": "2006-03-17",
        "remainingYears": 10.7406
      },
      "activePeriods": [
        {
          "level": "Mahadasha",
          "lord": "Ketu",
          "start": "2023-03-17",
          "end": "2030-03-17",
          "durationYears": 7
        }
      ],
      "timeline": [
        {
          "level": "Mahadasha",
          "lord": "Saturn",
          "start": "1995-06-20",
          "end": "2006-03-17",
          "durationYears": 10.74
        }
      ]
    }
  },
  "calculated": true
}

2 നിങ്ങളുടെ സെർവറിൽ നിന്ന് വിളിക്കുക

കീ നിങ്ങളുടെ ബാക്കെൻഡിൽ സൂക്ഷിച്ച് ഉള്ളടക്കം മാത്രം ആപ്പിലേക്ക് തിരികെ നൽകുക. ഈ Node.js സെർവർ നിങ്ങളുടെ ആപ്പിന് വിളിക്കാവുന്ന ഒരു റൂട്ട് ലഭ്യമാക്കുന്നു.

server.mjs
// server.mjs · Node.js 22+
import { createServer } from 'node:http';

const apiKey = process.env.MANTRILO_API_KEY;
if (!apiKey) throw new Error('Set MANTRILO_API_KEY on your server.');
const base = process.env.MANTRILO_API_URL ?? "https://api.mantrilo.com";

async function mantrilo(path, input) {
  const response = await fetch(base + path, {
    method: input ? 'POST' : 'GET',
    headers: {
      Authorization: 'Bearer ' + apiKey,
      ...(input ? { 'Content-Type': 'application/json' } : {}),
    },
    ...(input ? { body: JSON.stringify(input) } : {}),
    signal: AbortSignal.timeout(20000),
    redirect: 'error',
  });
  const result = await response.json();
  if (!response.ok) throw Object.assign(new Error('Mantrilo request failed'), {
    status: response.status, requestId: result.requestId,
  });
  return result;
}

async function load(incoming, input) {
  return mantrilo("/v1/astrology/calculate", { ...input, operation: "chart" });
}

createServer(async (req, res) => {
  const incoming = new URL(req.url, 'http://localhost');
  res.setHeader('Content-Type', 'application/json');
  if (req.method !== 'POST' || incoming.pathname !== '/api/mantrilo-guide') {
    res.writeHead(404).end(JSON.stringify({ error: 'Not found' }));
    return;
  }
  try {
    let text = '';
    for await (const chunk of req) {
      text += chunk;
      if (Buffer.byteLength(text) > 16384) {
        res.writeHead(413).end(JSON.stringify({ error: 'Input is too large' }));
        return;
      }
    }
    let input;
    try { input = JSON.parse(text); } catch { input = null; }
    if (!input || typeof input !== 'object' || Array.isArray(input)) {
      res.writeHead(400).end(JSON.stringify({ error: 'Send a JSON object' }));
      return;
    }
    const result = await load(incoming, input);
    res.end(JSON.stringify(result));
  } catch (error) {
    res.writeHead(error.status ?? 502).end(JSON.stringify({
      error: 'Could not load this content',
      requestId: error.requestId,
    }));
  }
}).listen(3000, '127.0.0.1');
നിങ്ങളുടെ കാഴ്ചയിൽ
const charts = data.charts;

3 ഇൻപുട്ടുകളും പേജിനേഷനും

birth നൽകുക: ഓഫ്‌സെറ്റും 00 ആയി സജ്ജീകരിച്ച സെക്കൻഡുകളും ഉള്ള ഒരു ISO 8601 datetime, ദശാംശ ഡിഗ്രിയിൽ latitude/longitude, ഓഫ്‌സെറ്റുമായി പൊരുത്തപ്പെടുന്ന ഒരു IANA സമയമേഖല. ഐച്ഛികമായ divisions 1 കൂടാതെ/അല്ലെങ്കിൽ 9 ആണ്. dashaLevels പൂജ്യത്തേക്കാൾ കൂടുതലാണെങ്കിൽ, referenceDate YYYY-MM-DD രൂപത്തിൽ ഉൾപ്പെടുത്തുക.

വർഗ്ഗ ചാർട്ടുകൾ, ലഗ്നം, ഗ്രഹങ്ങൾ, ഭാവങ്ങൾ എന്നിവയ്ക്കായി data.charts ഉപയോഗിക്കുക. ആവശ്യപ്പെടുമ്പോൾ data.vimshottariDasha കാണിക്കുക.

4 ക്വോട്ട

വിജയകരമായ ഒരു കോൾ ഒരു ഉള്ളടക്ക റിക്വസ്റ്റ് ഉപയോഗിക്കുന്നു. സാൻഡ്‌ബോക്സ്, ലൈവ് റിക്വസ്റ്റുകളുടെ ഉപയോഗം വെവ്വേറെയാണ് കണക്കാക്കുന്നത്. പരാജയപ്പെട്ട കണക്കുകൂട്ടലുകൾക്ക് റിക്വസ്റ്റ് തിരികെ ലഭിക്കും.

റിക്വസ്റ്റുകൾ ബേസ് URL MANTRILO_API_URL-ൽ നിന്ന് വായിക്കുന്നു. സെർവർ ഉദാഹരണം ബദലായി https://api.mantrilo.com ഉപയോഗിക്കുന്നു.