/data/date_info

1.接口描述

该API的功能对指定日期进行综合查询

请求方式:

POST

请求URL:

https://cloudapi.deepfinch.com/data/date_info

调试工具

Debugging Tool

2.请求参数

2.1 请求头域

字段 类型 必需 描述
X-DF-API-ID string API调用凭证信息,详细信息请参考API调用
X-DF-API-SECRET string API调用凭证信息,详细信息请参考API调用

2.2 请求体

字段 类型 必需 描述
date string 年月日,格式 YYYY-MM-DD

3.返回参数

正常响应 (200

字段 类型 描述
request_id string 本次请求的 id
status string 状态。正常为 OK ,其他值表示失败。详见详见错误码
result object 查询结果

其中result的字段如下:

字段 类型 描述
solar object 公历信息
lunar object 农历信息
ganzhi object 干支信息
festivals object 节日信息
holiday object 法定节假日或调休信息
zodiac string 生肖
jieqi string 节气

其中object类型包含字段信息如下:

solar字段
字段 类型 描述
date string 公历日期,格式 YYYY-MM-DD
year int 公历年
month int 公历月
day int 农历日
weekday int ISO 星期序号,星期一为 1,星期日为 7
weekday_cn string 中文星期名称
lunar字段
字段 类型 描述
year int 农历年
month int 农历月,闰月也返回正数月份
day int 农历日
is_leap_month boolean 是否为闰月
year_in_chinese string 中文农历年
month_in_chinese string 中文农历月
day_in_chinese string 中文农历日
ganzhi字段
字段 类型 描述
year string 年干支
month string 月干支
day string 日干支
festivals字段
字段 类型 描述
traditional array 传统节日名称数组
solar array 公历节日名称数组
holiday字段
字段 类型 描述
is_holiday boolean 当日是否存在法定放假或调休记录
name string 节假日名称
is_off_day boolean 是否为放假日
is_workday_adjustment boolean 是否为调休工作日

输出示例:

{
  "request_id": "TID95bc0b968ade4e94843cf186736a7600",
  "status": "OK",
  "result": {
    "solar": {
      "date": "2026-05-01",
      "year": 2026,
      "month": 5,
      "day": 1,
      "weekday": 5,
      "weekday_cn": "星期五"
    },
    "lunar": {
      "year": 2026,
      "month": 3,
      "day": 15,
      "is_leap_month": false,
      "year_in_chinese": "二〇二六",
      "month_in_chinese": "三",
      "day_in_chinese": "十五"
    },
    "ganzhi": {
      "year": "丙午",
      "month": "壬辰",
      "day": "乙亥"
    },
    "zodiac": "马",
    "jieqi": null,
    "festivals": {
      "traditional": [],
      "solar": [
        "劳动节"
      ]
    },
    "holiday": {
      "is_holiday": true,
      "name": "劳动节",
      "is_off_day": true,
      "is_workday_adjustment": false
    }
  }
}

4.错误码

状态码 status 字段 说明
400 INVALID_ARGUMENT 请求参数错误
401 UNAUTHORIZED 未授权或授权失败
403 RATE_LIMIT_EXCEEDED 调用频率超出限额
404 NOT_FOUND 请求路径错误
500 INTERNAL_ERROR 服务器内部错误

输出示例:

{
  "status": "RATE_LIMIT_EXCEEDED",
  "request_id": "TID8bf47ab6eda64476973cc5f5b6ebf57e"
}

5.输入示例

results matching ""

    No results matching ""