API reference › Western

Synastry API

Aspects between two charts, and each person's planets in the other's houses

POST/v1/western/synastry

3 credits · Secret key (test or live) · getWesternSynastry

Request body

  • person_a Birth required
    • date string (date) required

      e.g. "1990-08-13"

    • time string

      pattern ^([01]\d|2[0-3]):[0-5]\d(:[0-5]\d)?$ · e.g. "06:30"

    • time_accuracy string

      With "unknown", lagna- and house-dependent fields are omitted and listed in warnings — never filled with a noon default.

      one of exact, approximate, unknown · default "exact"

    • place Coordinates or object or object required

      Coordinates, a place_id from /v1/places/search, or a free-text query. A vague query returns 422 place_ambiguous with candidates; the API never guesses.

      One of:

      1. Coordinates
        Fields
        • latitude number required

          ≥ -90 · ≤ 90

        • longitude number required

          ≥ -180 · ≤ 180

        No other fields are accepted.

      2. object
        Fields
        • place_id string required

        No other fields are accepted.

      3. object
        Fields
        • query string required

          at least 2 characters · at most 120 characters

        No other fields are accepted.

    • timezone string

      "auto" (from coordinates AND date), an IANA name, or a fixed offset like "+05:30".

      default "auto"

    No other fields are accepted.

  • person_b Birth required
    • date string (date) required

      e.g. "1990-08-13"

    • time string

      pattern ^([01]\d|2[0-3]):[0-5]\d(:[0-5]\d)?$ · e.g. "06:30"

    • time_accuracy string

      With "unknown", lagna- and house-dependent fields are omitted and listed in warnings — never filled with a noon default.

      one of exact, approximate, unknown · default "exact"

    • place Coordinates or object or object required

      Coordinates, a place_id from /v1/places/search, or a free-text query. A vague query returns 422 place_ambiguous with candidates; the API never guesses.

      One of:

      1. Coordinates
        Fields
        • latitude number required

          ≥ -90 · ≤ 90

        • longitude number required

          ≥ -180 · ≤ 180

        No other fields are accepted.

      2. object
        Fields
        • place_id string required

        No other fields are accepted.

      3. object
        Fields
        • query string required

          at least 2 characters · at most 120 characters

        No other fields are accepted.

    • timezone string

      "auto" (from coordinates AND date), an IANA name, or a fixed offset like "+05:30".

      default "auto"

    No other fields are accepted.

  • house_system string

    one of placidus, equal, whole_sign, porphyry · default "placidus"

  • aspects array of string
  • orbs object

    Your own orb in degrees for any aspect, replacing the default and the extra for the Sun and Moon.

    • conjunction number

      ≥ 0 · ≤ 15

    • opposition number

      ≥ 0 · ≤ 15

    • trine number

      ≥ 0 · ≤ 15

    • square number

      ≥ 0 · ≤ 15

    • sextile number

      ≥ 0 · ≤ 15

    • quincunx number

      ≥ 0 · ≤ 15

    • semisextile number

      ≥ 0 · ≤ 15

    • semisquare number

      ≥ 0 · ≤ 15

    • sesquiquadrate number

      ≥ 0 · ≤ 15

    • quintile number

      ≥ 0 · ≤ 15

    • biquintile number

      ≥ 0 · ≤ 15

    No other fields are accepted.

  • options object
    • lang string required

      one of en, hi · default "en"

    No other fields are accepted.

No other fields are accepted.

Response

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

  • frame string required
  • count integer required
  • aspects array of object required
    • a string required
    • b string required
    • aspect string required

      one of conjunction, opposition, trine, square, sextile, quincunx, semisextile, semisquare, sesquiquadrate, quintile, biquintile

    • angle number required
    • orb number required
    • applying boolean required
  • a_in_b_houses array of object or null required

    One of:

    1. array of object
      Fields
      • planet string required
      • house integer required
    2. null
  • b_in_a_houses array of object or null required

    One of:

    1. array of object
      Fields
      • planet string required
      • house integer required
    2. null

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

Example request

curl -X POST 'https://api.astrologics.in/v1/western/synastry' \
  -H 'Authorization: Bearer al_test_YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"person_a":{"date":"1990-08-13","time":"06:30","place":{"latitude":28.6139,"longitude":77.209}},"person_b":{"date":"1992-03-02","time":"14:10","place":{"latitude":19.076,"longitude":72.8777}}}'
