API reference › Vastu

Vastu Ayadi Calculation API

The Ayadi formulas on a building's measures: every working shown, the yoni judged, and nearby measures that pass

POST/v1/vastu/ayadi

1 credit · Secret key (test or live) · getVastuAyadi

Choose a tradition with system: the Manasara, the perimeter texts, or Utpala for the yoni alone. Texts differ, and each result shows its base, multiplier and divisor. Metres need your own cubit length in hasta_cm.

Request body

  • length number required

    > 0 · ≤ 100000

  • breadth number required

    > 0 · ≤ 100000

  • perimeter number

    Default: twice length plus breadth.

    > 0 · ≤ 400000

  • unit string

    one of hasta, metre · default "hasta"

  • hasta_cm number

    The cubit you work with, in cm: required with metres. Texts and regions differ, so the API does not choose one.

    ≥ 30 · ≤ 100

  • system string

    one of manasara, perimeter_texts, utpala · default "manasara"

  • lang string

    one of en, hi · default "en"

No other fields are accepted.

Response

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

  • system string required

    one of manasara, perimeter_texts, utpala

  • measures object required
    • length_hasta number required
    • breadth_hasta number required
    • perimeter_hasta number required
    • area_sq_hasta number required
  • formulas array of object required
    • id string required

      one of aya, vyaya, vyaya_alt, rksha, yoni, vara, tithi, vayas

    • base string required
    • base_value number required
    • multiplier integer required
    • divisor integer required
    • takes string required

      one of remainder, quotient

    • product number required
    • remainder number required
    • result number required
    • member object or null required

      One of:

      1. object
        Fields
        • id string required
        • name string required
        • direction string
      2. null
  • findings array of object required
    • topic string required
    • verdict string required

      one of favourable, unfavourable

    • text string required
    • basis string required

      one of classical, convention

    • note string or null required

      One of:

      1. string
      2. null
  • passes_all boolean required

    The yoni and every aya-over-vyaya test favourable. Rksha, vara, tithi and vayas are reported without a verdict: the source gives none.

  • nearby_passing array of object required

    Whole-cubit measures within 3 cubits that pass, nearest first. Empty for utpala.

    • length_hasta integer required
    • breadth_hasta integer required
    • change_hasta number required
  • source object required
    • text string required
    • via string required

      Where we read the formulas: a modern study, not the Sanskrit text itself.

    • basis string required

      one of classical, convention

  • disclaimer string required

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

Example request

curl -X POST 'https://api.astrologics.in/v1/vastu/ayadi' \
  -H 'Authorization: Bearer al_test_YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"length":40,"breadth":30,"system":"manasara"}'
Node.js
const res = await fetch("https://api.astrologics.in/v1/vastu/ayadi", {
  method: "POST",
  headers: { Authorization: "Bearer al_test_YOUR_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({
    "length": 40,
    "breadth": 30,
    "system": "manasara"
  }),
});
console.log(JSON.stringify(await res.json(), null, 2));
Python
import json
import urllib.error
import urllib.request

body = {
    "length": 40,
    "breadth": 30,
    "system": "manasara",
}

req = urllib.request.Request(
    "https://api.astrologics.in/v1/vastu/ayadi",
    method="POST",
    headers={"Authorization": "Bearer al_test_YOUR_KEY", "Content-Type": "application/json"},
    data=json.dumps(body).encode(),
)
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/vastu/ayadi');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer al_test_YOUR_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"length":40,"breadth":30,"system":"manasara"}',
    CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch), PHP_EOL;

Example response

200 OK · 3,703 characters
{
  "data": {
    "system": "manasara",
    "measures": {
      "length_hasta": 40,
      "breadth_hasta": 30,
      "perimeter_hasta": 140,
      "area_sq_hasta": 1200
    },
    "formulas": [
      {
        "id": "aya",
        "base": "length",
        "base_value": 40,
        "multiplier": 8,
        "divisor": 12,
        "takes": "remainder",
        "product": 320,
        "remainder": 8,
        "result": 8,
        "member": null
      },
      {
        "id": "vyaya",
        "base": "breadth",
        "base_value": 30,
        "multiplier": 9,
        "divisor": 10,
        "takes": "remainder",
        "product": 270,
        "remainder": 0,
        "result": 0,
        "member": null
      },
      {
        "id": "rksha",
        "base": "length",
        "base_value": 40,
        "multiplier": 8,
        "divisor": 27,
        "takes": "remainder",
        "product": 320,
        "remainder": 23,
        "result": 23,
        "member": {
          "id": "dhanishta",
          "name": "Dhanishta"
        }
      },
      {
        "id": "yoni",
        "base": "breadth",
        "base_value": 30,
        "multiplier": 3,
        "divisor": 8,
        "takes": "remainder",
        "product": 90,
        "remainder": 2,
        "result": 2,
        "member": {
          "id": "dhuma",
          "name": "Dhuma",
          "direction": "southeast"
        }
      },
      {
        "id": "vara",
        "base": "circumference",
        "base_value": 140,
        "multiplier": 9,
        "divisor": 7,
        "takes": "remainder",
        "product": 1260,
        "remainder": 0,
        "result": 0,
        "member": {
          "id": "saturday",
          "name": "Saturday"
        }
      },
      {
        "id": "tithi",
        "base": "circumference",
        "base_value": 140,
        "multiplier": 9,
        "divisor": 30,
        "takes": "remainder",
        "product": 1260,
        "remainder": 0,
        "result": 0,
        "member": {
          "id": "purnima_or_amavasya",
          "name": "Purnima or Amavasya"
        }
      }
    ],
    "findings": [
      {
        "topic": "yoni",
        "verdict": "unfavourable",
        "text": "An even yoni, which the source calls bad.",
        "basis": "classical",
        "note": null
      },
      {
        "topic": "aya_over_vyaya",
        "verdict": "favourable",
        "text": "Aya is greater than vyaya, the usual test today.",
        "basis": "convention",
        "note": "The source says these remainders show gain and loss, but does not state this comparison. It is common practice."
      }
    ],
    "passes_all": false,
    "nearby_passing": [
      {
        "length_hasta": 40,
        "breadth_hasta": 29,
        "change_hasta": 1
      },
      {
        "length_hasta": 41,
        "breadth_hasta": 29,
        "change_hasta": 2
      },
      {
        "length_hasta": 40,
        "breadth_hasta": 27,
        "change_hasta": 3
      },
      {
        "length_hasta": 40,
        "breadth_hasta": 33,
        "change_hasta": 3
      },
      {
        "length_hasta": 38,
        "breadth_hasta": 29,
        "change_hasta": 3
      }
    ],
    "source": {
      "text": "Manasara",
      "via": "D. N. Shukla, Vastu-shastra (1960), ch. 6 (iv), reproducing Mallaya, Studies in Sanskrit Texts on Temple Architecture",
      "basis": "classical"
    },
    "disclaimer": "Traditional formulas, reported as the source gives them. They are not predictions or professional building advice."
  },
  "meta": {
    "request_id": "req_example",
    "api_version": "v1",
    "engine_version": "2026.10.10",
    "mode": "live",
    "credits_charged": 1
  },
  "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

More in Vastu

Get a free API key Vastu product page