Skip to main content

🎯 Thai Holiday Data API

🗓️ ข้อมูลวันหยุดไทย

Version Status New

Welcome to Thai Holiday Data API, version 1.0, a data service developed by iApp Technology Co., Ltd. Our API provides comprehensive and up-to-date Thai holiday information from multiple authoritative sources. Get accurate holiday data for financial institutions and public holidays in Thailand with fast response times and reliable service.

Try Demo

Example Queries (Click to try)

?holiday_type=public&days_after=30
Get public holidays for the next 30 days
?holiday_type=financial&days_after=90
Get financial institution holidays for the next 90 days
?holiday_type=both&year=2025
Get all holidays (public and financial) for the year 2025
?holiday_type=public&start_date=2025-07-01&end_date=2025-12-31
Get public holidays from July to December 2025

Demo key is limited to 10 requests per day per IP
Click here to get your API key

Add query parameters (e.g., ?holiday_type=public&days_after=30)

Getting Started

  1. Prerequisites

    • An API key from iApp Technology
    • HTTP client or programming language of your choice
    • Understanding of REST API principles
  2. Quick Start

    • Fast response times (typically under 500ms)
    • Real-time holiday data updates
    • Multiple holiday types supported
    • Flexible date range queries
  3. Key Features

    • Financial Holidays: Thai Financial Institutions' Holidays from Bank of Thailand
    • Public Holidays: Thai Public Holidays from The Secretariat of Cabinet
    • Combined Data: Access to both types in a single request
    • Flexible date range queries (days before/after, specific years, custom ranges)
    • Thai and English holiday names
    • Weekday information in both languages
  4. Data Freshness

    • Our Thai team regularly monitors and updates holiday data immediately when new holidays are announced in Thailand
    • Data is cached for optimal performance while ensuring accuracy
How to get API Key?

Please visit API Portal to view your existing API key or request a new one.

Example

Get Current Year Public Holidays

Request:

curl -X GET "https://api.iapp.co.th/data/thai-holidays/holidays?holiday_type=public&days_after=365" \
-H "apikey: YOUR_API_KEY"

Response:

{
"holidays": [
{
"date": "2025-07-10",
"date_thai": null,
"weekday": "Thursday",
"weekday_thai": null,
"name": "วันอาสาฬหบูชา",
"name_thai": null,
"type": "public"
},
{
"date": "2025-07-28",
"date_thai": null,
"weekday": "Monday",
"weekday_thai": null,
"name": "วันเฉลิมพระชนมพรรษา สมเด็จพระเจ้าอยู่หัวมหาวชิราลงกรณ บดินทรเทพยวรางกูร",
"name_thai": null,
"type": "public"
}
],
"total_count": 25,
"date_range": {
"start_date": "2025-06-08",
"end_date": "2026-06-08",
"query_type": "range",
"reference_date": "2025-06-08"
},
"holiday_types": ["public"],
"cached_at": "2025-06-08T10:29:33.740056"
}

Get Holidays for Specific Year

Request:

curl -X GET "https://api.iapp.co.th/data/thai-holidays/holidays/year/2025?holiday_type=both" \
-H "apikey: YOUR_API_KEY"

Get Holidays in Date Range

Request:

curl -X GET "https://api.iapp.co.th/data/thai-holidays/holidays/range?start_date=2025-01-01&end_date=2025-12-31&holiday_type=financial" \
-H "apikey: YOUR_API_KEY"

Features & Capabilities

Holiday Types

Our API supports three types of holiday data:

Public Holidays

  • Source: The Secretariat of Cabinet (Maintained by iApp Technology Team)
  • Description: วันหยุดนักขัตฤกษ์ (Thai Public Holidays)
  • Includes: National holidays, royal ceremonies, religious observances

