← Back to API Ninjas
Check if a given date is a public holiday for a given country
Checks whether a given date is a public holiday in a country. Requires `country` and `date`. For a whole year of public holidays use /publicholidays.
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/ispublicholiday",
query: {
"country": "example",
"date": "example"
}
});
console.log(output);Query parameters
countryrequired
string
2-letter ISO country code.
daterequired
string
Date in YYYY-MM-DD format. Must be between 1980-01-01 and 2050-12-31 (inclusive).