Mexico Holiday API
Mexico has only 8 mandatory national holidays under the LFT — but three of them don't have fixed dates. They're always observed on a Monday, calculated fresh each year. Hardcoding February 5th is wrong for most years.
Free plan includes commercial use · no credit card required
Mexico's floating Monday rule
Mexico is the only LATAM country where national holidays are legally defined as occurring on a specific Monday of the month — not on the original calendar date. This was established to create long weekends and reduce absenteeism. If your app hardcodes the original dates, it will misidentify business days every year.
API response for Mexico
The API returns the correct observed date for each year. February 5th is a regular business day in 2026 — the holiday is on February 2nd.
{
"success": true,
"data": [
{
"date": "2026-02-02",
"name": "Día de la Constitución",
"original_date": "2026-02-05",
"type": "national"
},
{
"date": "2026-03-16",
"name": "Natalicio de Benito Juárez",
"original_date": "2026-03-21",
"type": "national"
},
{
"date": "2026-11-16",
"name": "Día de la Revolución",
"original_date": "2026-11-20",
"type": "national"
}
],
"meta": { "country": "MX", "year": 2026, "total": 8 }
} {
"success": true,
"data": {
"date": "2026-02-05",
"is_business_day": true,
"day_of_week": "Thursday"
},
"meta": { "country": "MX" }
}
// Feb 5 is a regular Thursday — the Constitución holiday is on Feb 2 Endpoints for Mexico
Replace :country with MX.
Free plan includes holidays, is-business-day, and next-holiday.
/v1/MX/holidays/:year Free All 8 LFT holidays for Mexico with correct observed dates. Floating holidays include original_date for reference.
"date": "2026-02-02", "original_date": "2026-02-05" /v1/MX/is-business-day?date=YYYY-MM-DD Free Check if a date is a business day in Mexico. Returns true for original holiday dates when the holiday has been shifted.
"is_business_day": true (Feb 5) / false (Feb 2) /v1/MX/business-days/add?date=YYYY-MM-DD&days=N Starter Add N business days to a date, skipping weekends and Mexican holidays with correct floating Monday dates.
"result_date": "2026-02-06" /v1/MX/business-days/between?from=YYYY-MM-DD&to=YYYY-MM-DD Starter Count business days between two dates in Mexico. Accounts for all 8 LFT holidays at their actual observed dates.
"business_days": 21 /v1/MX/last-business-day?date=YYYY-MM-DD Starter Last business day of the month. Useful for billing cycles, payroll cutoffs, and financial reporting.
"last_business_day": "2026-02-27" The February 5th trap
The most common Mexico bug: assuming February 5th is always a holiday.
const API = "https://api.feriados.io/v1";
const KEY = process.env.FERIADOS_API_KEY;
// ❌ Wrong: hardcoding original dates
const wrongHolidays = [
"2026-02-05", // Constitución original date — but the holiday is Feb 2
"2026-03-21", // Juárez original date — but the holiday is Mar 16
"2026-11-20", // Revolución original date — but the holiday is Nov 16
];
// ✅ Correct: ask the API for the actual observed date
async function getHolidays(year) {
const res = await fetch(
`${API}/MX/holidays/${year}`,
{ headers: { Authorization: `Bearer ${KEY}` } }
);
const { data } = await res.json();
return data.map(h => h.date); // Always the actual observed date
}
const holidays2026 = await getHolidays(2026);
// → ["2026-01-01", "2026-02-02", "2026-03-16", ...] Common use cases for Mexico
Mexico has the fewest mandatory holidays in LATAM — but the floating Monday rule means none of them can be safely hardcoded.
Scheduling a charge on February 5th seems safe — but the holiday is February 2nd. Validate the actual observed date, not the original.
is-business-day Free "Arrives in 5 business days" during the March floating Monday window will be off if you use March 21st instead of the real date.
business-days/add Starter Payroll for Mexican employees needs the actual worked days. The floating Monday rule means the same month can have different business day counts each year.
business-days/between Starter Coordinating shipments between Mexico and other LATAM countries requires knowing each country's actual holiday dates — not the original dates.
business-days/add Starter Also available for 10 more LATAM countries
Same API, same endpoints — just swap the country code.
Ready for production
Free API key in 30 seconds. Free plan includes is-business-day for Mexico with commercial use.
Starter plan from $9/mo for full operational logic.