Misc

Holiday and Calendar Lookup

0calls
1 credits / call

Look up calendar and holiday information for a specific day, month, or year.

GET
uapis.cn
/api/v1/misc/holiday-calendar
Query parameters
9
date
string

Use this when querying by day. Format: YYYY-MM-DD. Choose exactly one of date, month, year.

month
string

Use this when querying by month. Format: YYYY-MM. Choose exactly one of date, month, year.

year
string

Use this when querying by year. Format: YYYY. Choose exactly one of date, month, year.

timezone
string

Time-zone name. Defaults to Asia/Shanghai.

holiday_type
string

Holiday-type filter. Defaults to all.

region
string

Holiday region. Defaults to CN (Mainland China). Pass HK to get Hong Kong public holidays, currently covering 2025 to 2027. timezone does not switch the region; pass region=HK explicitly for Hong Kong holidays.

include_nearby
boolean

Whether to also return the nearest holidays before and after the queried date. Only meaningful in date mode; ignored in month/year mode. Defaults to false.

nearby_limit
integer

Maximum number of nearest holidays to return. Default 7, max 30. Only applies in date mode with include_nearby=true.

exclude_past
boolean

When true, filters out holidays that have already passed before today. Defaults to false.

Overview

The endpoint supports three query modes: by day (date), by month (month), and by year (year). Pick exactly one of these per call.

Use holiday_type to filter to a single category — for example legal holidays / make-up workdays, Gregorian festivals, lunar-calendar festivals, or solar terms.

In date mode, pass include_nearby=true to also return the holidays nearest the queried date. Use nearby_limit to cap the number of returned items (default 7, max 30).

If you only want today and future holidays, pass exclude_past=true to drop past entries.

Query parameters

date
stringoptional

Use this when querying by day. Format: YYYY-MM-DD. Choose exactly one of date, month, year.

month
stringoptional

Use this when querying by month. Format: YYYY-MM. Choose exactly one of date, month, year.

year
stringoptional

Use this when querying by year. Format: YYYY. Choose exactly one of date, month, year.

timezone
stringoptional

Time-zone name. Defaults to Asia/Shanghai.

holiday_type
stringoptional

Holiday-type filter. Defaults to all.

region
stringoptional

Holiday region. Defaults to CN (Mainland China). Pass HK to get Hong Kong public holidays, currently covering 2025 to 2027. timezone does not switch the region; pass region=HK explicitly for Hong Kong holidays.

include_nearby
booleanoptional

Whether to also return the nearest holidays before and after the queried date. Only meaningful in date mode; ignored in month/year mode. Defaults to false.

nearby_limit
integeroptional

Maximum number of nearest holidays to return. Default 7, max 30. Only applies in date mode with include_nearby=true.

exclude_past
booleanoptional

When true, filters out holidays that have already passed before today. Defaults to false.

Response

200 / OK

Lookup succeeded. Returns calendar and holiday information for the requested range.

