Misc

Holiday and Calendar Lookup

0calls
1 credits / call

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

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.

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

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