AstroWay/api v2.173.1 · astrology-api
all systems operational
// astrology api · POST /v1/chinese/zodiac/compatibility

Chinese zodiac compatibility API

Two birth dates in, a scored match out, built on the geometry of the twelve branches rather than on a table of opinions. The year animal is resolved at the exact Li Chun instant, so a February birth lands on the animal it actually belongs to.

Endpoint
POST /v1/chinese/zodiac/compatibility
Cost
10 credits
Latency
~60 ms
Tier
Tier 1
// 01 / What it computes

Chinese zodiac compatibility API

Each date is resolved to its solar year, which opens at the Li Chun instant taken from the ephemeris rather than at 1 January or at Chinese New Year. That year gives the earthly branch and its animal. The score then reads the relation between the two branches: the 三合 trines, which group four sets of three branches spaced evenly around the circle, and the 六冲 clashes, which pair each branch with the one directly opposite. Neighbouring and neutral relations fall between. The response returns both resolved animals, a numeric score, a category and a short note explaining what the pairing means, so a UI can show the verdict without a second lookup table.

// 02 / Live request

POST/v1/chinese/zodiac/compatibility

curl -X POST https://api.astroway.info/v1/chinese/zodiac/compatibility \
  -H "X-Api-Key: aw_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "person1": { "date": "1990-05-15" },
    "person2": { "date": "1988-02-20" }
  }'
Response (excerpt)
{
  "ok": true,
  "data": {
    "person1": { "solarYear": 1990, "animal": "Horse" },
    "person2": { "solarYear": 1988, "animal": "Dragon" },
    "compatibility": {
      "score": 65,
      "category": "good",
      "notes": ["Compatible enough; complementary differences."]
    }
  }
}
// 03 / Parameters

Parameters

nametypeRequired
person1.date string (YYYY-MM-DD) yes First birth date. The animal comes from the solar year, which opens at Li Chun, not at New Year.
person2.date string (YYYY-MM-DD) yes Second birth date.
person1.time string (HH:MM:SS) no Only matters for a birth within a day of Li Chun, where the hour decides the year.
person1.timezoneOffset number (hours) no The UTC offset the clock was on. Used with time to place a boundary birth.
person1.solarYear number no Override the resolved year outright when you already hold it.
language string no Any of 21 codes. Adds animalName next to the English token; the English fields do not move.
// 04 / When to use it

When to use it

Reach for it when you want a fast, cheap compatibility signal keyed to a date alone: a matchmaking filter, a shareable card, a quiz, a marketing widget, an onboarding step where asking for a birth time would cost you the conversion. It is the coarsest reading in the catalogue and it is honest about that, since a year animal knows exactly one character out of a person's eight. When the product warrants a real reading, take the full BaZi chart for both people and look at the interactions across all four pillars instead.

// 05 / Notes

Notes

The score is derived from 三合 and 六冲 canonical doctrine, not from a hand-written opinion matrix, which is why it is reproducible and explains itself. A birth within a day of Li Chun is the one case where the hour matters: pass time and timezoneOffset and the boundary is resolved to the second. Animal names translate into 21 languages; the English token stays in place.

Try the Chinese zodiac compatibility API

Grab a key and make your first call in under a minute.

99.9% SLA · paid plans · 30d status →