All API requests require an API key passed in the X-API-Key
header.
curl -H "X-API-Key: your_api_key" \
/api/v1/countries
Get a list of supported countries and their metadata.
import requests
response = requests.get(
'/api/v1/countries',
headers={'X-API-Key': 'your_api_key'}
)
countries = response.json()
Retrieve holidays for a specific country and year.
fetch('/api/v1/holidays?country=US&year=2024', {
headers: {
'X-API-Key': 'your_api_key'
}
})
.then(response => response.json())
.then(holidays => console.log(holidays));
The API is rate limited to 100 requests per day per API key. Rate limit information is included in the response headers:
X-RateLimit-Limit
: Maximum requests per day (100)X-RateLimit-Remaining
: Remaining requests for the dayX-RateLimit-Reset
: Seconds until the rate limit resetsThe API uses conventional HTTP response codes:
200
- Success400
- Bad Request401
- Unauthorized404
- Not Found429
- Too Many Requests (Rate limit exceeded)