Chinese astrology API: Bazi
The four pillars of Bazi, luck pillars, a year against a chart, relations between two charts, the birth animal by both conventions, the Chinese calendar date and the 24 solar terms.
| Operation | Credits | Key |
|---|---|---|
POST /v1/chinese/baziThe four pillars with hidden stems, ten gods, nayin and element counts | 2 | secret |
POST /v1/chinese/luck-pillarsThe ten-year luck pillars, their direction and the age they start | 1 | secret |
POST /v1/chinese/annualA solar year's pillar against a chart: Tai Sui, relations and the twelve month pillars | 1 | secret |
POST /v1/chinese/compatibilityHarmonies and conflicts between two charts' year and day pillars | 1 | secret |
POST /v1/chinese/zodiacThe birth year animal by Li Chun and by Lunar New Year, and whether they agree | 1 | secret |
POST /v1/chinese/dateA Gregorian date in the Chinese calendar: lunar month and day, leap month, day pillar and solar term | 1 | secret |
POST /v1/chinese/solar-termsThe 24 solar terms of a year, to the minute | 1 | secret |
Example: The four pillars with hidden stems, ten gods, nayin and element counts
POST /v1/chinese/bazi · 200 OK
{
"data": {
"moment": "1990-08-13T01:00:00.000Z",
"time_known": true,
"time_basis": "clock",
"zi_convention": "day_changes_at_23",
"zi_hour": null,
"solar_year": 1990,
"pillars": {
"year": {
"name": "Geng Wu",
"chinese": "庚午",
"cycle_number": 7,
"stem": {
"id": "geng",
"chinese": "庚",
"element": "metal",
"element_name": "Metal",
"polarity": "yang",
"ten_god": {
"id": "bi_jian",
"name": "Friend"
}
},
"branch": {
"id": "wu",
"chinese": "午",
"animal": "horse",
"animal_name": "Horse",
"element": "fire",
"element_name": "Fire",
"polarity": "yang",
"hidden_stems": [
{
"id": "ding",
"chinese": "丁",
"element": "fire",
"element_name": "Fire",
"polarity": "yin",
"ten_god": {
"id": "zheng_guan",
"name": "Direct Officer"
}
},
{
"id": "ji",
"chinese": "己",
"element": "earth",
"element_name": "Earth",
"polarity": "yin",
"ten_god": {
"id": "zheng_yin",
"name": "Direct Resource"
}
}
]
},
"nayin": {
"chinese": "路旁土",
"name": "Earth by the Roadside"
}
},
"month": {
"name": "Jia Shen",
"chinese": "甲申",
"cycle_number": 21,
"stem": {
"id": "jia",
"chinese": "甲",
"element": "wood",
"element_name": "Wood",
"polarity": "yang",
"ten_god": {
"id": "pian_cai",
"name": "Indirect Wealth"
}
},
"branch": {
"id": "shen",
"chinese": "申",
"animal": "monkey",
"animal_name": "Monkey",
"element": "metal",
"element_name": "Metal",
"polarity": "yang",
"hidden_stems": [
{
"id": "geng",
"chinese": "庚",
"element": "metal",
"element_name": "Metal",
"polarity": "yang",
"ten_god": {
"id": "bi_jian",
"name": "Friend"
}
},
{
"id": "ren",
"chinese": "壬",
"element": "water",
"element_name": "Water",
"polarity": "yang",
"ten_god": {
"id": "shi_shen",
"name": "Eating God"
}
},
{
"id": "wu",
"chinese": "戊",
"element": "earth",
"element_name": "Earth",
"polarity": "yang",
"ten_god": {
"id": "pian_yin",
"name": "Indirect Resource"
}
}
]
},
"nayin": {
"chinese": "泉中水",
"name": "Spring Water"
}
},
"day": {
"name": "Geng Xu",
"chinese": "庚戌",
"cycle_number": 47,
"stem": {
"id": "geng",
"chinese": "庚",
"element": "metal",
"element_name": "Metal",
"polarity": "yang"
},
"branch": {
"id": "xu",
"chinese": "戌",
"animal": "dog",
"animal_name": "Dog",
"element": "earth",
"element_name": "Earth",
"polarity": "yang",
"hidden_stems": [
{
"id": "wu",
"chinese": "戊",
"element": "earth",
"element_name": "Earth",
"polarity": "yang"
},
{
"id": "xin",
"chinese": "辛",
"element": "metal",
"element_name": "Metal",
"polarity": "yin"
},
{
"id": "ding",
"chinese": "丁",
"element": "fire",
"element_name": "Fire",
"polarity": "yin"
}
]
},
"nayin": {
"chinese": "钗钏金",
"name": "Hairpin Metal"
}
},
"hour": {
"name": "Ji Mao",
"chinese": "己卯",
"cycle_number": 16,
"stem": {
"id": "ji",
"chinese": "己",
"element": "earth",
"element_name": "Earth",
"polarity": "yin",
"ten_god": {
"id": "zheng_yin",
"name": "Direct Resource"
}
},
"branch": {
"id": "mao",
"chinese": "卯",
"animal": "rabbit",
"animal_name": "Rabbit",
"element": "wood",
"element_name": "Wood",
"polarity": "yin",
"hidden_stems": [
{
"id": "yi",
"chinese": "乙",
"element": "wood",
"element_name": "Wood",
"polarity": "yin",
"ten_god": {
"id": "zheng_cai",
"name": "Direct Wealth"
}
}
]
},
"nayin": {
"chinese": "城头土",
"name": "Earth on the City Wall"
}
}
},
"day_master": {
"id": "geng",
"chinese": "庚",
"element": "metal",
"element_name": "Metal",
"polarity": "yang"
},
"elements": {
"visible": {
"wood": 2,
"fire": 1,
"earth": 2,
"metal": 3,
"water": 0
},
"hidden": {
"wood": 1,
"fire": 2,
"earth": 3,
"metal": 2,
"water": 1
}
}
},
"meta": {
"request_id": "req_example",
"api_version": "v1",
"engine_version": "2026.10.10",
"mode": "live",
"credits_charged": 2
},
"warnings": []
}