get_supported_subdivisions
Retrieve valid subdivision codes and aliases for any supported country, enabling correct use of holiday-related tools like is_business_day, list_holidays, or next_business_day.
Instructions
List subdivision codes and aliases for a country's holiday calendar.
Use this to discover valid subdiv values before calling any country-aware
holiday tool (e.g. is_business_day, list_holidays, next_business_day).
IMPORTANT: Subdivision codes are case-sensitive and must be passed through
subdiv exactly as returned here — either a canonical code from
subdivisions or an alias key from aliases. Do NOT upper-case or otherwise
normalize them.
Example: country="DE" returns "BY" among its subdivisions. Passing
subdiv="BY" to list_holidays(year=2026, country="DE", subdiv="BY") then
reveals Bavarian regional holidays such as Epiphany (Jan 6).
Args: country: ISO 3166-1 alpha-2 code (case-insensitive, normalized to upper).
Returns: dict with keys: - country: normalized uppercase code. - subdivisions: list of canonical subdivision codes (empty if the country has no regional variants, e.g. JP). - aliases: dict mapping alias (mixed-case, verbatim) → canonical code (empty dict if the country exposes no aliases).
Raises:
ValueError: if country is unknown/unsupported.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| country | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||