Skip to content
API Operational Β· v1

WorldClock API

Build powerful time, timezone, location, calendar, sunrise, sunset and astronomical applications with WorldClock data.

Developer access: Public read-only access is enabled; API-key architecture is ready when you need it.
GET /api/v1/time
cURL
curl -s 'https://worldclock.to/api/v1/time?timezone=Asia/Karachi'
Example JSON
{
    "success": true,
    "data": {
        "timezone": "Asia/Karachi",
        "utc_offset": "+05:00",
        "abbreviation": "PKT",
        "local_time": "2026-09-09T14:30:00+05:00",
        "date": "2026-09-09",
        "time": "14:30:00",
        "unix": 1788946200,
        "dst": false,
        "city": "Karachi",
        "country": "Pakistan"
    },
    "meta": {
        "version": "v1",
        "timezone": "Asia/Karachi",
        "timestamp": 1788946200
    }
}
One source of truth

Why WorldClock API

Website tools, widgets and API responses share the same bundled locations, IANA timezone logic and WorldClock astronomical calculation methodology.

01

Server-Synchronised Time

Use a server timestamp as the instant, then apply real IANA timezone rules instead of trusting a visitor’s device clock.

02

DST-Aware Conversion

Conversions are performed for the requested date, so daylight-saving transitions are not treated as fixed UTC offsets.

03

No Core External API

The public API does not depend on another time, timezone, sunrise or moon provider to answer core requests.

04

Versioned by Design

The v1 response contract is isolated so a future v2 can evolve without silently breaking existing integrations.

Available APIs

Choose the Data You Need

Full endpoint reference β†’
How it works

Request β†’ Calculate β†’ JSON

1

Send a clean URL

Call a versioned /api/v1/… endpoint with validated query parameters.

β†’
2

Use WorldClock Core

Timezone, location and astronomy engines resolve the requested data.

β†’
3

Receive consistent JSON

Success, data and meta follow the same structure across v1.

Quick Start

Your First Request

Try the current time in Karachi. The returned local time is generated at request time; the documentation sample is illustrative, not hard-coded live data.

Open API Explorer
JavaScript
fetch('https://worldclock.to/api/v1/time?timezone=Asia/Karachi')
  .then(r => r.json())
  .then(console.log);
Use cases

Built for Global Applications

Global Dashboards

Show exact local time across offices and markets.

Scheduling Systems

Resolve DST-aware meeting and appointment times.

Travel Applications

Show destination time, sun data and local calendar context.

Remote-Work Platforms

Power team clocks and timezone-aware collaboration.

Calendar Applications

Convert dates, Unix timestamps and local time safely.

Event Platforms

Display local event times without fixed-offset mistakes.

Logistics Systems

Normalize timestamps across regions and handoffs.

Productivity Tools

Add clocks, timers and timezone context to workflows.

A Time Platform Built on the Same Engine as WorldClock

The public API exposes the same bundled location database, IANA timezone rules and astronomical calculations used by the site itself. It is designed for dashboards, scheduling tools, travel applications, calendars and other software that needs dependable time data.

FAQ

Developer Questions

What is the WorldClock API?

A versioned JSON interface to WorldClock time, timezone, location and astronomy calculations.

Is the API free?

The current configuration exposes developer access without a paid plan. The administrator can require API keys and change fair-use limits later without changing endpoint URLs.

What timezone data does it use?

IANA timezone identifiers and the timezone rules available to the WordPress/PHP runtime are used for current offsets and date-specific DST conversion.

Does conversion support DST?

Yes. The source local datetime is interpreted in its IANA zone and converted as an absolute instant, rather than by adding a hard-coded offset.

What happens when a limit is reached?

The API returns HTTP 429 with a consistent RATE_LIMIT_EXCEEDED error object.

How should responses be cached?

Cache location and country directory data longer than live time responses. Exact current-time responses should be treated as point-in-time data and refreshed according to your product needs.

Build with WorldClock

Start With the Explorer, Ship With v1

Test parameters in your browser, then copy the same request into your application.

Try the APIRead Documentation β†’