CALENDAR

ISO Week Number API

GET/week-number

Get the current ISO week number and week-numbering year.

No signup or API key required.

Parameters

No endpoint-specific parameters. Use format to choose the response representation.

formatenumoptional ยท query
Response format. Defaults to json.
jsontext

No request body. Unknown or repeated query parameters return HTTP 400.

Returns 200 OK

A JSON object with the following fields.

weekinteger
ISO 8601 week number, 1 through 53. Weeks begin Monday; week 1 contains January 4.
yearinteger
ISO week-numbering year, which can differ from the calendar year near New Year.

Plain text

With format=text: Only the week number, without the year.

Errors

Validation and service errors always return JSON, including when format=text.

errorstring
A machine-readable error code, such as invalid_parameter or rate_limited.
messagestring
A description of the problem.

400 Invalid parameters.

414 Query string exceeds 2048 characters.

429 Rate limit reached. Wait the seconds in Retry-After before retrying.

Usage notes

ISO 8601 week and week-numbering year. Weeks start Monday. Week 1 contains January 4. Near New Year, year can differ from the calendar year. Text returns the week number.

Label a weekly report using ISO 8601 conventions. Keep the returned year with the week number because dates near New Year may belong to a different ISO year.

Responses are not cached. Browser requests are supported through open CORS.

120 requests per minute per IP, with up to 30 per 10 seconds, shared across APIs. Limits are approximate per Cloudflare location. Full usage limits โ†—