JSON
{
  // Query mode: `day`, `month`, or `year`.
  "mode": "day",
  // Echoed request parameters.
  "query": {
    // Day-view request parameter. `YYYY-MM-DD` in `date` mode; an empty string otherwise.
    "date": "2025-10-01",
    // Holiday-type filter.
    "holiday_type": "legal",
    // Holiday region: `CN` (Mainland China) or `HK` (Hong Kong).
    "region": "CN",
    // Whether the surrounding-holidays lookup is enabled.
    "include_nearby": true,
    // Whether past holidays are filtered out.
    "exclude_past": true,
    // Month-view request parameter. `YYYY-MM` in `month` mode; an empty string otherwise.
    "month": "",
    // Maximum number of surrounding holidays returned.
    "nearby_limit": 7,
    // Effective time zone for the response.
    "timezone": "Asia/Shanghai",
    // Year-view request parameter. `YYYY` in `year` mode; an empty string otherwise.
    "year": ""
  },
  // Aggregate summary.
  "summary": {
    // Total number of days in the queried range.
    "total_days": 1,
    // Number of weekend days in the queried range.
    "weekend_days": 0,
    // Number of workdays in the queried range, including legal make-up workdays.
    "workdays": 0,
    // Number of rest days in the queried range, including weekends and legal rest days.
    "rest_days": 1,
    // Total number of holiday events after filtering by `holiday_type`.
    "holiday_events": 1,
    // Number of legal rest days.
    "legal_rest_days": 1,
    // Number of legal make-up workdays.
    "legal_workdays": 0
  },
  // Detailed list of days.
  "days": [
    {
      // Gregorian date (`YYYY-MM-DD`).
      "date": "2025-10-01",
      // Gregorian year.
      "year": 2025,
      // Gregorian month.
      "month": 10,
      // Day of the Gregorian month.
      "day": 1,
      // Weekday in Chinese, e.g. 星期三 (Wednesday).
      "weekday_cn": "星期三",
      // Whether the day is a weekend.
      "is_weekend": false,
      // Whether the day is a workday (including legal make-up workdays).
      "is_workday": false,
      // Whether the day is a rest day.
      "is_rest_day": true,
      // Whether any festival, solar term, or legal event applies on this day.
      "is_holiday": true,
      // Legal holiday name. Empty or omitted when none applies.
      "legal_holiday_name": "国庆中秋",
      // Legal holiday type: `rest` or `workday_adjust`.
      "legal_holiday_type": "rest",
      // Gregorian festival name. Returned when one applies.
      "solar_festival": "国庆节",
      // Lunar festival name. Returned when one applies.
      "lunar_festival": "",
      // Solar term name. Returned when one applies.
      "solar_term": "",
      // Lunar year (numeric).
      "lunar_year": 2025,
      // Lunar month (numeric).
      "lunar_month": 8,
      // Lunar day (numeric).
      "lunar_day": 10,
      // Lunar month as Chinese characters.
      "lunar_month_name": "八月",
      // Lunar day as Chinese characters.
      "lunar_day_name": "初十",
      // Ganzhi year.
      "ganzhi_year": "乙巳",
      // Ganzhi month.
      "ganzhi_month": "乙酉",
      // Ganzhi day.
      "ganzhi_day": "癸卯"
    }
  ],
  // List of holiday events.
  "holidays": [
    {
      // Event date (`YYYY-MM-DD`).
      "date": "2025-10-01",
      // Event name.
      "name": "国庆中秋",
      // Event type.
      "type": "legal_rest",
      // Only returned for legal-workday-adjust events.
      "is_workday": true
    }
  ],
  // Surrounding holidays. Only returned when `include_nearby=true` in `date` mode.
  "nearby": {
    // Nearest holidays before the queried date (reverse-chronological).
    "previous": [
      {
        // Aggregated date.
        "date": "2025-09-28",
        // Holiday events on this date.
        "events": [
          {
            // Event date.
            "date": "2025-09-28",
            // Event name.
            "name": "国庆中秋",
            // Event type.
            "type": "legal_workday_adjust",
            // Only returned for make-up workday events.
            "is_workday": true
          }
        ]
      }
    ],
    // Nearest holidays after the queried date (chronological).
    "next": [
      {
        // Aggregated date.
        "date": "2025-10-02",
        // Holiday events on this date.
        "events": [
          {
            // Event date.
            "date": "2025-10-02",
            // Event name.
            "name": "国庆中秋",
            // Event type.
            "type": "legal_rest",
            // Only returned for make-up workday events.
            "is_workday": true
          }
        ]
      }
    ]
  }
}

400 / Bad Request

Invalid request. Common causes:

  • None of date/month/year provided, or more than one provided.
  • Wrong date format: date must be YYYY-MM-DD, month must be YYYY-MM, year must be YYYY.
  • Invalid holiday_type.
  • Invalid timezone.
JSON
{
  // Business status code; 400 indicates an invalid request.
  "code": 400,
  // Detailed error reason.
  "message": "Only one of date/month/year can be provided"
}