DEV Community

Cover image for BMT-Holiday API: The Most Comprehensive Holiday Data You'll Need For Any Application
Ankit Arora
Ankit Arora

Posted on

BMT-Holiday API: The Most Comprehensive Holiday Data You'll Need For Any Application

🎯 The Problem

Let's face it, most holiday APIs are incomplete, expensive, or just plain unreliable. Whether you're building a global scheduling app, planning international content, or creating a travel platform, inaccurate holiday data can break your user experience.

The market is flooded with options:

  • Holiday API (holidayapi.com): Charges for fresh data and limits free plans
  • Nager.Date: Only covers 100+ countriesβ€”missing nearly 50 countries that BMT-Holiday supports
  • Abstract API: Has good reviews but limited historical data access
  • Time and Date: Complex implementation with minimal localization support
  • API-Ninjas: Covers 230 countries but lacks automatic detection

Meanwhile, BMT-Holiday API gives you 150+ countries, automatic country detection, and localizationβ€”all in a single fast and efficient API.


πŸš€ BMT-Holiday

1️⃣ Automatic Country Detection

Most APIs require you to hardcode country codes. BMT-Holiday intelligently detects the user's location automaticallyβ€”perfect for mobile apps, global websites, and multi-region platforms.

// With BMT-Holiday, country is OPTIONAL!
GET https://api-bmtdaily.koyeb.app/holidays?date=2026-12-25
// Auto-detects country and returns relevant holidays
Enter fullscreen mode Exit fullscreen mode

2️⃣ Full Holiday Information, Not Just Names

Other APIs give you a holiday name and date. BMT-Holiday provides comprehensive data:

