WhatxTime API v1

Free JSON API for times, time zones, conversions, countries, cities and holidays. No key needed for public endpoints.

Base URL: https://whatxtime.com/api/v1. Responses are JSON (UTF-8). Times are calculated on our servers from the IANA Time Zone Database — the same engine as this website, our browser extension and our mobile app.

Quick examples

curl "https://whatxtime.com/api/v1/time/now?tz=Africa/Lagos"
curl "https://whatxtime.com/api/v1/time/cities/nigeria/abuja"
curl -X POST "https://whatxtime.com/api/v1/convert" \
  -H "Content-Type: application/json" \
  -d '{"datetime":"2026-11-01T01:30","from":"America/New_York","to":"Europe/London","resolve":"earlier"}'

Endpoints

MethodPathPurpose
GET/healthService status and time zone database version
GET/time/now?tz=Current time in an IANA zone
GET/time/cities/{country}/{city}Current time in a city
GET/time/cities?refs=a/b,c/dCurrent time in up to 25 cities
GET/timezones, /timezones/{id}Zone list; one zone with next DST change
GET/countries, /countries/{slug}, /countries/{slug}/citiesCountry directory
GET/cities, /cities/{country}/{city}City directory (filters: country, q, timezone, capital, sort)
GET/search?q=City and country search (autocomplete)
POST/convertConvert a local time between zones or cities
POST/compareCompare zones at one instant
POST/meeting-plannerHour-by-hour overlap for a date
GET/calendar, /holidays, /holidays/{CC}Month grid; public holidays
GET/blog/posts, /blog/posts/{slug}, /blog/categoriesPublished articles

Daylight saving edge cases

When a local time is repeated (clocks go back) or skipped (clocks go forward), pass "resolve": "earlier" | "later" | "reject". The default earlier picks the first occurrence, or shifts a skipped time forward by the size of the gap. The response says which case applied in input.resolution.

Errors

{ "error": { "code": "invalid_timezone", "message": "\"+01:00\" is not a valid IANA timezone identifier.", "details": { "timezone": "+01:00" } } }

Status codes: 400 invalid JSON, 404 not found, 405 method not allowed, 422 validation error, 429 rate limited, 500 server error.

Limits and caching

Public limits: 120 GET and 30 POST requests per minute per client, reported in X-RateLimit-* headers. Time responses are Cache-Control: no-store. Directory responses may be cached and support ETag.

Full machine-readable specification: OpenAPI 3.1 (YAML).