cURL
curl "https://api.ruseo.cn/api/jiejiari?date=2023-05-01&type=0&mode=1"
查询指定日期的法定节假日信息,支持批量、按年、按月、范围查询。
https://api.ruseo.cn/api/jiejiari
接口调用前需要确认的核心配置。
/api/jiejiarijiejiari必填参数必须传入,示例值可直接用于联调。
免费API不强制要求API Key,但如果您希望统计个人调用次数,请在请求时附加参数 key=您的API_KEY。
注册账号后即可获得API Key。
| 参数名 | 必填 | 类型 | 说明 | 示例值 |
|---|---|---|---|---|
key |
否 | string | 可选参数:携带此参数可统计您的个人调用次数。请注册账号获取API Key。 | YOUR_API_KEY |
date |
是 | string | 查询日期或日期范围 | 2023-05-01 |
type |
否 | integer | 查询类型:0批量、1按年、2按月、3范围 | 0 |
mode |
否 | integer | 查询模式:1返回国际特殊纪念日信息 | 1 |
优先使用示例地址测试请求参数是否正确。
https://api.ruseo.cn/api/jiejiari?date=2023-05-01&type=0&mode=1
curl "https://api.ruseo.cn/api/jiejiari?date=2023-05-01&type=0&mode=1"
$url = 'https://api.ruseo.cn/api/jiejiari?date=2023-05-01&type=0&mode=1';
$response = file_get_contents($url);
$data = json_decode($response, true);
fetch('https://api.ruseo.cn/api/jiejiari?date=2023-05-01&type=0&mode=1')
.then(res => res.json())
.then(data => console.log(data));
实际返回内容以接口脚本处理结果为准。
{
"code": 0,
"msg": "success",
"data": {
"route": "jiejiari",
"example": true
}
}
| 参数名 | 类型 | 说明 | 示例值 |
|---|---|---|---|
data |
object | 节假日数据对象 | {"list":[...]} |
source |
string | 数据来源 | qqsuu |
点击左侧“发送请求”查看结果...