BYTETOOLS

TimeAPI.io API

Free time zone API with no key: get current time for any IANA time zone, convert between zones and calculate DST offsets. Tested curl example and live response.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-19

What is the TimeAPI.io API?

TimeAPI.io is a free API that returns the current time for any IANA time zone, converts times between zones, and reports daylight saving offsets — all without an API key.

Time zones are the classic problem developers underestimate. Offsets change with daylight saving, the rules differ by country, and they are amended by governments more often than most people realise. TimeAPI.io handles the lookups against a maintained IANA database so you do not ship a stale offset table.

It is particularly useful server-side where you need an authoritative current time independent of the machine clock, and for converting a timestamp between two named zones without pulling in a heavyweight date library.

Quick facts

Base URL
https://timeapi.io/api
Authentication
No key required.
Rate limit
No formally published limit; fair use expected.
Pricing
Free.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the TimeAPI.io API

Every request below was executed against the live API on 2026-08-19, and the response shown is the real body it returned — not an illustration.

1. Current time in Asia/Karachi

GET https://timeapi.io/api/Time/current/zone?timeZone=Asia/Karachi

curl
curl 'https://timeapi.io/api/Time/current/zone?timeZone=Asia/Karachi'
JavaScript (fetch)
const res = await fetch("https://timeapi.io/api/Time/current/zone?timeZone=Asia/Karachi");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://timeapi.io/api/Time/current/zone?timeZone=Asia/Karachi", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "year": 2026,
  "month": 8,
  "day": 19,
  "hour": 18,
  "minute": 6,
  "seconds": 43,
  "milliSeconds": 816,
  "dateTime": "2026-08-19T18:06:43.8163936",
  "date": "08/19/2026",
  "time": "18:06",
  "timeZone": "Asia/Karachi",
  "dayOfWeek": "Wednesday",
  "dstActive": false
}

2. Convert a time between two zones with a POST request

POST https://timeapi.io/api/Conversion/ConvertTimeZone

curl
curl -X POST 'https://timeapi.io/api/Conversion/ConvertTimeZone' \
  -H 'Content-Type: application/json' \
  -d '{"fromTimeZone":"Europe/London","dateTime":"2026-08-21 10:00:00","toTimeZone":"America/New_York","dstAmbiguity":""}'
JavaScript (fetch)
const res = await fetch("https://timeapi.io/api/Conversion/ConvertTimeZone", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"fromTimeZone":"Europe/London","dateTime":"2026-08-21 10:00:00","toTimeZone":"America/New_York","dstAmbiguity":""}),
});
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

headers = {
    "Content-Type": "application/json",
}

payload = {"fromTimeZone":"Europe/London","dateTime":"2026-08-21 10:00:00","toTimeZone":"America/New_York","dstAmbiguity":""}

res = requests.post("https://timeapi.io/api/Conversion/ConvertTimeZone", headers=headers, json=payload, timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "fromTimezone": "Europe/London",
  "fromDateTime": "2026-08-21T10:00:00",
  "toTimeZone": "America/New_York",
  "conversionResult": {
    "year": 2026,
    "month": 8,
    "day": 21,
    "hour": 5,
    "minute": 0,
    "seconds": 0,
    "milliSeconds": 0,
    "dateTime": "2026-08-21T05:00:00",
    "date": "08/21/2026",
    "time": "05:00",
    "timeZone": "America/New_York",
    "dstActive": true
  }
}

Parameters

ParameterTypeRequiredDescription
timeZonestringRequiredIANA time zone name, e.g. `Asia/Karachi`. Asia/Karachi

Response fields

dateTimestring
Full local date and time in ISO-like format.
date / timestring
Convenience split of the local date and the local time.
timeZonestring
The IANA zone the result applies to.
dayOfWeekstring
Local day name.
dstActiveboolean
Whether daylight saving is currently in effect for that zone.

What you can build with the TimeAPI.io API

  • Display local time for offices or users in multiple regions
  • Convert meeting times between participants' time zones
  • Check whether daylight saving is active before scheduling a recurring job
  • Get a trusted current time server-side without depending on the host clock

Common errors and how to fix them

400

Unknown or misspelled time zone name.

Fix: Use exact IANA identifiers such as `America/New_York` — not abbreviations like EST, and note the underscore.

TimeAPI.io API — frequently asked questions

Is there a free time zone API without an API key?

Yes. TimeAPI.io returns current time, zone conversions and DST status for any IANA time zone with no key or signup.

What time zone format does the API expect?

IANA identifiers such as `Asia/Karachi` or `America/New_York`. Abbreviations like EST or PKT are ambiguous and are not accepted.

How do I know if daylight saving is active?

The response includes a `dstActive` boolean for the requested zone, so you do not need to implement DST rules yourself.

Can I convert a specific time between two zones?

Yes. The API exposes conversion endpoints that take a source zone, a target zone and a timestamp, in addition to the current-time endpoint shown here.

Tools that pair with this API

TimeAPI.io is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-19; always check the official documentation before relying on this API in production, as terms and limits can change.