星座配对
提供星座配对结果与配对内容说明,支持中文名称、简称与 1-12 数字编号请求。
项目用途
支持以下内容:
- 星座配对结果:返回中文
score、analysis、notes。 - 星座配对内容:返回分项得分
score,以及按标题组织的中英文配对内容。
基本信息
| 项目项 | 内容 |
|---|---|
| 基础域名 | https://chart.12sign.top |
| 内容类型 | application/json |
| 支持输入 | 中文名称、简称、1-12 数字编号 |
| 默认语言 | cn |
星座编号
| 编号 | 星座 |
|---|---|
| 1 | 白羊座 |
| 2 | 金牛座 |
| 3 | 双子座 |
| 4 | 巨蟹座 |
| 5 | 狮子座 |
| 6 | 处女座 |
| 7 | 天秤座 |
| 8 | 天蝎座 |
| 9 | 射手座 |
| 10 | 摩羯座 |
| 11 | 水瓶座 |
| 12 | 双鱼座 |
对外 API
1. 星座配对结果 API
| 项目 | 内容 | 说明 |
|---|---|---|
| 接口地址 | https://chart.12sign.top/compatibility |
星座配对结果接口。 |
| 请求方式 | POST |
统一按一个正式请求方式对外说明。 |
请求体示例:
{
"sign1": "1",
"sign2": "5"
}
返回示例:
{
"input_sign1": "1",
"input_sign2": "5",
"sign1": "白羊座",
"sign2": "狮子座",
"score": 98,
"analysis": "你们都是慕强的星座...",
"notes": "你们一见钟情..."
}
2. 星座配对内容 API
| 项目 | 内容 | 说明 |
|---|---|---|
| 接口地址 | https://chart.12sign.top/astrocompatibility |
按标题返回爱情配对正文。 |
| 请求方式 | POST |
统一按一个正式请求方式对外说明。 |
请求体示例:
{
"sign1": "1",
"sign2": "5",
"lang": "cn"
}
lang 参数说明
cn:仅返回中文内容。en:仅返回英文内容。both:同时返回中英文内容。
lang=cn 返回示例
{
"pair_slug": "aries-leo",
"score": {
"Overall Compatibility": 100,
"Love & Romance": 100
},
"content": {
"Aries and Leo Compatibility Overview": "白羊座是由火星掌管的基本火象星座..."
}
}
lang=en 返回示例
{
"pair_slug": "aries-leo",
"score": {
"Overall Compatibility": 100,
"Love & Romance": 100
},
"content": {
"Aries and Leo Compatibility Overview": "Aries is a cardinal fire sign ruled by Mars..."
}
}
lang=both 返回示例
{
"pair_slug": "aries-leo",
"score": {
"Overall Compatibility": 100,
"Love & Romance": 100
},
"content": {
"Aries and Leo Compatibility Overview": {
"en": "Aries is a cardinal fire sign ruled by Mars...",
"cn": "白羊座是由火星掌管的基本火象星座..."
}
}
}
返回规则说明
sign1和sign2支持数字、简称和中文全称。- 基础配对接口会按内部顺序自动归一化匹配。
- 内容接口数据来自内置资料。
- 默认
lang=cn。 - 不返回
source_url。 - 不返回
sections数组。 - 标题直接作为
content的键名。
在线测试
星座配对结果 API
请求地址:
https://chart.12sign.top/compatibility
请求参数(JSON):
返回结果:
点击“发送请求”后在此显示结果
星座配对内容 API
请求地址:
https://chart.12sign.top/astrocompatibility
请求参数(JSON):
返回结果:
点击“发送请求”后在此显示结果