Node.js
const res = await fetch("https://api.astrologics.in/v1/western/synastry", {
  method: "POST",
  headers: { Authorization: "Bearer al_test_YOUR_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({
    "person_a": {
      "date": "1990-08-13",
      "time": "06:30",
      "place": {
        "latitude": 28.6139,
        "longitude": 77.209
      }
    },
    "person_b": {
      "date": "1992-03-02",
      "time": "14:10",
      "place": {
        "latitude": 19.076,
        "longitude": 72.8777
      }
    }
  }),
});
console.log(JSON.stringify(await res.json(), null, 2));
Python
import json
import urllib.error
import urllib.request

body = {
    "person_a": {
        "date": "1990-08-13",
        "time": "06:30",
        "place": {
            "latitude": 28.6139,
            "longitude": 77.209,
        },
    },
    "person_b": {
        "date": "1992-03-02",
        "time": "14:10",
        "place": {
            "latitude": 19.076,
            "longitude": 72.8777,
        },
    },
}

req = urllib.request.Request(
    "https://api.astrologics.in/v1/western/synastry",
    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/western/synastry');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer al_test_YOUR_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"person_a":{"date":"1990-08-13","time":"06:30","place":{"latitude":28.6139,"longitude":77.209}},"person_b":{"date":"1992-03-02","time":"14:10","place":{"latitude":19.076,"longitude":72.8777}}}',
    CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch), PHP_EOL;

Example response

