உள்ளடக்கத்திற்குச் செல்லுங்கள்
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 உங்கள் சர்வரிலிருந்து அழையுங்கள்

key-ஐ உங்கள் பேக்எண்டில் வைத்து, உள்ளடக்கத்தை மட்டும் உங்கள் ஆப்புக்குத் திருப்பி அனுப்புங்கள். இந்த 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 உள்ளீடுகளும் பக்கமாக்கலும்

offset உடனும், வினாடிகள் 00 ஆகவும் உள்ள ISO 8601 datetime, தசம பாகைகளில் latitude/longitude, offset-உடன் பொருந்தும் IANA நேர மண்டலம் ஆகியவற்றுடன் birth-ஐ வழங்குங்கள். விருப்பத்தேர்வான divisions 1 மற்றும்/அல்லது 9. dashaLevels பூஜ்ஜியத்தைவிட அதிகமாக இருந்தால், referenceDate-ஐ YYYY-MM-DD வடிவில் சேர்க்குங்கள்.

வர்க்கங்கள், லக்னம், கிரகங்கள், பாவங்கள் ஆகியவற்றுக்கு data.charts-ஐப் பயன்படுத்துங்கள். கோரப்பட்டால் data.vimshottariDasha-வைக் காட்டுங்கள்.

4 ஒதுக்கீடு

வெற்றிகரமான ஒரு அழைப்பு ஒரு உள்ளடக்கக் கோரிக்கையைப் பயன்படுத்தும். சாண்ட்பாக்ஸ் மற்றும் லைவ் கோரிக்கைகளுக்குத் தனித்தனி பயன்பாட்டுக் கணக்குகள் உள்ளன. தோல்வியடைந்த கணக்கீடுகள் திருப்பி வரவு வைக்கப்படும்.

கோரிக்கைகள் base URL-ஐ MANTRILO_API_URL-இலிருந்து படிக்கின்றன. சர்வர் எடுத்துக்காட்டு மாற்றாக https://api.mantrilo.com-ஐப் பயன்படுத்தும்.