API reference › Vastu

Vastu Room Analysis API

A verdict for each room by zone, what to prefer, and a score with published weights

POST/v1/vastu/rooms

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

The text places the prayer room, kitchen, household store, treasury and granary (verse 118) and protects the centre (verse 66); every other placement is present-day practice and says so. The score is ours: data.scoring gives its weights.

Request body

  • plot object
    • width_m number required

      Along the front, in metres.

      > 0 · ≤ 100000

    • depth_m number required

      From the front to the back, in metres.

      > 0 · ≤ 100000

    • facing_deg number required

      The compass bearing a person looks along when facing out through the front: 0 north, 90 east.

      ≥ 0 · ≤ 360

    No other fields are accepted.

  • lang string

    one of en, hi · default "en"

  • rooms array of object required

    at least 1 item · at most 60 items

    • type string required

      one of puja, kitchen, utensil_store, treasury, granary, master_bedroom, bedroom, living, dining, study, toilet, staircase, garage, overhead_tank, septic_tank

    • zone string

      one of north, northeast, east, southeast, south, southwest, west, northwest, center

    • from_left_m number

      With from_front_m and plot, in place of zone.

      ≥ 0

    • from_front_m number

      ≥ 0

    No other fields are accepted.

No other fields are accepted.

Response

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

  • score integer required

    ≥ 0 · ≤ 100

  • scoring object required
    • verdict_points object required
      Fields
      • ideal number required
      • acceptable number required
      • avoid number required
    • room_weight object required
      Fields
      • classical number required
      • convention number required
    • formula string required
  • rooms array of object required
    • type string required
    • name string required
    • zone string required
    • verdict string required

      one of ideal, acceptable, avoid

    • ideal_zones array of string required
    • acceptable_zones array of string required
    • avoid_zones array of string required
    • basis string required

      one of classical, convention

    • source object or null required

      One of:

      1. object
        Fields
        • text string required
        • author string required
        • chapter integer required
        • verses string required
        • translation string required
      2. null
    • note string or null required

      One of:

      1. string
      2. null
    • remedy string or null required

      One of:

      1. string
      2. null
  • zone_rule string required
  • 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/rooms' \
  -H 'Authorization: Bearer al_test_YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"rooms":[{"type":"puja","zone":"northeast"},{"type":"kitchen","zone":"southeast"},{"type":"master_bedroom","zone":"southwest"},{"type":"toilet","zone":"northeast"}]}'
Node.js
const res = await fetch("https://api.astrologics.in/v1/vastu/rooms", {
  method: "POST",
  headers: { Authorization: "Bearer al_test_YOUR_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({
    "rooms": [
      {
        "type": "puja",
        "zone": "northeast"
      },
      {
        "type": "kitchen",
        "zone": "southeast"
      },
      {
        "type": "master_bedroom",
        "zone": "southwest"
      },
      {
        "type": "toilet",
        "zone": "northeast"
      }
    ]
  }),
});
console.log(JSON.stringify(await res.json(), null, 2));
Python
import json
import urllib.error
import urllib.request

body = {
    "rooms": [
        {
            "type": "puja",
            "zone": "northeast",
        },
        {
            "type": "kitchen",
            "zone": "southeast",
        },
        {
            "type": "master_bedroom",
            "zone": "southwest",
        },
        {
            "type": "toilet",
            "zone": "northeast",
        },
    ],
}

req = urllib.request.Request(
    "https://api.astrologics.in/v1/vastu/rooms",
    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/rooms');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer al_test_YOUR_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"rooms":[{"type":"puja","zone":"northeast"},{"type":"kitchen","zone":"southeast"},{"type":"master_bedroom","zone":"southwest"},{"type":"toilet","zone":"northeast"}]}',
    CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch), PHP_EOL;

Example response

200 OK · 3,248 characters
{
  "data": {
    "score": 83,
    "scoring": {
      "verdict_points": {
        "ideal": 1,
        "acceptable": 0.5,
        "avoid": 0
      },
      "room_weight": {
        "classical": 2,
        "convention": 1
      },
      "formula": "100 × sum(points × weight) / sum(weight), rounded"
    },
    "rooms": [
      {
        "type": "puja",
        "name": "Prayer room",
        "zone": "northeast",
        "verdict": "ideal",
        "ideal_zones": [
          "northeast"
        ],
        "acceptable_zones": [
          "north",
          "east"
        ],
        "avoid_zones": [
          "south",
          "southwest",
          "southeast",
          "northwest",
          "west",
          "center"
        ],
        "basis": "classical",
        "source": {
          "text": "Brihat Samhita",
          "author": "Varahamihira",
          "chapter": 53,
          "verses": "118",
          "translation": "N. Chidambaram Iyer, 1884"
        },
        "note": null,
        "remedy": null
      },
      {
        "type": "kitchen",
        "name": "Kitchen",
        "zone": "southeast",
        "verdict": "ideal",
        "ideal_zones": [
          "southeast"
        ],
        "acceptable_zones": [
          "northwest"
        ],
        "avoid_zones": [
          "northeast",
          "center",
          "north",
          "southwest"
        ],
        "basis": "classical",
        "source": {
          "text": "Brihat Samhita",
          "author": "Varahamihira",
          "chapter": 53,
          "verses": "118",
          "translation": "N. Chidambaram Iyer, 1884"
        },
        "note": null,
        "remedy": null
      },
      {
        "type": "master_bedroom",
        "name": "Main bedroom",
        "zone": "southwest",
        "verdict": "ideal",
        "ideal_zones": [
          "southwest"
        ],
        "acceptable_zones": [
          "south",
          "west"
        ],
        "avoid_zones": [
          "northeast",
          "southeast",
          "center"
        ],
        "basis": "convention",
        "source": null,
        "note": null,
        "remedy": null
      },
      {
        "type": "toilet",
        "name": "Toilet or bathroom",
        "zone": "northeast",
        "verdict": "avoid",
        "ideal_zones": [
          "northwest",
          "west"
        ],
        "acceptable_zones": [
          "south",
          "southeast"
        ],
        "avoid_zones": [
          "northeast",
          "center",
          "southwest"
        ],
        "basis": "convention",
        "source": null,
        "note": null,
        "remedy": "Prefer north-west or west. This API gives placements only, not ritual or product remedies; ask your Vastu consultant if the room cannot move."
      }
    ],
    "zone_rule": "A position is placed by dividing the plot in thirds both ways; this division is our convention.",
    "disclaimer": "Traditional statements from the cited text, reported as the text 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