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
| Method | Path | Purpose |
|---|---|---|
| GET | /health | Service 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/d | Current time in up to 25 cities |
| GET | /timezones, /timezones/{id} | Zone list; one zone with next DST change |
| GET | /countries, /countries/{slug}, /countries/{slug}/cities | Country directory |
| GET | /cities, /cities/{country}/{city} | City directory (filters: country, q, timezone, capital, sort) |
| GET | /search?q= | City and country search (autocomplete) |
| POST | /convert | Convert a local time between zones or cities |
| POST | /compare | Compare zones at one instant |
| POST | /meeting-planner | Hour-by-hour overlap for a date |
| GET | /calendar, /holidays, /holidays/{CC} | Month grid; public holidays |
| GET | /blog/posts, /blog/posts/{slug}, /blog/categories | Published 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).