You need the ISO week number for a date. Seems simple. Then you write the code and find out week 1 doesn't start on January 1, a date in early January can belong to the year before, and some years run to 53 weeks.
Most modern date libraries get this right. Plenty of older ones don't. And if you're working in a shell script, a spreadsheet, or a language with thin date support, you end up doing the math by hand and slipping at the year boundary.
The Week Number API hands you the answer over HTTP. One GET request, one JSON object, no key. It's a small REST API that returns the correct ISO 8601 calendar week for any date, including the awkward days around New Year.
The short answer
Send a GET request to https://weekisit.com/api/v1/week and you get back today's ISO week number as JSON. Add ?date=YYYY-MM-DD for any other date. No API key, no signup, CORS enabled, so it runs straight from browser code.
A call for June 3 2026 returns week 23. A call for January 1 2027 returns week 53, because that Friday still sits in the 2026 week-numbering year. Every response gives you the week, the ISO year, the weekday, and the Monday-to-Sunday date range.

Week Number API endpoints
Three routes cover almost everything you'll reach for.
Current week
CODE0
Returns the ISO week for today, computed in UTC.
A specific date
CODE1
Pass any date as YYYY-MM-DD and you get the week that date falls in.
A week's date range
CODE2
Give it a year and a week number, get back the start and end dates. This is the reverse lookup: week to dates instead of date to week. Handy when you store data by week and need to show humans the actual days.
What the JSON response contains
Every call returns a flat JSON object. Here's the body for ?date=2026-06-03:
CODE3
What each field means:
| Field | Type | Meaning |
|---|---|---|
| IC4 | string | The date you queried, in IC5 |
| IC6 | integer | ISO 8601 week number, 1 to 53 |
| IC7 | integer | ISO week-numbering year, which isn't always the calendar year |
| IC8 | string | Day name for that date |
| IC9 | string | The Monday that opens the week |
| IC10 | string | The Sunday that closes the week |
| IC11 | integer | Total weeks in that ISO year, either 52 or 53 |
The year field is the one people miss, and it matters more than it looks. More on that lower down.
Calling the Week Number API from your code
Pick your language. The shape is the same every time: GET the URL, read the JSON, pull the field you want. Think of it as an ISO week API where every result already follows the standard, so you never touch the date math yourself.
curl
CODE4
JavaScript (fetch)
CODE5
Python (requests)
CODE6
Because CORS is open, the fetch example runs in the browser with no proxy in front of it. Responses are plain GETs with no side effects, so they cache well behind a CDN or in your own layer.
Where a week number API helps
Plenty of systems run on week numbers, and they all need to agree on which week is which.
Retail and finance lean on weekly calendars, from the 4-5-4 retail calendar to standard ISO weeks in European reporting. Agile teams label sprints and releases by week. Ops teams bucket logs, metrics, and alerts into weekly windows. Payroll and shift tools schedule people by week.
The trouble starts when two of those systems compute the week differently, or split the year-end boundary in different places. A shared endpoint that always returns the ISO 8601 week gives every service one definition to call. If your weeks follow a fiscal year instead, the fiscal calendar page covers the US October and UK April variants.
Why ISO week numbers are tricky to compute
The rules sound easy and then bite you in the corners. Weeks start on Monday. Week 1 is the week holding the year's first Thursday, which is the same as saying the week that contains January 4.
So January 1 is not always in week 1. When it falls on a Friday, Saturday, or Sunday, it belongs to the final week of the previous year. That single rule is behind most of the off-by-one bugs people file against their own date helpers.
Then there's the 53rd week. Most years stop at 52. A year gets a 53rd when it starts on a Thursday, or on a Wednesday in a leap year. 2026 is one of those long years. You can read the full reason on the weeks in a year page, and the standard itself is laid out in the ISO week number guide.

Why the ISO week-year can differ from the calendar year
This is where hand-rolled code usually breaks. Here are four dates around the 2026-to-2027 turn and what the API returns for each:
| Date | Calendar year | ISO week | ISO week-year |
|---|---|---|---|
| 2026-01-01 (Thu) | 2026 | 1 | 2026 |
| 2026-12-28 (Mon) | 2026 | 53 | 2026 |
| 2027-01-01 (Fri) | 2027 | 53 | 2026 |
| 2027-01-04 (Mon) | 2027 | 1 | 2027 |
Read the third row twice. A date in January 2027 carries week 53 of 2026. If you store only the week number and assume the calendar year, your records for that week scatter across two buckets and your weekly reports go wrong by one row right at year-end.
Picture a script that builds a label as year + "-W" + week. Feed it January 1 2027 and it writes 2027-W53, a week that 2027 doesn't even have. The correct label is 2026-W53, using the ISO week-year. Get the week number right but pair it with the calendar year and you've still shipped a bug.
The year field keeps the pair together. Always store the ISO week and the ISO week-year as a unit. Week 53 of 2026 runs Monday December 28 2026 to Sunday January 3 2027, and you can check any week against the 2026 week calendar.
Errors and rate limits
Send a date the API can't parse and you get a 400 with a clear body:
CODE7
The API is free for normal use and needs no key. Keep automated traffic reasonable; very high volume from a single IP may be throttled. For a handful of lookups in a script, a cron job, or a front end, you won't bump into anything.
Prefer not to call an endpoint at all? The week calculator does date-to-week conversion right in the browser, and the home page shows the current week the moment it loads.
FAQ
Do I need an API key?
No. The Week Number API is free and open, with no key and no signup. CORS is enabled, so you can call it directly from front-end JavaScript without a proxy.
Which week numbering does it use?
ISO 8601. Weeks start on Monday, and week 1 is the week containing the year's first Thursday. It does not use the US system where week 1 always contains January 1.
Why does the API sometimes return a different year than my date?
At the turn of the year a date can sit in the previous or next ISO week-numbering year. January 1 2027 falls in week 53 of 2026, so the year field reads 2026 even though the calendar year is 2027.
Can I get the start and end dates of a week?
Yes, two ways. Every response includes week_start (Monday) and week_end (Sunday). You can also query a week directly with /week/2026/53 to get its date range back.
What date format does it expect?
ISO 8601, written as YYYY-MM-DD. Send dates in that format and you get them back the same way, which keeps parsing predictable on both ends.
Quick reference
- Current ISO week: IC23
- Any date: add IC24
- Week to date range: IC25
- No code needed? Try the week calculator or check this week's number.
- Standard explained: the ISO week number guide.
Sources and further reading
- ISO 8601 overview on Wikipedia: https://en.wikipedia.org/wiki/ISO_8601
- ISO week date on Wikipedia: https://en.wikipedia.org/wiki/ISOweekdate
- The official standard at ISO.org: https://www.iso.org/iso-8601-date-and-time-format.html