Financial Holidays

  • Source: Bank of Thailand (Maintained by iApp Technology Team)
  • Description: วันหยุดตามประเพณีของสถาบันการเงิน (Thai Financial Institutions' Holidays)
  • Includes: Banking holidays, financial sector closures

Both Types

  • Source: Combined from both sources
  • Description: All holiday types in a single response
  • Use Case: Comprehensive holiday planning

Query Options

  • Date Ranges: Query by days before/after today, specific years, or custom date ranges
  • Flexible Parameters: Multiple ways to specify the time period you need
  • Type Filtering: Get only the holiday types relevant to your use case

Data Quality

  • Real-time Updates: Holiday data is updated immediately when announced
  • Authoritative Sources: Data sourced from official Thai government APIs and verified calendars
  • Bilingual Support: Holiday names and weekdays available in Thai and English where applicable

API Reference

Base URL

https://api.iapp.co.th/data/thai-holidays

Authentication

All requests require an API key in the header:

apikey: YOUR_API_KEY

Endpoints

Get Thai Holidays

GET /holidays

Returns Thai holidays within a specified time period.

Query Parameters
ParameterTypeRequiredDefaultDescription
days_beforeintegerNo0Number of days before today (max: 1825)
days_afterintegerNo365Number of days after today (max: 1825)
holiday_typestringNo"public"Type: "financial", "public", or "both"
yearintegerNonullSpecific year (2020-2030, overrides days_before/after)

Get Holidays by Year

GET /holidays/year/\{year\}

Returns all holidays for a specific year.

Path Parameters
ParameterTypeRequiredDescription
yearintegerYesYear to query (2020-2030)
Query Parameters
ParameterTypeRequiredDefaultDescription
holiday_typestringNo"public"Type: "financial", "public", or "both"

Get Holidays by Date Range

GET /holidays/range

Returns holidays within a specific date range.

Query Parameters
ParameterTypeRequiredDescription
start_datestring (date)YesStart date (YYYY-MM-DD format)
end_datestring (date)YesEnd date (YYYY-MM-DD format)
holiday_typestringNoType: "financial", "public", or "both"

Get Holiday Types

GET /holidays/types

Returns information about available holiday types.

Response Format

Holiday Object

{
"date": "2025-07-10",
"date_thai": null,
"weekday": "Thursday",
"weekday_thai": null,
"name": "วันอาสาฬหบูชา",
"name_thai": null,
"type": "public"
}

Response Fields

FieldTypeDescription
datestring (date)Holiday date in YYYY-MM-DD format
date_thaistring/nullHoliday date in Thai format
weekdaystringDay of week in English
weekday_thaistring/nullDay of week in Thai
namestringHoliday name
name_thaistring/nullHoliday name in Thai
typestringHoliday type ("public" or "financial")

List Response

{
"holidays": [/* Holiday objects */],
"total_count": 25,
"date_range": {
"start_date": "2025-06-08",
"end_date": "2026-06-08",
"query_type": "range",
"reference_date": "2025-06-08"
},
"holiday_types": ["public"],
"cached_at": "2025-06-08T10:29:33.740056"
}

Error Codes

HTTP Status Codes

Status CodeDescription
200Success
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
404Not Found - Invalid endpoint
422Validation Error - Parameter validation failed
429Too Many Requests - Rate limit exceeded
500Internal Server Error

Validation Errors

Invalid Date Range

{
"detail": [
{
"loc": ["query", "start_date"],
"msg": "Invalid date format. Use YYYY-MM-DD",
"type": "value_error"
}
]
}

Invalid Holiday Type

{
"detail": [
{
"loc": ["query", "holiday_type"],
"msg": "Holiday type must be 'financial', 'public', or 'both'",
"type": "value_error"
}
]
}

Code Examples

Python

import requests

url = "https://api.iapp.co.th/data/thai-holidays/holidays"

params = {
'holiday_type': 'public',
'days_after': 90
}

headers = {
'apikey': 'YOUR_API_KEY'
}

response = requests.get(url, headers=headers, params=params)
data = response.json()

print(f"Found {data['total_count']} holidays")
for holiday in data['holidays']:
print(f"{holiday['date']}: {holiday['name']}")

JavaScript

const axios = require('axios');

const config = {
method: 'get',
url: 'https://api.iapp.co.th/data/thai-holidays/holidays',
headers: {
'apikey': 'YOUR_API_KEY'
},
params: {
holiday_type: 'both',
year: 2025
}
};

axios(config)
.then((response) => {
console.log(`Found ${response.data.total_count} holidays`);
response.data.holidays.forEach(holiday => {
console.log(`${holiday.date}: ${holiday.name}`);
});
})
.catch((error) => console.log(error));

PHP

<?php
$curl = curl_init();

$url = 'https://api.iapp.co.th/data/thai-holidays/holidays?' .
http_build_query([
'holiday_type' => 'public',
'days_after' => 180
]);

curl_setopt_array($curl, array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array(
'apikey: YOUR_API_KEY'
),
));

$response = curl_exec($curl);
curl_close($curl);

$data = json_decode($response, true);
echo "Found " . $data['total_count'] . " holidays\n";

foreach ($data['holidays'] as $holiday) {
echo $holiday['date'] . ": " . $holiday['name'] . "\n";
}
?>

Swift

import Foundation

let headers = [
"apikey": "YOUR_API_KEY"
]

