Skip to content
96Astro API

Eight Mansions Kua and Personal Directions (Feng Shui)

POSTAvailable

POSThttps://api.96astroapi.com/v1/chinese/eight-mansions-kua

The Kua number from the date of birth and gender, the East or West group, the four favourable directions (Sheng Qi, Tian Yi, Yan Nian, Fu Wei) and four unfavourable ones (Huo Hai, Wu Gui, Liu Sha, Jue Ming), and the sectors usually chosen for the bedroom, desk, door and stove. This is the Chinese Feng Shui Eight Mansions method, not Vastu Shastra, and it is returned apart from Vastu. The Kua year turns at Lichun by default (or the Chinese New Year, or 4 February: a stated convention).

Credits
1 credit
Input
Specific input
Output
JSON
Delivery
Direct response
Languages
26 languages; translated term names with labels
Headers
HeaderValue and description
AuthorizationRequiredBearer YOUR_API_KEY

Your sandbox (sk_test_...) or live (sk_live_...) key. X-API-Key: <key> is accepted instead.

Content-TypeRequiredapplication/json

The body is JSON.

Idempotency-KeyOptional<unique string>

Makes retries safe: a repeated key with the same body replays the stored response and is never charged twice. (1 to 200 characters)

Body · application/json
FieldDescription
date_of_birthstringRequired

Date of birth, YYYY-MM-DD (1900 to 2100).

Limits: format date

Example: 1985-06-15

genderstringRequired

The Eight Mansions formula differs for men and women.

Allowed values: malefemale

Example: female

time_of_birthstring | nullOptional

HH:MM. Needed only for a birth within a day of the year boundary.

Default: null

Limits: pattern ^\d{2}:\d{2}(:\d{2})?$

utc_offsetstring | nullOptional

Offset of the birth time, such as +05:30. Used with time_of_birth.

Default: null

Limits: pattern ^[+-]?\d{1,2}(:[0-5]\d)?$

Example: +05:30

year_boundarystringOptional

Where the Kua year turns: lichun (the Sun at 315 degrees, about 4 February, to the minute; the Eight Mansions teachers' boundary, default), chinese_new_year (the lunar new year, Beijing date) or fixed_feb_4. A stated convention; teachers differ.

Default: lichun

Allowed values: lichunchinese_new_yearfixed_feb_4

labelsstringOptional

Optional. Adds `meta.labels`: translated display names for the identifiers in the answer. `data` is unchanged. Free. Any other code is refused with 422 unsupported_language.

Allowed values: asbndeesfrguhiitjaknkomlmrnenlorpaplptrusitatetrur

Response · fields in data

Inferred from the example response: a guide to the shape, not a contract.

  • system · string
  • not_vastu · boolean
  • separation · string
  • basis · string
  • input · object
  • kua_year · number
  • year_boundary · object
  • digit_of_year · number
  • kua_number · number
  • kua_number_before_five_rule · number
  • kua_five_rule · any
  • trigram · string
  • kua_direction · string
  • group · string
  • rule · string
  • favourable_directions · array of object
  • unfavourable_directions · array of object
  • recommended_sectors · object
  • limits · string

Try in Playground →Capability overview

Example request

Example response

200application/json
{
  "data": {
    "system": "Feng Shui Eight Mansions (Ba Zhai)",
    "not_vastu": true,
    "separation": "This is a Chinese Feng Shui method. It is not Vastu Shastra, and its directions are not Vastu zone results; where the two disagree, neither overrides the other.",
    "basis": "convention",
    "input": {
      "date": "1985-06-15",
      "gender": "female",
      "time": null,
      "utc_offset": 0
    },
    "kua_year": 1985,
    "year_boundary": {
      "rule": "lichun",
      "judged_against": "1985-02-03 21:11 (UTC+0)",
      "year_boundary_uncertain": false,
      "note": "The Kua year turns on the stated boundary; other teachers use other boundaries."
    },
    "digit_of_year": 5,
  …

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

Error responses

  • 400invalid_request
  • 401invalid_key, expired_key
  • 402payment_required
  • 403account_suspended, plan_upgrade_required, plan_family_not_included, key_scope_denied, ip_not_allowed, origin_not_allowed, publishable_key_not_allowed
  • 404not_found
  • 409idempotency_conflict
  • 413payload_too_large
  • 422invalid_request, unsupported_language
  • 429rate_limited, quota_exhausted, spend_cap_reached, project_budget_exceeded
  • 500computation_failed
  • 502unavailable
  • 503unavailable, maintenance, temporarily_unavailable
  • 504deadline_exceeded

Errors are never charged. What each status means and what to do: errors.

Was this page helpful?

Send us feedback

What is it about?