pinjia.day

China Working Day API

The only holiday API that correctly handles China's 调休 (makeup workday) system. Free, no auth required, CORS enabled. OpenAPI Spec

Why This API Exists

China's holiday system is unique: the government swaps weekends with workdays to create longer holidays. A Saturday might be a mandatory workday; a Wednesday might be a day off. Global holiday APIs (Calendarific, HolidayAPI, Nager.Date) list the holidays but miss the makeup workdays entirely — leading to wrong working-day calculations, missed deadlines, and confused supply chain schedules.

This API returns the correct answer for every date, including the 6 makeup workdays per year that other APIs ignore.

Endpoints

GET /api/v1/isWorkday

Check whether a specific date is a working day in China.

curl "https://pinjia.day/api/v1/isWorkday?date=2026-02-14"
{
  "date": "2026-02-14",
  "year": 2026,
  "dayOfWeek": "Saturday",
  "isWorkday": true,
  "type": "makeup_workday",
  "holiday": null,
  "makeupFor": {
    "id": "chunjie",
    "name": "春节",
    "nameEn": "Chinese New Year (Spring Festival)"
  }
}

Key insight: Feb 14, 2026 is a Saturday — but isWorkday: true because it's a makeup workday for Spring Festival. Every other holiday API would return "weekend."

GET /api/v1/workingDays

Count working days between two dates, accounting for holidays AND makeup workdays.

curl "https://pinjia.day/api/v1/workingDays?from=2026-02-01&to=2026-03-01"
{
  "from": "2026-02-01",
  "to": "2026-03-01",
  "calendarDays": 29,
  "workingDays": 15,
  "publicHolidays": 9,
  "weekends": 5,
  "makeupWorkdays": [
    { "date": "2026-02-14", "dayOfWeek": "Saturday", "makeupFor": "Chinese New Year (Spring Festival)" },
    { "date": "2026-02-28", "dayOfWeek": "Saturday", "makeupFor": "Chinese New Year (Spring Festival)" }
  ]
}

GET /api/v1/holidays

Get all holidays and makeup workdays for a given year.

curl "https://pinjia.day/api/v1/holidays?year=2026"
{
  "year": 2026,
  "source": "State Council General Office Notice (国办发明电〔2025〕7号)",
  "totalHolidayDays": 33,
  "totalMakeupDays": 6,
  "holidays": [
    { "id": "yuandan", "name": "元旦", "nameEn": "New Year's Day", "from": "2026-01-01", "to": "2026-01-03", "days": 3 },
    { "id": "chunjie", "name": "春节", "nameEn": "Chinese New Year (Spring Festival)", "from": "2026-02-15", "to": "2026-02-23", "days": 9 }
  ],
  "makeupWorkdays": [
    { "date": "2026-01-04", "dayOfWeek": "Sunday", "makeupFor": "yuandan", "makeupForEn": "New Year's Day" }
  ],
  "publishedYears": [2026, 2025]
}

Use Cases

IndustryProblem Solved
Supply Chain / LogisticsAccurate lead time calculation through CNY and Golden Week — including the 3-4 week practical shutdown
HR / PayrollCorrect working-day counts for salary calculation — makeup Saturdays are paid workdays
E-commerceDelivery date estimation that accounts for factory and courier closures
Financial ServicesMarket closure days — China's exchanges follow the State Council schedule exactly
Project ManagementSprint planning and deadline setting with real working-day math

Pricing: Free

All endpoints are free, no API key required, no rate limit. CORS enabled — call directly from your frontend.

We keep the API free because it drives traffic to our supply chain tools. If you're building something that needs China holiday awareness, just use it.

Need Custom Integration?

If you need webhook push (instant notification when next year's schedule drops), multi-country bundles, bulk data exports, or SLA guarantees — email us and we'll scope a solution.

Quick Start

JavaScript / Node.js

const res = await fetch("https://pinjia.day/api/v1/isWorkday?date=2026-02-14");
const data = await res.json();
console.log(data.isWorkday); // true — it's a Saturday but you must work

Python

import requests
r = requests.get("https://pinjia.day/api/v1/workingDays", params={"from": "2026-02-01", "to": "2026-03-01"})
print(r.json()["workingDays"])  # 15 (not 20 — Spring Festival + makeup days)

cURL

curl -s "https://pinjia.day/api/v1/holidays?year=2026" | jq '.makeupWorkdays'

Data Source & Accuracy

All data comes from the State Council General Office (国务院办公厅) official notices, cross-verified against two independent sources (chinese-days open dataset + officeholidays.com). Updated within 2 hours of each year's announcement.

Currently published: 2025, 2026. The 2027 schedule will be added the day it's announced (typically November–December 2026).

Embeddable Widget

Add a real-time "Is China open today?" badge to your website with one line of code. The widget auto-detects today's date in China time (Asia/Shanghai) and shows whether businesses are open or closed — including makeup workdays that other tools miss.

Embed Code

<script src="https://pinjia.day/widget.js" async></script>

Live Preview

Who Should Use This

AudienceUse Case
Sourcing AgentsShow clients when Chinese suppliers are open
Freight ForwardersDisplay factory/port status on booking pages
E-commerce SellersShipping delay warnings during holidays
HR / Remote TeamsDashboard widget for cross-border team availability

The widget is lightweight (<2 KB), requires no dependencies, and works in any HTML page. It calls the /api/v1/isWorkday endpoint once on load.