var components = URLComponents(string: "https://api.iapp.co.th/data/thai-holidays/holidays")!
components.queryItems = [
URLQueryItem(name: "holiday_type", value: "financial"),
URLQueryItem(name: "year", value: "2025")
]

var request = URLRequest(url: components.url!, timeoutInterval: Double.infinity)
request.addValue("YOUR_API_KEY", forHTTPHeaderField: "apikey")
request.httpMethod = "GET"

let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
return
}

do {
let json = try JSONSerialization.jsonObject(with: data, options: [])
print(json)
} catch {
print(error)
}
}

task.resume()

Kotlin

import okhttp3.*
import java.io.IOException

val client = OkHttpClient()

val url = HttpUrl.Builder()
.scheme("https")
.host("api.iapp.co.th")
.addPathSegments("data/thai-holidays/holidays")
.addQueryParameter("holiday_type", "both")
.addQueryParameter("days_after", "365")
.build()

val request = Request.Builder()
.url(url)
.addHeader("apikey", "YOUR_API_KEY")
.build()

client.newCall(request).execute().use { response ->
if (!response.isSuccessful) throw IOException("Unexpected code $response")

println(response.body()?.string())
}

Java

import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class ThaiHolidayAPI {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();

String url = "https://api.iapp.co.th/data/thai-holidays/holidays" +
"?holiday_type=public&days_after=90";

HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("apikey", "YOUR_API_KEY")
.GET()
.build();

HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());

System.out.println(response.body());
}
}

Dart

import 'package:http/http.dart' as http;
import 'dart:convert';

void main() async {
final uri = Uri.parse('https://api.iapp.co.th/data/thai-holidays/holidays')
.replace(queryParameters: {
'holiday_type': 'public',
'year': '2025'
});

final response = await http.get(
uri,
headers: {
'apikey': 'YOUR_API_KEY'
}
);

if (response.statusCode == 200) {
final data = json.decode(response.body);
print('Found ${data['total_count']} holidays');

for (var holiday in data['holidays']) {
print('${holiday['date']}: ${holiday['name']}');
}
} else {
print('Error: ${response.statusCode}');
}
}

Best Practices

Error Handling

  1. Check HTTP Status Codes: Always verify the response status
  2. Parse Error Messages: Use the detailed error information for debugging
  3. Implement Fallbacks: Have backup plans for when the API is unavailable
  4. Log API Calls: Monitor your usage patterns and errors

Performance Tips

  1. Batch Requests: Get data for longer periods instead of multiple small requests
  2. Use Year Endpoint: For full year data, use the dedicated year endpoint
  3. Monitor Response Times: Track API performance in your applications

Use Cases

Business Applications

  • Payroll Systems: Calculate working days and holiday pay
  • Financial Services: Determine trading days and settlement dates
  • E-commerce: Plan promotions around holidays
  • Scheduling Systems: Avoid booking meetings on holidays

Development Integration

  • Calendar Applications: Show Thai holidays in calendar views
  • Business Intelligence: Include holiday data in analytics
  • Notification Systems: Send holiday greetings and reminders
  • Mobile Apps: Display relevant holiday information

Data Sources and Accuracy

Primary Sources

  • Bank of Thailand: Official financial institution holidays
  • Government Announcements: Real-time updates from Thai authorities

Update Process

Our dedicated Thai team monitors official channels and updates holiday data immediately when:

  • New holidays are announced by the government
  • Existing holidays are modified or cancelled
  • Special one-time holidays are declared

Data Validation

All holiday data undergoes validation checks to ensure:

  • Date accuracy and formatting
  • Proper categorization (public vs financial)
  • Consistent naming conventions
  • Completeness of required fields

Pricing

API Service NameEndpointIC Per Request
Thai Holiday Data API (v1.0)/holidays0.1 IC/Request
/holidays/year/{year}0.1 IC/Request
/holidays/range0.1 IC/Request
/holidays/types0.1 IC/Request

Rate Limits

  • Default: 1000 requests per hour per API key
  • Burst: Up to 100 requests per minute
  • Enterprise: Custom limits available

Contact our team for higher rate limits if needed for your application.

Support and Maintenance

Data Updates

Our Thai team ensures holiday data is always current by:

  • Monitoring government announcements 24/7
  • Updating the API within hours of official announcements
  • Validating data accuracy across multiple sources

API Reliability

  • Uptime: 99.9% SLA
  • Response Time: < 50ms average
  • Geographic: Served from multiple regions for optimal performance

Getting Help

  • Documentation: This comprehensive guide
  • API Portal: https://ai.iapp.co.th for account management
  • Support: Contact our team through the API portal
  • Status Page: Monitor API health and announcements