年度爱情报告API文档
接口说明
本接口生成指定年份的年度爱情分析报告:包含感情情况总述、爱情机遇与挑战解读,以及12个月的逐月爱情分析(各月爱情分数、健康与情绪指数等)。支持单身/有伴侣两套解读文案(通过 relationship_type 选择)。只需按下方参数说明传入出生信息与目标年份,即可获得 JSON 格式的报告数据;单次请求约需 10~60 秒,请设置足够的超时时间。解读文本中可能包含 Markdown 标记(如 ##)
基本信息
| 参数 | 值 |
|---|---|
| Base URL | https://chart.12sign.top |
| 接口URL | POST /yearlove |
| Content-Type | application/json |
| 返回格式 | application/json |
请求参数
| 参数名 | 类型 | 必选 | 说明 |
|---|---|---|---|
| birth_date | string | 是 | 出生日期,格式 YYYY/MM/DD,如 "1990/01/01" |
| birth_time | string | 是 | 出生时间,格式 HH:MM,如 "12:00" |
| utc_offset | string | 是 | 时区偏移(UTC 偏移格式,带符号),如 "+08:00" |
| latitude | number | 是 | 出生地纬度 |
| longitude | number | 是 | 出生地经度 |
| year | number | 是 | 目标分析年份,如 2025 |
| relationship_type | string | 否 | 恋爱状态:"single"(单身,默认)或 "couple"(有伴侣),解读文案随此参数切换 |
请求示例
POST https://chart.12sign.top/yearlove
Content-Type: application/json
{
"birth_date": "1990/01/01",
"birth_time": "12:00",
"utc_offset": "+08:00",
"latitude": 39.9042,
"longitude": 116.4074,
"year": 2025,
"relationship_type": "single"
}
返回参数
| 字段名 | 类型 | 说明 |
|---|---|---|
| love_situation | string | 感情情况总述(按 relationship_type 选择单身/有伴侣版本) |
| love_opportunities | array[string] | 爱情机遇解释列表 |
| love_challenges | array[string] | 爱情挑战解释列表 |
| monthly_analysis | array | 逐月分析数组:每项含 month(月份)与 lunar_returns(该月报告详情:报告时刻、爱情分数 love_score、财运分数、健康/情绪指数等) |
| solar_return_info | object | 报告基准信息:{solar_return_date 报告计算时刻, which_solar_return 基准类型(上一次/下一次)} |
| birth_date / birth_time / relationship_type / year | — | 回显的请求参数 |
返回示例(节选)
// /yearlove
{
"birth_date": "1990/01/01",
"birth_time": "12:00",
"relationship_type": "single",
"year": 2025,
"love_situation": "今年单身的你在感情路上……(约700字总述)",
"love_opportunities": [
"今年你在社交场合中魅力提升……"
],
"love_challenges": [
"今年单身的你在感情路上可能会遇到一些挑战,这主要体现在与潜在对象进行交流互动时……"
],
"monthly_analysis": [
{
"month": 1,
"lunar_returns": [
{
"lunar_return_index": 1,
"lunar_return_date": "2025/01/03 08:12",
"love_score": 85,
"main_wealth": 76,
"secondary_wealth": 62,
"investment": 80,
"health_score": 74,
"emotional_index": 90,
"venus_house": 5,
"chart_data": { "house_rulers": {}, "aspects": {}, "objects_in_houses": {} }
}
]
}
],
"solar_return_info": {
"solar_return_date": "2025/01/01 12:05 +08:00",
"which_solar_return": "上一次"
}
}
Python测试代码示例
import requests
BASE = "https://chart.12sign.top"
def test_yearlove():
payload = {
"birth_date": "1990/01/01", "birth_time": "12:00",
"utc_offset": "+08:00", "latitude": 39.9042, "longitude": 116.4074,
"year": 2025, "relationship_type": "single"
}
# 报告计算较慢,超时建议 >= 120 秒
r = requests.post(f"{BASE}/yearlove", json=payload, timeout=120)
d = r.json()
print(f"感情总述: {d['love_situation'][:80]}...")
print(f"机遇: {len(d['love_opportunities'])}条 挑战: {len(d['love_challenges'])}条")
for m in d["monthly_analysis"]:
lr = m["lunar_returns"][0]
print(f"{m['month']}月 爱情分 {lr['love_score']} 情绪 {lr['emotional_index']}")
if __name__ == "__main__":
test_yearlove()
在线测试 — 年度爱情分析
请求地址:
https://chart.12sign.top/yearlove
请求参数(JSON):
约需10~60秒
返回结果(摘要):
点击"发送请求"后在此显示结果