← Back to API Ninjas
Get bank holidays for a given country and year.
Returns bank holidays for a country and calendar year, covering banking closures only. Requires a `country`. To test a single date use /isbankholiday.
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: "/v1/bankholidays",
query: {
"country": "example"
}
});
console.log(output);Query parameters
countryrequired
string
Country name or ISO 3166-2 country code (preferred).
year
number
Calendar year between 1980 and 2050 (inclusive). Defaults to the current year.