One time, clearly expressed. Batch Cities UTC Timers Play About

API

Public time API (v1)

JSON endpoints for the current instant, format conversion, and timezone conversion. CORS *, no API key for v1. Rate limit: 120 requests per 60 seconds per IP; over the limit you get HTTP 429 with a Retry-After header. Do not use for safety-critical timing.

GET /api/v1/now

Query: format (iso | unix | unix_ms | rfc2822 | http | custom), tz (IANA), optional pattern for custom (YYYY MM DD HH mm ss Z X x).

curl "https://time.foo/api/v1/now?format=iso&tz=Asia/Singapore"

GET /api/v1/convert

Query: from (ISO string or unix seconds/ms), from_tz, to_tz, format, optional pattern.

curl "https://time.foo/api/v1/convert?from=1700000000&to_tz=America/New_York&format=iso"

GET /api/v1/timezone

Query: optional time, from_tz, to_tz — returns offsets and ISO labels in both zones.

curl "https://time.foo/api/v1/timezone?from_tz=UTC&to_tz=Asia/Tokyo"

Discovery

GET /api/v1/ returns a JSON index. Errors look like {"error":"bad_request","message":"..."}.

Unknown query parameters return 400 with the list of allowed ones (for example, /timezone takes from_tz and to_tz, not tz).

Related: converter, embed clocks, about time.