提供双方缘分测试分析服务,根据两人的公历出生年月日时,推算各自的八字排盘、五行分析,并进行缘分匹配度评估,包括性格分析、相处建议。(注意:接入前请查看详情中的免责声明)
提供双方缘分测试分析服务,根据两人的公历出生年月日时,推算各自的八字排盘、五行分析,并进行缘分匹配度评估,包括性格分析、相处建议。(注意:接入前请查看详情中的免责声明)
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| myname | string | 是 | 男方姓名(需URL编码) | |
| birthday | string | 是 | 男方出生日期(格式:YYYY-MM-DD) | |
| hour | integer | 是 | 男方出生小时(0-23) | |
| taname | string | 是 | 女方姓名(需URL编码) | |
| girl_birthday | string | 是 | 女方出生日期(格式:YYYY-MM-DD) | |
| girl_hour | integer | 是 | 女方出生小时(0-23) |
[
{
"name": "myname",
"type": "string",
"required": true,
"description": "男方姓名(需URL编码)",
"example": ""
},
{
"name": "birthday",
"type": "string",
"required": true,
"description": "男方出生日期(格式:YYYY-MM-DD)",
"example": ""
},
{
"name": "hour",
"type": "integer",
"required": true,
"description": "男方出生小时(0-23)",
"example": ""
},
{
"name": "taname",
"type": "string",
"required": true,
"description": "女方姓名(需URL编码)",
"example": ""
},
{
"name": "girl_birthday",
"type": "string",
"required": true,
"description": "女方出生日期(格式:YYYY-MM-DD)",
"example": ""
},
{
"name": "girl_hour",
"type": "integer",
"required": true,
"description": "女方出生小时(0-23)",
"example": ""
}
]{"openapi":"3.1.1","info":{"title":"缘分测试","description":"提供双方缘分测试分析服务,根据两人的公历出生年月日时,推算各自的八字排盘、五行分析,并进行缘分匹配度评估,包括性格分析、相处建议。(注意:接入前请查看详情中的免责声明)","version":"1.0.0"},"paths":{"/apis/gateway?api=yuanfen":{"get":{"summary":"缘分测试","description":"提供双方缘分测试分析服务,根据两人的公历出生年月日时,推算各自的八字排盘、五行分析,并进行缘分匹配度评估,包括性格分析、相处建议。(注意:接入前请查看详情中的免责声明)","parameters":[{"name":"myname","in":"query","required":true,"schema":{"type":"string"},"description":"男方姓名(需URL编码)"},{"name":"birthday","in":"query","required":true,"schema":{"type":"string"},"description":"男方出生日期(格式:YYYY-MM-DD)"},{"name":"hour","in":"query","required":true,"schema":{"type":"integer"},"description":"男方出生小时(0-23)"},{"name":"taname","in":"query","required":true,"schema":{"type":"string"},"description":"女方姓名(需URL编码)"},{"name":"girl_birthday","in":"query","required":true,"schema":{"type":"string"},"description":"女方出生日期(格式:YYYY-MM-DD)"},{"name":"girl_hour","in":"query","required":true,"schema":{"type":"integer"},"description":"女方出生小时(0-23)"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"summary":"缘分测试","description":"提供双方缘分测试分析服务,根据两人的公历出生年月日时,推算各自的八字排盘、五行分析,并进行缘分匹配度评估,包括性格分析、相处建议。(注意:接入前请查看详情中的免责声明)","parameters":[{"name":"myname","in":"query","required":true,"schema":{"type":"string"},"description":"男方姓名(需URL编码)"},{"name":"birthday","in":"query","required":true,"schema":{"type":"string"},"description":"男方出生日期(格式:YYYY-MM-DD)"},{"name":"hour","in":"query","required":true,"schema":{"type":"integer"},"description":"男方出生小时(0-23)"},{"name":"taname","in":"query","required":true,"schema":{"type":"string"},"description":"女方姓名(需URL编码)"},{"name":"girl_birthday","in":"query","required":true,"schema":{"type":"string"},"description":"女方出生日期(格式:YYYY-MM-DD)"},{"name":"girl_hour","in":"query","required":true,"schema":{"type":"integer"},"description":"女方出生小时(0-23)"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"servers":[{"url":"https://api.souxiaocha.com","description":"当前访问入口(https)"}]}
{"code":1,"msg":"查询成功","data":{"myname":"张三","taname":"李四","abirthday":{"year":"1990","month":5,"day":15,"hour":10},"bbirthday":{"year":"1992","month":8,"day":20,"hour":14},"a_bazi":{"bazi_str":"庚午 辛巳 己卯 己巳","day_gan":"己","day_wx":"土","wx_score":{"木":7,"火":21,"土":24,"金":24,"水":0}},"b_bazi":{"bazi_str":"壬申 戊申 戊辰 己未","day_gan":"戊","day_wx":"土","wx_score":{"木":3,"火":2,"土":46,"金":14,"水":15}},"result":{"title":"两金夫妻硬对硬...","info":"因此男金命女金命在一起..."}},"time":1786015015}https://api.souxiaocha.com/apis/gateway?api=yuanfenGET https://api.souxiaocha.com/apis/gateway?api=yuanfen apikey=你的API密钥&myname=请填写myname&birthday=请填写birthday&hour=请填写hour&taname=请填写taname&girl_birthday=请填写girl_birthday&girl_hour=请填写girl_hour
GET 参数放在查询字符串中。参数值请替换为实际有效值。
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
myname | string | 是 | 男方姓名(需URL编码) | |
birthday | string | 是 | 男方出生日期(格式:YYYY-MM-DD) | |
hour | integer | 是 | 男方出生小时(0-23) | |
taname | string | 是 | 女方姓名(需URL编码) | |
girl_birthday | string | 是 | 女方出生日期(格式:YYYY-MM-DD) | |
girl_hour | integer | 是 | 女方出生小时(0-23) |
{"code":1,"msg":"查询成功","data":{"myname":"张三","taname":"李四","abirthday":{"year":"1990","month":5,"day":15,"hour":10},"bbirthday":{"year":"1992","month":8,"day":20,"hour":14},"a_bazi":{"bazi_str":"庚午 辛巳 己卯 己巳","day_gan":"己","day_wx":"土","wx_score":{"木":7,"火":21,"土":24,"金":24,"水":0}},"b_bazi":{"bazi_str":"壬申 戊申 戊辰 己未","day_gan":"戊","day_wx":"土","wx_score":{"木":3,"火":2,"土":46,"金":14,"水":15}},"result":{"title":"两金夫妻硬对硬...","info":"因此男金命女金命在一起..."}},"time":1786015015}提供双方缘分测试分析服务,根据两人的公历出生年月日时,推算各自的八字排盘、五行分析,并进行缘分匹配度评估,包括性格分析、相处建议。(注意:接入前请查看详情中的免责声明)
https://api.souxiaocha.com/apis/gateway?api=yuanfen
GET / POST(业务参数 GET 通过 URL 传递,POST 支持表单或 JSON)
调用需携带平台密钥(用户中心「令牌管理」获取,SK- 开头):
key=SK-你的密钥X-API-Key: SK-你的密钥| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| myname | string | 是 | 男方姓名(需URL编码) |
| birthday | string | 是 | 男方出生日期(格式:YYYY-MM-DD) |
| hour | integer | 是 | 男方出生小时(0-23) |
| taname | string | 是 | 女方姓名(需URL编码) |
| girl_birthday | string | 是 | 女方出生日期(格式:YYYY-MM-DD) |
| girl_hour | integer | 是 | 女方出生小时(0-23) |
[
{"name": "myname", "type": "string", "required": true, "description": "男方姓名(需URL编码)"},
{"name": "birthday", "type": "string", "required": true, "description": "男方出生日期(格式:YYYY-MM-DD)"},
{"name": "hour", "type": "integer", "required": true, "description": "男方出生小时(0-23)"},
{"name": "taname", "type": "string", "required": true, "description": "女方姓名(需URL编码)"},
{"name": "girl_birthday", "type": "string", "required": true, "description": "女方出生日期(格式:YYYY-MM-DD)"},
{"name": "girl_hour", "type": "integer", "required": true, "description": "女方出生小时(0-23)"}
]
成功返回示例:
{"code":1,"msg":"查询成功","data":{"myname":"张三","taname":"李四","abirthday":{"year":"1990","month":5,"day":15,"hour":10},"bbirthday":{"year":"1992","month":8,"day":20,"hour":14},"a_bazi":{"bazi_str":"庚午 辛巳 己卯 己巳","day_gan":"己","day_wx":"土","wx_score":{"木":7,"火":21,"土":24,"金":24,"水":0}},"b_bazi":{"bazi_str":"壬申 戊申 戊辰 己未","day_gan":"戊","day_wx":"土","wx_score":{"木":3,"火":2,"土":46,"金":14,"水":15}},"result":{"title":"两金夫妻硬对硬...","info":"因此男金命女金命在一起..."}},"time":1786015015}
失败返回示例:
{"code":0,"msg":"请提供双方姓名参数(myname, taname)","data":null,"time":1786020380}
| 参数名 | 类型 | 说明 |
|---|---|---|
| code | integer | 状态码,1表示成功 |
| msg | string | 返回消息,如"查询成功" |
| data | object | 缘分测试核心数据对象 |
| time | integer | 数据生成时间戳(Unix时间戳) |
| 其他参数见接口详情 | string | 其他参数见接口详情 |
curl "https://api.souxiaocha.com/apis/gateway?api=yuanfen?key=SK-你的密钥&myname=%E5%BC%A0%E4%BC%9F&birthday=1993-05-20&hour=10&taname=%E6%9D%8E%E5%A8%9C&girl_birthday=1995-08-15&girl_hour=14"
平台级错误(errcode):11001 缺少密钥 / 11002 密钥无效或已禁用 / 11005 接口禁用 / 11006 接口维护 / 11010 积分不足 / 11018 请求方式不允许。
失败时请以响应体中的 code / errcode 与 msg 判断。
2026-09-24
curl "https://api.souxiaocha.com/apis/gateway?api=yuanfen?key=SK-你的密钥&myname=%E5%BC%A0%E4%BC%9F&birthday=1993-05-20&hour=10"
// 结果将在此处显示