Skip to content
WorldClock API v1

API Endpoints

One versioned surface for current time, IANA timezones, conversion, locations, astronomy, Unix timestamps and calendar formatting.

GET/api/v1/time

Current Time API

Return the server-synchronised current instant in an IANA timezone, city or country.

Parameters & examples →
GET/api/v1/timezone

Time Zone API

Inspect an IANA timezone, UTC offset, abbreviation and daylight-saving state.

Parameters & examples →
GET/api/v1/convert

Time Zone Conversion API

Convert a local date/time between IANA zones using the rules that apply on that date.

Parameters & examples →
GET/api/v1/cities

Cities API

Search, locate and paginate the bundled WorldClock city directory.

Parameters & examples →
GET/api/v1/city/{city}

City & Location API

Return location, timezone, exact local time, sunrise and sunset for one city.

Parameters & examples →
GET/api/v1/countries

Countries API

List countries and territories in the WorldClock directory.

Parameters & examples →
GET/api/v1/country/{country}

Country API

Return country, capital, geographic region, timezones and bundled cities.

Parameters & examples →
GET/api/v1/sun

Sunrise & Sunset API

Calculate sunrise, sunset, twilight, solar noon and day length from coordinates.

Parameters & examples →
GET/api/v1/moon

Moon API

Calculate moon phase, illumination, lunar age and approximate moonrise/moonset.

Parameters & examples →
GET/api/v1/unix

Unix Timestamp API

Convert Unix timestamps, UTC and local ISO 8601 dates.

Parameters & examples →
GET/api/v1/calendar

Calendar API

Return calendar facts for a date in a timezone.

Parameters & examples →
GET/api/v1/format

Date & Time Formatting API

Format an instant using safe named presets in any IANA timezone.

Parameters & examples →
Collections included: The cities and countries list routes have their own documentation pages, including filtering, pagination and response guidance.The individual city and country lookup routes are documented separately as well.