Skip to content
96Astro API

Chinese astrology

Available

BaZi Compatibility API

Four Pillars matching of two people: day-master elements and stem combinations, the spouse palace (day branches), year branches, each chart's useful element, the spouse star, and the year Na Yin, each factor with its rule and points, and a score from 50.

  • POST /v1/chinese/bazi-match
  • 1 credit
Request
curl https://api.96astroapi.com/v1/chinese/bazi-match \  -H "Authorization: Bearer $ASTRO_API_KEY" \  -H "Content-Type: application/json" \  -d '{
      "person_a": {
        "birth": {
          "datetime": "1990-10-18T14:30:00",
          "timezone": "Asia/Kolkata",
          "latitude": 28.6139,
          "longitude": 77.209
        },
        "gender": "male"
      },
      "person_b": {
        "birth": {
          "datetime": "1992-03-04T06:15:00",
          "timezone": "Asia/Kolkata",
          "latitude": 19.076,
          "longitude": 72.8777
        },
        "gender": "female"
      }
    }'

Overview

Four Pillars matching of two people: day-master elements and stem combinations, the spouse palace (day branches), year branches, each chart's useful element, the spouse star, and the year Na Yin, each factor with its rule and points, and a score from 50.

Call it with POST /v1/chinese/bazi-match. Input: specific input. Output: JSON, as a direct response. Each successful call costs 1 credit.

  • POST /v1/chinese/bazi-match
  • 1 credit
  • Specific input

Try it

Runs the real calculation, free and without a key, a few times a minute. For more, and for AI readings, get a free sandbox key.

Response

Ready when you are

Press Run it to see the live response here.

Example response

Fields in dataInferred from the example response: a guide to the shape, not a contract.

  • person_aobject
  • person_bobject
  • factorsarray of object
  • spouse_starobject
  • scoreobject
  • sourcestring
  • disclaimerstring
200Example response

Captured from the live engine with a sandbox key (so credits_used is 0) and trimmed: long arrays keep their first items and image data is shortened.

Loading the example…

Request schema and every field: the Chinese astrology reference.

FAQ

BaZi Compatibility API: common questions

4answers

Ask the team
01What does the BaZi Compatibility API return?

Four Pillars matching of two people: day-master elements and stem combinations, the spouse palace (day branches), year branches, each chart's useful element, the spouse star, and the year Na Yin, each factor with its rule and points, and a score from 50. The response's data object includes person_a, person_b, factors, spouse_star, score, source and disclaimer. See the reference for an example response.

02What input does BaZi Compatibility need?

Specific input.

03How much does a BaZi Compatibility call cost?

1 credit per successful call; a failed call is not charged. Plans and top-ups are on the pricing page.

04Can I try it before paying?

Yes. Every account gets sandbox keys and trial credits, so you can call it from your own code before choosing a plan.

Send us feedback

What is it about?