API Ninjas Holidays Alternative for Vietnam (+ Lunar)
Published: · APIs in this article: Vietnam Holidays & Working Days, Vietnamese Lunar Calendar
API Ninjas Holidays is a solid general-purpose holiday API: one endpoint for many countries, a clean X-Api-Key header. If your app needs public holidays for many countries, it is a sensible default.
Vietnam is a harder case than most countries, for three reasons:
- Tết and Hung Kings Day follow the lunar calendar, so they move every year.
- The actual days off are announced by the government each year, often with swapped days and Saturdays worked in exchange (make-up workdays).
- The law changes: 2026 added a new public holiday, Vietnamese Culture Day on 24 November.
This page compares the two APIs for Vietnam only, and shows how to switch with minimal code changes.
Comparison
API Ninjas figures come from their public pages, checked on 2026-11-25. We did not create an account or call the API Ninjas API.
| API Ninjas Holidays | APIBox /v1/vn-holidays |
|
|---|---|---|
| Countries | Many (one API for all) [¹] | Vietnam only |
| Holiday list per year | Yes, /v2/holidays?country=VN [¹] |
Yes, ?year= |
| Years on the free plan | Current year only; other years are premium [¹] | 2026 and 2027 both returned on the Free plan (tested 2026-11-25) |
| "Is this date a holiday?" | /v1/isholiday; future-year dates are premium [¹] |
?date= returns is_workday, is_weekend, is_make_up_workday |
| Full Tết break (incl. weekend days) | Lists the weekday days off (16–20 Feb 2026) [³] | from / to range (14–22 Feb 2026, 9 days) |
| Make-up Saturdays (worked days) | Not documented | make_up_workdays |
| Official vs estimated schedule | Not documented | source: official (with the notice number) or estimated |
| "N working days after a date" | Not documented | ?from=…&add=N |
| Lunar ↔ solar conversion | Not documented | /v1/lunar-calendar (same key) |
| Free plan | 3,000 calls/month, 100 calls/hour, non-commercial, attribution required, no caching [²] | 1,000 requests/month, 30/min, 2 keys, no card |
| Paid | Developer $39/month for 100,000 calls (list price $59) and up [²] | Starter $5/month (50,000), Pro $15/month (500,000) |
[¹] https://api-ninjas.com/api/holidays · [²] https://api-ninjas.com/pricing · [³] https://api-ninjas.com/bank-holidays/vietnam
"Not documented" means the pages we checked do not mention it, not that API Ninjas cannot do it.
What the Vietnam data looks like
The 2026 schedule from APIBox (real response, 2026-11-25, two of six entries shown):
curl -s "https://apibox.io.vn/v1/vn-holidays?year=2026" -H "Authorization: Bearer $APIBOX_KEY"{
"year": 2026,
"saturday_off": true,
"holidays": [
{
"key": "new_year", "name_en": "New Year’s Day",
"from": "2026-01-01", "to": "2026-01-04", "days_off": 4, "statutory_days": 1,
"make_up_workdays": ["2026-01-10"],
"source": "official", "ref": "Thông báo 9441/TB-BNV"
},
{
"key": "tet", "name_en": "Lunar New Year (Tết)",
"from": "2026-02-14", "to": "2026-02-22", "days_off": 9, "statutory_days": 5,
"make_up_workdays": [],
"source": "official", "ref": "Thông báo 9441/TB-BNV"
}
],
"statutory_days_off": 12,
"workdays_in_year": 249
}make_up_workdays: ["2026-01-10"] is the Saturday people work to pay back the extra New Year day. A plain holiday list does not tell you that 10 January is a working day.
For 2027, the Tết schedule is already official (4–10 Feb 2027, notice 11483/TB-BNV), while holidays not yet announced are marked estimated, following the Labour Code until the official notice.
Migrating from API Ninjas
Before
From the API Ninjas docs (not called):
curl -X GET "https://api.api-ninjas.com/v2/holidays?country=US&type=public_holiday" \
-H "X-Api-Key: YOUR_API_KEY"Each row has country, iso, year, date, day, name and type.
After: an adapter that keeps the same row shape
If the rest of your code expects API Ninjas rows, wrap APIBox in a function that returns the same keys. This one expands each day-off range into one row per day and adds a source field:
# vn_holidays.py – run: APIBOX_KEY=... python3 vn_holidays.py
import os, datetime, requests
KEY = os.environ["APIBOX_KEY"]
H = {"Authorization": f"Bearer {KEY}"}
def vn_holidays(year):
r = requests.get("https://apibox.io.vn/v1/vn-holidays",
params={"year": year}, headers=H, timeout=10)
r.raise_for_status()
rows = []
for h in r.json()["holidays"]:
d = datetime.date.fromisoformat(h["from"])
end = datetime.date.fromisoformat(h["to"])
while d <= end:
rows.append({"country": "Vietnam", "iso": "VN", "year": year,
"date": d.isoformat(), "day": d.strftime("%A"),
"name": h["name_en"], "type": "PUBLIC_HOLIDAY",
"source": h["source"]}) # extra: official | estimated
d += datetime.timedelta(days=1)
return rows
rows = vn_holidays(2027)
print(len(rows), "days off in 2027")
for row in rows[:5]:
print(row)
# isholiday equivalent
r = requests.get("https://apibox.io.vn/v1/vn-holidays",
params={"date": "2027-02-08"}, headers=H, timeout=10)
d = r.json()
print(d["date"], d["is_workday"], d["holiday"] and d["holiday"]["name_en"])Real output, 2026-11-25:
22 days off in 2027
{'country': 'Vietnam', 'iso': 'VN', 'year': 2027, 'date': '2027-01-01', 'day': 'Friday', 'name': 'New Year’s Day', 'type': 'PUBLIC_HOLIDAY', 'source': 'estimated'}
{'country': 'Vietnam', 'iso': 'VN', 'year': 2027, 'date': '2027-01-02', 'day': 'Saturday', 'name': 'New Year’s Day', 'type': 'PUBLIC_HOLIDAY', 'source': 'estimated'}
{'country': 'Vietnam', 'iso': 'VN', 'year': 2027, 'date': '2027-01-03', 'day': 'Sunday', 'name': 'New Year’s Day', 'type': 'PUBLIC_HOLIDAY', 'source': 'estimated'}
{'country': 'Vietnam', 'iso': 'VN', 'year': 2027, 'date': '2027-02-04', 'day': 'Thursday', 'name': 'Lunar New Year (Tết)', 'type': 'PUBLIC_HOLIDAY', 'source': 'official'}
{'country': 'Vietnam', 'iso': 'VN', 'year': 2027, 'date': '2027-02-05', 'day': 'Friday', 'name': 'Lunar New Year (Tết)', 'type': 'PUBLIC_HOLIDAY', 'source': 'official'}
2027-02-08 False Lunar New Year (Tết)Two things to adjust while migrating:
- The rows include weekend days inside a break (2 and 3 January above). If your old logic assumed weekday-only rows, filter on
day, or better, ask the API directly with?date=and readis_workday. typeis alwaysPUBLIC_HOLIDAYhere. APIBox does not return observances or religious days; if you showed those from API Ninjas, keep that source for them.
The whole year is one request. Cache it for the day and you need only a handful of requests a month.
Lunar dates in the same key
Many Vietnamese apps also need lunar dates: Tết countdowns, death anniversaries, the 1st and 15th of each lunar month. Converting lunar new year 2027 to a solar date:
curl -s "https://apibox.io.vn/v1/lunar-calendar?lunar=2027-01-01" -H "Authorization: Bearer $APIBOX_KEY"{
"input": { "lunar": "2027-01-01", "leap": false },
"solar": { "date": "2027-02-06", "weekday": "Saturday", "weekday_vi": "Thứ Bảy" },
"lunar": { "day": 1, "month": 1, "year": 2027, "leap": false, "text": "01/01/2027", "month_length": 30 },
"holiday": { "vi": "Tết Nguyên Đán", "en": "Lunar New Year (Tết)" },
"can_chi": { "year": "Đinh Mùi", "month": "Nhâm Dần", "day": "Bính Thìn", "first_hour": "Mậu Tý" },
"zodiac": { "vi": "Dê", "en": "Goat" }
}Lunar New Year 2027 falls on Saturday 6 February 2027, inside the official 4–10 February break.
The step-by-step guide (working-day deadlines, delivery estimates in JavaScript, yearly anniversary reminders) is in our Vietnamese post API ngày lễ Việt Nam & lịch âm.
When API Ninjas is the better choice
- You need many countries. One API and one schema for many countries beats wiring a separate API per country. APIBox covers Vietnam only.
- You need more than public holidays: API Ninjas has 26 holiday types, including observances and religious holidays.
- You already use other API Ninjas endpoints and want a single vendor and key.
- Non-commercial or demo projects that only need the current year: the free plan's 3,000 calls/month is higher than APIBox Free's 1,000.
When APIBox fits better
- Your users are in Vietnam and you need the real day-off schedule: full Tết break, make-up Saturdays, official vs estimated.
- You need next year now (planning, SLAs, delivery dates spanning Tết) on a free or low-cost plan.
- You need working-day maths (
?from=…&add=N) or lunar conversion without another library.
Get started
The APIBox Free plan includes /v1/vn-holidays and /v1/lunar-calendar: 1,000 requests per month, up to 30 per minute, no card required.
More articles
- HTML to Markdown API: Clean Markdown From Any Web Page
Convert HTML or any URL to clean GitHub-flavored Markdown with one API call: tables, absolute links, Readability article extraction. curl, JS, Python. - IP Geolocation and User Agent Parsing in One API Key
Look up country, city, ASN and ISP for any IPv4/IPv6 address, parse User-Agent strings into browser, OS and device, and detect bots. curl + JS. - OG Image Generator API: Social Cards From a Title
Generate 1200×630 Open Graph images from a title, subtitle and site name with one GET request. Themes, gradients, story and square sizes. curl + JS. - QR Code Generator API: PNG, SVG, WiFi and vCard
Generate QR codes as PNG or SVG with one GET request: URLs, WiFi logins, vCards, SMS. Custom colours, size and error correction. curl, JS, Python.