{
  "success": true,
  "user": {
    "is_holiday": true,
    "holiday_name": "Christmas Day",
    "country": "US",
    "details": {
      "type": "Public Holiday",
      "regions": ["All"],
      "observed_by": ["Federal", "State"]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

3️⃣ Multiple Endpoints for Every Use Case

Endpoint Purpose What Others Offer
Quick Holiday Check Instant yes/no check Limited to single date
Upcoming Holidays Plan ahead with details Basic list only
Worldwide Holidays Global view on any date Usually missing
Year/Month/Range Flexible timeframes Rigid year-only queries
Compare Countries Side-by-side holiday comparison Non-existent!
Search Holidays Find any holiday by name Basic filtering only
Regions API Region-specific holidays Rarely supported

Bonus: The Refresh Cache endpoint ensures you always have the latest data without waiting for updates.


πŸ”₯ Features That Make Developers Choose BMT-Holiday

🌐 Localization Built-In

No more manually mapping country codes to display names. BMT-Holiday localizes holiday names and descriptions automatically based on the user's region.

⚑ Fast Response Times

With intelligent caching and optimized endpoints, BMT-Holiday delivers sub-100ms responsesβ€”critical for real-time applications.

πŸ“Š Statistical Insights

Need to know how many holidays are coming up? The stats=true parameter gives you instant analytics:

  • Total holidays in the period
  • Public vs. regional breakdown
  • Upcoming holiday counts

πŸ” Case-Insensitive Search

Search for "Christmas" or "christmas"β€”BMT-Holiday finds it. Others? Not so much.


πŸ“‹ Quick Comparison Table

Feature BMT-Holiday Holiday API Nager.Date Abstract API
Countries Supported 150+ 230+ 100+ 200+
Auto Country Detection βœ… ❌ ❌ ❌
Localization βœ… Limited ❌ ❌
Compare Countries βœ… ❌ ❌ ❌
Search Holidays βœ… Limited ❌ Limited
Region-Specific βœ… ❌ βœ… ❌
Year/Month/Range βœ… βœ… βœ… Limited
Statistics βœ… ❌ ❌ ❌
Cache Refresh βœ… ❌ ❌ ❌
Health Check βœ… ❌ ❌ Limited

πŸ’» Example Usage

Check if Today is a Holiday in India

const response = await fetch('https://api-bmtdaily.koyeb.app/holidays/check?country=IN&date=2026-06-23');
const data = await response.json();
console.log(data.is_holiday ? 'πŸŽ‰ Holiday!' : 'πŸ“… Working day');
Enter fullscreen mode Exit fullscreen mode

Get All Upcoming Holidays in the US

const response = await fetch('https://api-bmtdaily.koyeb.app/holidays/upcoming?country=US&limit=20&details=true');
const data = await response.json();
data.holidays.forEach(h => console.log(`${h.date}: ${h.name}`));
Enter fullscreen mode Exit fullscreen mode

Compare Holidays Between Two Countries

const response = await fetch('https://api-bmtdaily.koyeb.app/holidays/compare?country=IN&compare_country=US&date=2026-06-23');
const data = await response.json();
console.log(data.comparison); // Full side-by-side comparison
Enter fullscreen mode Exit fullscreen mode

πŸ† What Other APIs Can't Do

  1. Automatic Detection: BMT-Holiday knows where your users areβ€”others don't.
  2. Compare Mode: Plan team meetings across time zones with country comparison.
  3. Regional Precision: Get holidays specific to states, provinces, or regions.
  4. Search Intelligence: Find any holiday even if you don't know the exact name.
  5. Real-Time Updates: Refresh cache instantly when data changes.

πŸš€ Production-Ready Features

Health Check Endpoint

Monitor API status in real-time:

GET https://api-bmtdaily.koyeb.app/health
Enter fullscreen mode Exit fullscreen mode

Tested & Verified

All endpoints include built-in Postman tests and validation:

  • Status code verification
  • Response structure validation
  • Data integrity checks

Developer-Friendly

  • Detailed, predictable JSON responses
  • Comprehensive error handling
  • Detailed documentation
  • Postman collection ready

Features

  • βœ… Automatic country detection (unique keyword phrase)
  • βœ… 150+ countries (more than Nager.Date)
  • βœ… Compare countries (unique feature no competitor offers)
  • βœ… Built-in localization (developer-friendly)
  • βœ… Cache refresh (enterprise-ready)
  • βœ… Free tier (accessible to all)

Start building with BMT-Holiday.

πŸ”— Resources


Postman schema

{
  "info": {
    "name": "🌍 BMT-Holiday API",
    "description": "Comprehensive BMT-Holiday API with 150+ countries support. Includes automatic country detection with localization.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Get Holidays (Full Info)",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "pm.test(\"Status code is 200\", function() {",
              "    pm.response.to.have.status(200);",
              "});",
              "pm.test(\"Response has success flag\", function() {",
              "    var jsonData = pm.response.json();",
              "    pm.expect(jsonData).to.have.property('success');",
              "    pm.expect(jsonData.success).to.eql(true);",
              "});",
              "pm.test(\"Response has holiday data\", function() {",
              "    var jsonData = pm.response.json();",
              "    pm.expect(jsonData).to.have.property('user');",
              "    pm.expect(jsonData.user).to.have.property('is_holiday');",
              "});"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "https://api-bmtdaily.koyeb.app/holidays?country={{country}}&date={{date}}&stats=true&upcoming=true&limit=20",
          "protocol": "https",
          "host": ["api-bmtdaily", "koyeb", "app"],
          "path": ["holidays"],
          "query": [
            {
              "key": "country",
              "value": "{{country}}",
              "description": "ISO country code (auto-detected if omitted)"
            },
            {
              "key": "date",
              "value": "{{date}}",
              "description": "Date in YYYY-MM-DD format"
            },
            {
              "key": "stats",
              "value": "true",
              "description": "Include statistics"
            },
            {
              "key": "upcoming",
              "value": "true",
              "description": "Include upcoming holidays"
            },
            {
              "key": "limit",
              "value": "20",
              "description": "Number of upcoming holidays"
            }
          ]
        }
      },
      "response": []
    },
    {
      "name": "Quick Holiday Check",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "pm.test(\"Status code is 200\", function() {",
              "    pm.response.to.have.status(200);",
              "});",
              "pm.test(\"Response has holiday info\", function() {",
              "    var jsonData = pm.response.json();",
              "    pm.expect(jsonData).to.have.property('is_holiday');",
              "    pm.expect(jsonData).to.have.property('country');",
              "});"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "https://api-bmtdaily.koyeb.app/holidays/check?country={{country}}&date={{date}}",
          "protocol": "https",
          "host": ["api-bmtdaily", "koyeb", "app"],
          "path": ["holidays", "check"],
          "query": [
            {
              "key": "country",
              "value": "{{country}}",
              "description": "ISO country code"
            },
            {
              "key": "date",
              "value": "{{date}}",
              "description": "Date in YYYY-MM-DD format"
            }
          ]
        }
      },
      "response": []
    },
    {
      "name": "Upcoming Holidays",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "pm.test(\"Status code is 200\", function() {",
              "    pm.response.to.have.status(200);",
              "});",
              "pm.test(\"Response has upcoming holidays\", function() {",
              "    var jsonData = pm.response.json();",
              "    pm.expect(jsonData).to.have.property('holidays');",
              "});"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "https://api-bmtdaily.koyeb.app/holidays/upcoming?country={{country}}&limit={{limit}}&date={{date}}&details=true",
          "protocol": "https",
          "host": ["api-bmtdaily", "koyeb", "app"],
          "path": ["holidays", "upcoming"],
          "query": [
            {
              "key": "country",
              "value": "{{country}}",
              "description": "ISO country code"
            },
            {
              "key": "limit",
              "value": "{{limit}}",
              "description": "Number of holidays to return"
            },
            {
              "key": "date",
              "value": "{{date}}",
              "description": "Starting date"
            },
            {
              "key": "details",
              "value": "true",
              "description": "Include full details"
            }
          ]
        }
      },
      "response": []
    },
    {
      "name": "Worldwide Holidays",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "pm.test(\"Status code is 200\", function() {",
              "    pm.response.to.have.status(200);",
              "});",
              "pm.test(\"Response has worldwide data\", function() {",
              "    var jsonData = pm.response.json();",
              "    pm.expect(jsonData).to.have.property('total_holidays');",
              "    pm.expect(jsonData).to.have.property('countries_with_holidays');",
              "});"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "https://api-bmtdaily.koyeb.app/holidays/worldwide?date={{date}}&limit={{worldwideLimit}}",
          "protocol": "https",
          "host": ["api-bmtdaily", "koyeb", "app"],
          "path": ["holidays", "worldwide"],
          "query": [
            {
              "key": "date",
              "value": "{{date}}",
              "description": "Date to check"
            },
            {
              "key": "limit",
              "value": "{{worldwideLimit}}",
              "description": "Max countries to include"
            }
          ]
        }
      },
      "response": []
    },
    {
      "name": "Get Year Holidays",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "pm.test(\"Status code is 200\", function() {",
              "    pm.response.to.have.status(200);",
              "});",
              "pm.test(\"Response has year data\", function() {",
              "    var jsonData = pm.response.json();",
              "    pm.expect(jsonData).to.have.property('total_holidays');",
              "});"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "https://api-bmtdaily.koyeb.app/holidays/year/{{year}}?country={{country}}&details=true",
          "protocol": "https",
          "host": ["api-bmtdaily", "koyeb", "app"],
          "path": ["holidays", "year", "{{year}}"],
          "query": [
            {
              "key": "country",
              "value": "{{country}}",
              "description": "ISO country code"
            },
            {
              "key": "details",
              "value": "true",
              "description": "Include full details"
            }
          ]
        }
      },
      "response": []
    },
    {
      "name": "Get Month Holidays",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "pm.test(\"Status code is 200\", function() {",
              "    pm.response.to.have.status(200);",
              "});",
              "pm.test(\"Response has month data\", function() {",
              "    var jsonData = pm.response.json();",
              "    pm.expect(jsonData).to.have.property('total_holidays');",
              "    pm.expect(jsonData).to.have.property('month');",
              "});"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "https://api-bmtdaily.koyeb.app/holidays/month?country={{country}}&year={{year}}&month={{month}}",
          "protocol": "https",
          "host": ["api-bmtdaily", "koyeb", "app"],
          "path": ["holidays", "month"],
          "query": [
            {
              "key": "country",
              "value": "{{country}}",
              "description": "ISO country code"
            },
            {
              "key": "year",
              "value": "{{year}}",
              "description": "Year"
            },
            {
              "key": "month",
              "value": "{{month}}",
              "description": "Month (1-12)"
            }
          ]
        }
      },
      "response": []
    },
    {
      "name": "Get Holidays in Range",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "pm.test(\"Status code is 200\", function() {",
              "    pm.response.to.have.status(200);",
              "});",
              "pm.test(\"Response has range data\", function() {",
              "    var jsonData = pm.response.json();",
              "    pm.expect(jsonData).to.have.property('total_holidays');",
              "    pm.expect(jsonData).to.have.property('range');",
              "});"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "https://api-bmtdaily.koyeb.app/holidays/range?country={{country}}&from={{fromDate}}&to={{toDate}}",
          "protocol": "https",
          "host": ["api-bmtdaily", "koyeb", "app"],
          "path": ["holidays", "range"],
          "query": [
            {
              "key": "country",
              "value": "{{country}}",
              "description": "ISO country code"
            },
            {
              "key": "from",
              "value": "{{fromDate}}",
              "description": "Start date (YYYY-MM-DD)"
            },
            {
              "key": "to",
              "value": "{{toDate}}",
              "description": "End date (YYYY-MM-DD)"
            }
          ]
        }
      },
      "response": []
    },
    {
      "name": "Compare Countries",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "pm.test(\"Status code is 200\", function() {",
              "    pm.response.to.have.status(200);",
              "});",
              "pm.test(\"Response has comparison data\", function() {",
              "    var jsonData = pm.response.json();",
              "    pm.expect(jsonData).to.have.property('comparison');",
              "    pm.expect(jsonData.comparison).to.have.property('country1');",
              "    pm.expect(jsonData.comparison).to.have.property('country2');",
              "});"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "https://api-bmtdaily.koyeb.app/holidays/compare?country={{country}}&compare_country={{compareCountry}}&date={{date}}",
          "protocol": "https",
          "host": ["api-bmtdaily", "koyeb", "app"],
          "path": ["holidays", "compare"],
          "query": [
            {
              "key": "country",
              "value": "{{country}}",
              "description": "First country"
            },
            {
              "key": "compare_country",
              "value": "{{compareCountry}}",
              "description": "Second country"
            },
            {
              "key": "date",
              "value": "{{date}}",
              "description": "Date to compare"
            }
          ]
        }
      },
      "response": []
    },
    {
      "name": "Search Holidays",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "pm.test(\"Status code is 200\", function() {",
              "    pm.response.to.have.status(200);",
              "});",
              "pm.test(\"Response has search results\", function() {",
              "    var jsonData = pm.response.json();",
              "    pm.expect(jsonData).to.have.property('results');",
              "});"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "https://api-bmtdaily.koyeb.app/holidays/search?q={{searchQuery}}&country={{country}}&year={{year}}&caseSensitive=false",
          "protocol": "https",
          "host": ["api-bmtdaily", "koyeb", "app"],
          "path": ["holidays", "search"],
          "query": [
            {
              "key": "q",
              "value": "{{searchQuery}}",
              "description": "Search term (min 2 chars)"
            },
            {
              "key": "country",
              "value": "{{country}}",
              "description": "ISO country code"
            },
            {
              "key": "year",
              "value": "{{year}}",
              "description": "Year to search"
            },
            {
              "key": "caseSensitive",
              "value": "false",
              "description": "Case sensitive search"
            }
          ]
        }
      },
      "response": []
    },
    {
      "name": "Get Supported Countries",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "pm.test(\"Status code is 200\", function() {",
              "    pm.response.to.have.status(200);",
              "});",
              "pm.test(\"Response has countries data\", function() {",
              "    var jsonData = pm.response.json();",
              "    pm.expect(jsonData).to.have.property('countries');",
              "    pm.expect(jsonData).to.have.property('total_countries');",
              "});"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "https://api-bmtdaily.koyeb.app/holidays/countries",
          "protocol": "https",
          "host": ["api-bmtdaily", "koyeb", "app"],
          "path": ["holidays", "countries"]
        }
      },
      "response": []
    },
    {
      "name": "Get Regions",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "pm.test(\"Status code is 200\", function() {",
              "    pm.response.to.have.status(200);",
              "});",
              "pm.test(\"Response has regions data\", function() {",
              "    var jsonData = pm.response.json();",
              "    pm.expect(jsonData).to.have.property('regions');",
              "    pm.expect(jsonData).to.have.property('total_regions');",
              "});"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "https://api-bmtdaily.koyeb.app/holidays/regions?country={{country}}&year={{year}}",
          "protocol": "https",
          "host": ["api-bmtdaily", "koyeb", "app"],
          "path": ["holidays", "regions"],
          "query": [
            {
              "key": "country",
              "value": "{{country}}",
              "description": "ISO country code"
            },
            {
              "key": "year",
              "value": "{{year}}",
              "description": "Year"
            }
          ]
        }
      },
      "response": []
    },
    {
      "name": "Refresh Cache",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "pm.test(\"Status code is 200\", function() {",
              "    pm.response.to.have.status(200);",
              "});",
              "pm.test(\"Response confirms cache refresh\", function() {",
              "    var jsonData = pm.response.json();",
              "    pm.expect(jsonData).to.have.property('message');",
              "    pm.expect(jsonData.message).to.include('refreshed');",
              "});"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "https://api-bmtdaily.koyeb.app/holidays/refresh?country={{country}}&year={{year}}",
          "protocol": "https",
          "host": ["api-bmtdaily", "koyeb", "app"],
          "path": ["holidays", "refresh"],
          "query": [
            {
              "key": "country",
              "value": "{{country}}",
              "description": "ISO country code"
            },
            {
              "key": "year",
              "value": "{{year}}",
              "description": "Year"
            }
          ]
        }
      },
      "response": []
    },
    {
      "name": "Health Check",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "pm.test(\"Status code is 200\", function() {",
              "    pm.response.to.have.status(200);",
              "});",
              "pm.test(\"Service is healthy\", function() {",
              "    var jsonData = pm.response.json();",
              "    pm.expect(jsonData).to.have.property('status');",
              "    pm.expect(jsonData.status).to.eql('healthy');",
              "});"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "https://api-bmtdaily.koyeb.app/health",
          "protocol": "https",
          "host": ["api-bmtdaily", "koyeb", "app"],
          "path": ["health"]
        }
      },
      "response": []
    }
  ],
  "variable": [
    {
      "key": "country",
      "value": "IN",
      "type": "string"
    },
    {
      "key": "date",
      "value": "2026-06-21",
      "type": "string"
    },
    {
      "key": "year",
      "value": "2026",
      "type": "string"
    },
    {
      "key": "month",
      "value": "7",
      "type": "string"
    },
    {
      "key": "limit",
      "value": "10",
      "type": "string"
    },
    {
      "key": "worldwideLimit",
      "value": "10",
      "type": "string"
    },
    {
      "key": "compareCountry",
      "value": "US",
      "type": "string"
    },
    {
      "key": "searchQuery",
      "value": "Columbus",
      "type": "string"
    },
    {
      "key": "fromDate",
      "value": "2026-06-01",
      "type": "string"
    },
    {
      "key": "toDate",
      "value": "2026-06-30",
      "type": "string"
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

BMT-Holiday API: The Most Comprehensive Holiday Data Solution | 150+ Countries | Automatic Detection | Built-in Localization

Top comments (0)