接口地址
https://www.chuangxinwu.cn/public/api/solar_term_api.php?action=current
接口状态
正常 (HTTP 200) 上次检测:2026-05-24 00:11:57
📝 接口描述
============ 调用方式 ============\
\
1. 查询指定节气(当年):/solar_term_api.php?word=立春\
\
2. 查询指定年份的节气:/solar_term_api.php?word=立春&year=2024\
\
3. 获取所有节气列表:/solar_term_api.php?action=list\
\
4. 获取当年所有节气:/solar_term_api.php?action=year&year=2024\
\
5. 根据日期查询节气:/solar_term_api.php?date=2024-02-04\
\
6. 获取当前节气:/solar_term_api.php?action=current
📋 请求示例
【基础请求】
GET https://www.chuangxinwu.cn/public/api/solar_term_api.php?action=current
【请求头】
Content-Type: application/json
Accept: application/json
【参数说明】
GET请求参数通过URL传递:
https://www.chuangxinwu.cn/public/api/solar_term_api.php?action=current?参数名1=参数值1&参数名2=参数值2
【调用示例】
# cURL
curl -X GET 'https://www.chuangxinwu.cn/public/api/solar_term_api.php?action=current' \
-H 'Content-Type: application/json'
# JavaScript (Fetch)
fetch('https://www.chuangxinwu.cn/public/api/solar_term_api.php?action=current', {
method: 'GET',
headers: { 'Content-Type': 'application/json' }
})
.then(res => res.json())
.then(data => console.log(data));
# PHP (cURL)
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.chuangxinwu.cn/public/api/solar_term_api.php?action=current');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
# Python (requests)
import requests
url = 'https://www.chuangxinwu.cn/public/api/solar_term_api.php?action=current'
response = requests.get(url)
print(response.json())
📤 真实返回示例
{
"code": 200,
"success": true,
"data": {
"name": "芒种",
"nameimg": "mangzhong",
"day": "6月5日-6日",
"date": {
"gregdate": "2026年6月5日",
"lunardate": "六月初六",
"cnyear": "丙午年",
"cnmonth": "六月",
"cnday": "初六",
"cnzodiac": "马"
},
"yuanyin": "芒种时节,有芒的麦子快收,有芒的稻子可种。此时太阳到达黄经75°。",
"shiju": "时雨及芒种,四野皆插秧。家家麦饭美,处处菱歌长。——宋·陆游《时雨》",
"jieshao": "芒种,是二十四节气之第九个节气,夏季的第三个节气。芒种字面意思是“有芒的麦子快收,有芒的稻子可种”,因此“芒种”又叫“忙种”。",
"xishu": "送花神:祭祀花神;安苗:祈求丰收;打泥巴仗:田间娱乐;煮梅:煮青梅酒。",
"meishi": "青梅、君踏菜、荔枝、杨梅",
"yiji": "宜:祭祀、嫁娶、纳采、求嗣、开光;忌:安葬、伐木、作灶。"
},
"message": "查询成功"
}
🔧 JavaScript (Fetch)
fetch('/api/proxy.php?url=https%3A%2F%2Fwww.chuangxinwu.cn%2Fpublic%2Fapi%2Fsolar_term_api.php%3Faction%3Dcurrent', {
method: 'GET',
headers: { 'Content-Type': 'application/json' }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
🐘 PHP (cURL)
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.chuangxinwu.cn/public/api/solar_term_api.php?action=current');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
📡 Python (requests)
import requests
url = 'https://www.chuangxinwu.cn/public/api/solar_term_api.php?action=current'
response = requests.request('GET', url)
print(response.json())