← Back to API Ninjas
GET/v2/holidays

Get holidays for a given country and year.

Returns holidays for a country and calendar year, optionally filtered by holiday type. Requires a `country`. For holidays falling on one date use /v1/isholiday.

API Ninjas·$0.001 per call

Example code

// Using @orth/sdk - The simplest way to call APIs // Install: npm install @orth/sdk import Orthogonal from "@orth/sdk"; const orthogonal = new Orthogonal({ apiKey: process.env.ORTHOGONAL_API_KEY, }); const output = await orthogonal.run({ api: "api-ninjas", path: "/v2/holidays", query: { "country": "example" } }); console.log(output);

Query parameters

countryrequired
string

Country name or ISO 3166-2 country code (preferred).

year
number

Calendar year between 2005 and 2039 (inclusive). Default is the current year. Note: not all countries are guaranteed to contain data going back to 2005. (Default: 2025)

type
string

Filter results to a single holiday type. Accepts one of the enumerated values, e.g. `public_holiday` for nationally mandated days off. Omit to return every type. (Allowed: public_holiday, state_holiday, local_holiday, province_territory_holiday, de_facto_holiday, substitute_holiday, bank_holiday, government_holiday, private_sector_holiday, optional_holiday, restricted_trading_day, christian_holiday, orthodox_holiday, muslim_holiday, jewish_holiday, hindu_holiday, observance, united_nations_observance, flag_day, silent_day, half_day, working_day, season, clock_change, sporting_event)

    Orthogonal - Giving AI agents the tools they need.