Week Number API

Free JSON API โ€” no API key required, CORS enabled

โœ… Free forever ยท โœ… No rate limit ยท โœ… Open source

Overview

The WeekNumber.cc API lets you get week numbers, date ranges, and ISO 8601 compliance data in JSON format. Perfect for calendars, scheduling tools, payroll systems, and productivity apps.

FeatureDetail
Base URLhttps://weeknumber.cc/api/week
FormatJSON
AuthenticationNone required
CORSEnabled (all origins)
Rate LimitNone
Cache1 hour (CDN cached)

Endpoints

GET /api/week

Get the current week number and date range.

{ "date": "2026-06-24", "week": 26, "year": 2026, "week_label": "Week 26 of 2026", "week_range": { "monday": "2026-06-22", "sunday": "2026-06-28" }, "day_of_week": "Wednesday", "weeks_in_year": 53 }
GET /api/week?date=2026-12-31

Get week number for a specific date.

# JavaScript fetch('https://weeknumber.cc/api/week?date=2026-12-31') .then(r => r.json()) .then(data => console.log(data)); # Python import requests r = requests.get('https://weeknumber.cc/api/week', params={'date': '2026-12-31'}) print(r.json()) # curl curl 'https://weeknumber.cc/api/week?date=2026-12-31'
GET /api/week?year=2026&week=25

Get the date range for a specific year and week number.

{ "year": 2026, "week": 25, "week_label": "Week 25 of 2026", "week_range": { "monday": "2026-06-15", "sunday": "2026-06-21" }, "weeks_in_year": 53 }

Query Parameters

ParameterTypeDescriptionExample
datestringDate in YYYY-MM-DD format. Returns the week for this date.2026-06-24
yearintegerThe year (1900-2100).2026
weekintegerThe week number (1-53).25

Usage Examples

๐Ÿ”— Embed Week Badge on Your Website

<!-- Show current week badge --> <img src="https://weeknumber.cc/og/week" alt="This is Week 26 of 2026" /> <!-- Or use the dynamic API --> <script> fetch('https://weeknumber.cc/api/week') .then(r => r.json()) .then(data => { document.getElementById('week-badge').innerHTML = `This is ${data.week_label} (${data.week_range.monday} โ†’ ${data.week_range.sunday})`; }); </script>

๐Ÿ“… Calendar Integration

// Get all 53 weeks of 2026 const weeks = []; for (let w = 1; w <= 53; w++) { const r = await fetch(`https://weeknumber.cc/api/week?year=2026&week=${w}`); const data = await r.json(); weeks.push({ week: data.week, start: data.week_range.monday, end: data.week_range.sunday }); }

Attribution

This API is free to use. We ask that you link back to WeekNumber.cc when using the API in production.

Source: https://weeknumber.cc Usage: Free to use. No API key required. Please link back to weeknumber.cc

Try the API Now

Make your first request โ€” no sign-up, no API key, no limits.

Test the API โ†’

๐Ÿ“… Related Tools

โณ Countdown ๐Ÿ“Š Compare Dates ๐Ÿ’€ Life in Weeks ๐ŸŽ–๏ธ Week Badge ๐Ÿง  Week Quiz ๐Ÿ“ค Share ๐ŸŽจ Badge Generator ๐Ÿ“… Calendar (.ics) โ“ FAQ ๐Ÿ“ Blog