Skip to main content
whatweek.ca

See what week of the year it is right now in Canada, including the current week number and the dates this week starts and ends.

Week toolsAboutContactBlog

Canadian Holidays API — JSON

Public, free, key-less API: federal and provincial statutory holidays, long weekends, and ISO week numbers. CORS-friendly, edge-cached.

GET /api/holidays.json

Returns statutory holidays for a year and (optional) province.

Query parameters

NameTypeDescription
yearintegerYear (1900–2100). Defaults to the current year.
provincestringProvince code (ON, QC, BC, AB, ...). If omitted, returns federal holidays.
longWeekends0 | 1If '1', also include the list of long weekends.

Accepted province codes

cURL examples

curl https://whatweek.ca/api/holidays.json?year=2026&province=on
curl "https://whatweek.ca/api/holidays.json?year=2026&province=qc&longWeekends=1"

Sample response

{
  "year": 2026,
  "province": { "code": "CA-ON", "nameEn": "Ontario", "nameFr": "Ontario" },
  "count": 13,
  "holidays": [
    {
      "date": "2026-01-01",
      "nameEn": "New Year's Day",
      "nameFr": "Jour de l'An",
      "global": true,
      "counties": null,
      "isoWeek": 1
    }
  ],
  "source": {
    "site": "https://whatweek.ca",
    "data": "https://date.nager.at",
    "docs": "https://whatweek.ca/en/api-docs"
  }
}

GET /api/week.json

Returns the current week number (ISO and Canada), week dates, day of the year, this week's holidays, and the next long weekend.

Query parameters

NameDescription
provinceProvince code (optional)
dateDate YYYY-MM-DD (defaults to today)
localeen | fr
curl "https://whatweek.ca/api/week.json?province=bc&locale=en"

GET /api/holidays.ics

Ready-to-import ICS calendar for Google, Apple, Outlook.

curl "https://whatweek.ca/api/holidays.ics?year=2026&province=ab" -o holidays-2026-AB.ics

Caching & quotas

Responses are cached at the Vercel edge for 24h (s-maxage=86400) with stale-while-revalidate. Client cache is 1h (max-age=3600). This covers most integrations.

Default limits: 60 req/min/IP anonymous, 600+/min with a partner key. The X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-RateLimit-Bucket headers are returned on every response.

Request a partner key →

Frequently asked questions

Is the API free?

Yes — the API is open and key-less for light use (60 req/min/IP), and CORS-friendly. High-volume partners can request a free key.

Is there a rate limit?

60 requests per minute per IP in anonymous mode; 600+/min with a partner key. X-RateLimit-* headers expose usage. See /api-keys to request a key.

Where does the data come from?

The Nager.Date public API is the primary source. A federal fallback is used if Nager.Date is unavailable.

Can I cache the data?

Yes, recommended. The payload is essentially immutable once the year has begun. Cache-Control suggests 1h browser, 24h CDN.