200 OK · 11,618 characters
{
  "data": {
    "frame": "tropical",
    "count": 62,
    "aspects": [
      {
        "a": "moon",
        "b": "sun",
        "aspect": "sextile",
        "angle": 60,
        "orb": 0.2,
        "applying": true
      },
      {
        "a": "neptune",
        "b": "sun",
        "aspect": "sextile",
        "angle": 60,
        "orb": 0.22,
        "applying": true
      },
      {
        "a": "mercury",
        "b": "uranus",
        "aspect": "trine",
        "angle": 120,
        "orb": 0.41,
        "applying": false
      },
      {
        "a": "pluto",
        "b": "venus",
        "aspect": "square",
        "angle": 90,
        "orb": 0.57,
        "applying": false
      },
      {
        "a": "mercury",
        "b": "neptune",
        "aspect": "trine",
        "angle": 120,
        "orb": 0.94,
        "applying": true
      },
      {
        "a": "moon",
        "b": "ascendant",
        "aspect": "sextile",
        "angle": 60,
        "orb": 1.06,
        "applying": false
      },
      {
        "a": "moon",
        "b": "saturn",
        "aspect": "square",
        "angle": 90,
        "orb": 1.19,
        "applying": true
      },
      {
        "a": "jupiter",
        "b": "mercury",
        "aspect": "trine",
        "angle": 120,
        "orb": 1.36,
        "applying": true
      },
      {
        "a": "venus",
        "b": "mercury",
        "aspect": "trine",
        "angle": 120,
        "orb": 1.42,
        "applying": true
      },
      {
        "a": "neptune",
        "b": "ascendant",
        "aspect": "opposition",
        "angle": 180,
        "orb": 1.47,
        "applying": true
      },
      {
        "a": "mars",
        "b": "neptune",
        "aspect": "trine",
        "angle": 120,
        "orb": 1.65,
        "applying": false
      },
      {
        "a": "saturn",
        "b": "neptune",
        "aspect": "conjunction",
        "angle": 0,
        "orb": 1.69,
        "applying": true
      },
      {
        "a": "moon",
        "b": "mars",
        "aspect": "square",
        "angle": 90,
        "orb": 1.72,
        "applying": false
      },
      {
        "a": "midheaven",
        "b": "mercury",
        "aspect": "sextile",
        "angle": 60,
        "orb": 1.76,
        "applying": false
      },
      {
        "a": "uranus",
        "b": "north_node",
        "aspect": "conjunction",
        "angle": 0,
        "orb": 1.87,
        "applying": true
      },
      {
        "a": "pluto",
        "b": "uranus",
        "aspect": "sextile",
        "angle": 60,
        "orb": 1.9,
        "applying": false
      },
      {
        "a": "pluto",
        "b": "saturn",
        "aspect": "square",
        "angle": 90,
        "orb": 2.05,
        "applying": true
      },
      {
        "a": "mars",
        "b": "moon",
        "aspect": "square",
        "angle": 90,
        "orb": 2.17,
        "applying": true
      },
      {
        "a": "sun",
        "b": "moon",
        "aspect": "opposition",
        "angle": 180,
        "orb": 2.26,
        "applying": true
      },
      {
        "a": "moon",
        "b": "jupiter",
        "aspect": "trine",
        "angle": 120,
        "orb": 2.45,
        "applying": false
      },
      {
        "a": "uranus",
        "b": "midheaven",
        "aspect": "square",
        "angle": 90,
        "orb": 2.47,
        "applying": true
      },
      {
        "a": "pluto",
        "b": "moon",
        "aspect": "square",
        "angle": 90,
        "orb": 2.73,
        "applying": false
      },
      {
        "a": "midheaven",
        "b": "pluto",
        "aspect": "opposition",
        "angle": 180,
        "orb": 2.81,
        "applying": false
      },
      {
        "a": "neptune",
        "b": "jupiter",
        "aspect": "trine",
        "angle": 120,
        "orb": 2.87,
        "applying": false
      },
      {
        "a": "north_node",
        "b": "mars",
        "aspect": "conjunction",
        "angle": 0,
        "orb": 2.89,
        "applying": false
      },
      {
        "a": "sun",
        "b": "pluto",
        "aspect": "square",
        "angle": 90,
        "orb": 2.9,
        "applying": true
      },
      {
        "a": "saturn",
        "b": "pluto",
        "aspect": "sextile",
        "angle": 60,
        "orb": 2.94,
        "applying": false
      },
      {
        "a": "mars",
        "b": "pluto",
        "aspect": "opposition",
        "angle": 180,
        "orb": 2.99,
        "applying": true
      },
      {
        "a": "mars",
        "b": "uranus",
        "aspect": "trine",
        "angle": 120,
        "orb": 3,
        "applying": false
      },
      {
        "a": "saturn",
        "b": "uranus",
        "aspect": "conjunction",
        "angle": 0,
        "orb": 3.04,
        "applying": true
      },
      {
        "a": "pluto",
        "b": "sun",
        "aspect": "trine",
        "angle": 120,
        "orb": 3.04,
        "applying": true
      },
      {
        "a": "pluto",
        "b": "neptune",
        "aspect": "sextile",
        "angle": 60,
        "orb": 3.25,
        "applying": false
      },
      {
        "a": "uranus",
        "b": "jupiter",
        "aspect": "trine",
        "angle": 120,
        "orb": 3.34,
        "applying": true
      },
      {
        "a": "north_node",
        "b": "midheaven",
        "aspect": "sextile",
        "angle": 60,
        "orb": 3.66,
        "applying": true
      },
      {
        "a": "moon",
        "b": "venus",
        "aspect": "square",
        "angle": 90,
        "orb": 3.81,
        "applying": true
      },
      {
        "a": "moon",
        "b": "north_node",
        "aspect": "trine",
        "angle": 120,
        "orb": 3.93,
        "applying": false
      },
      {
        "a": "pluto",
        "b": "ascendant",
        "aspect": "trine",
        "angle": 120,
        "orb": 4.29,
        "applying": false
      },
      {
        "a": "mars",
        "b": "venus",
        "aspect": "square",
        "angle": 90,
        "orb": 4.33,
        "applying": true
      },
      {
        "a": "neptune",
        "b": "north_node",
        "aspect": "conjunction",
        "angle": 0,
        "orb": 4.34,
        "applying": false
      },
      {
        "a": "sun",
        "b": "venus",
        "aspect": "opposition",
        "angle": 180,
        "orb": 4.41,
        "applying": true
      },
      {
        "a": "venus",
        "b": "midheaven",
        "aspect": "trine",
        "angle": 120,
        "orb": 4.63,
        "applying": true
      },
      {
        "a": "jupiter",
        "b": "midheaven",
        "aspect": "trine",
        "angle": 120,
        "orb": 4.69,
        "applying": true
      },
      {
        "a": "neptune",
        "b": "uranus",
        "aspect": "conjunction",
        "angle": 0,
        "orb": 4.72,
        "applying": false
      },
      {
        "a": "uranus",
        "b": "ascendant",
        "aspect": "opposition",
        "angle": 180,
        "orb": 4.74,
        "applying": false
      },
      {
        "a": "pluto",
        "b": "mars",
        "aspect": "square",
        "angle": 90,
        "orb": 4.95,
        "applying": true
      },
      {
        "a": "ascendant",
        "b": "pluto",
        "aspect": "square",
        "angle": 90,
        "orb": 5.06,
        "applying": false
      },
      {
        "a": "moon",
        "b": "uranus",
        "aspect": "trine",
        "angle": 120,
        "orb": 5.13,
        "applying": true
      },
      {
        "a": "mercury",
        "b": "sun",
        "aspect": "opposition",
        "angle": 180,
        "orb": 5.34,
        "applying": true
      },
      {
        "a": "north_node",
        "b": "saturn",
        "aspect": "conjunction",
        "angle": 0,
        "orb": 5.79,
        "applying": false
      },
      {
        "a": "jupiter",
        "b": "pluto",
        "aspect": "trine",
        "angle": 120,
        "orb": 5.93,
        "applying": false
      },
      {
        "a": "moon",
        "b": "moon",
        "aspect": "square",
        "angle": 90,
        "orb": 5.96,
        "applying": true
      },
      {
        "a": "venus",
        "b": "pluto",
        "aspect": "trine",
        "angle": 120,
        "orb": 5.98,
        "applying": false
      },
      {
        "a": "uranus",
        "b": "sun",
        "aspect": "sextile",
        "angle": 60,
        "orb": 6,
        "applying": false
      },
      {
        "a": "neptune",
        "b": "neptune",
        "aspect": "conjunction",
        "angle": 0,
        "orb": 6.07,
        "applying": false
      },
      {
        "a": "moon",
        "b": "neptune",
        "aspect": "trine",
        "angle": 120,
        "orb": 6.48,
        "applying": true
      },
      {
        "a": "mars",
        "b": "saturn",
        "aspect": "square",
        "angle": 90,
        "orb": 6.94,
        "applying": false
      },
      {
        "a": "sun",
        "b": "saturn",
        "aspect": "opposition",
        "angle": 180,
        "orb": 7.03,
        "applying": false
      },
      {
        "a": "midheaven",
        "b": "neptune",
        "aspect": "trine",
        "angle": 120,
        "orb": 7.44,
        "applying": true
      },
      {
        "a": "pluto",
        "b": "pluto",
        "aspect": "conjunction",
        "angle": 0,
        "orb": 7.88,
        "applying": true
      },
      {
        "a": "midheaven",
        "b": "moon",
        "aspect": "square",
        "angle": 90,
        "orb": 7.96,
        "applying": true
      },
      {
        "a": "mercury",
        "b": "jupiter",
        "aspect": "conjunction",
        "angle": 0,
        "orb": 7.99,
        "applying": false
      },
      {
        "a": "sun",
        "b": "mars",
        "aspect": "opposition",
        "angle": 180,
        "orb": 9.93,
        "applying": false
      }
    ],
    "a_in_b_houses": [
      {
        "planet": "sun",
        "house": 2
      },
      {
        "planet": "moon",
        "house": 11
      },
      {
        "planet": "mercury",
        "house": 3
      },
      {
        "planet": "venus",
        "house": 1
      },
      {
        "planet": "mars",
        "house": 11
      },
      {
        "planet": "jupiter",
        "house": 1
      },
      {
        "planet": "saturn",
        "house": 7
      },
      {
        "planet": "uranus",
        "house": 6
      },
      {
        "planet": "neptune",
        "house": 7
      },
      {
        "planet": "pluto",
        "house": 5
      },
      {
        "planet": "north_node",
        "house": 8
      }
    ],
    "b_in_a_houses": [
      {
        "planet": "sun",
        "house": 7
      },
      {
        "planet": "moon",
        "house": 6
      },
      {
        "planet": "mercury",
        "house": 8
      },
      {
        "planet": "venus",
        "house": 6
      },
      {
        "planet": "mars",
        "house": 6
      },
      {
        "planet": "jupiter",
        "house": 1
      },
      {
        "planet": "saturn",
        "house": 6
      },
      {
        "planet": "uranus",
        "house": 5
      },
      {
        "planet": "neptune",
        "house": 5
      },
      {
        "planet": "pluto",
        "house": 3
      },
      {
        "planet": "north_node",
        "house": 5
      }
    ]
  },
  "meta": {
    "request_id": "req_example",
    "api_version": "v1",
    "engine_version": "2026.10.10",
    "mode": "live",
    "credits_charged": 3
  },
  "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 Western

Get a free API key Western product page