基礎 URL
https://epiweek.com/api/v1 所有端點支援 CORS 並返回 JSON 回應。
GET /api/v1/now
獲取當前流行病學週。
查詢參數
standard(可選)- MMWR 或 ISO。預設為 MMWRdate(可選)- YYYY-MM-DD 格式的日期。預設為今天
請求範例
curl https://epiweek.com/api/v1/now?standard=MMWR 回應範例
{
"week": 1,
"year": 2026,
"startDate": "2026-01-04T00:00:00.000Z",
"endDate": "2026-01-10T00:00:00.000Z",
"standard": "MMWR"
} GET /api/v1/convert
將特定日期轉換為其流行病學週。
查詢參數
date(必需)- YYYY-MM-DD 格式的日期standard(可選)- MMWR 或 ISO。預設為 MMWR
請求範例
curl "https://epiweek.com/api/v1/convert?date=2025-12-25&standard=ISO" 回應範例
{
"week": 52,
"year": 2025,
"startDate": "2025-12-22T00:00:00.000Z",
"endDate": "2025-12-28T00:00:00.000Z",
"standard": "ISO"
} GET /api/v1/calendar/[year]
獲取特定年份的所有流行病學週。
路徑參數
year(必需)- 1900-2100 之間的年份
查詢參數
standard(可選)- MMWR 或 ISO。預設為 MMWR
請求範例
curl https://epiweek.com/api/v1/calendar/2026 回應範例
{
"year": 2026,
"standard": "MMWR",
"totalWeeks": 52,
"weeks": [
{
"week": 1,
"year": 2026,
"startDate": "2026-01-04",
"endDate": "2026-01-10",
"standard": "MMWR"
}
]
} 日曆訂閱
在您的日曆應用程式中訂閱流行病學週。
訂閱 URL
https://epiweek.com/calendar.ics 將此 URL 添加到 Google 日曆、Apple 日曆或 Outlook 以自動查看流行病學週。
下載 .ics 檔案速率限制
API 請求限制為每個 IP 地址每分鐘 100 次請求。如需更高限制,請聯絡我們: [enable JavaScript].