WorldTimeAPI alternative: a drop-in replacement for worldtimeapi.org
worldtimeapi.org is offline. Keep the same /api/timezone and /api/ip paths, 15 fields and .txt output: change the host, add an API key, done.
Updated
Short answer: worldtimeapi.org is offline, and the quickest replacement keeps its URLs. TimeLogic answers the same /api/timezone and /api/ip paths, with the same JSON fields and .txt output, on https://api.timelogicapi.com. Change the host, add an API key, and your parser does not change.
# before
curl "http://worldtimeapi.org/api/timezone/Europe/London"
# after
curl "https://api.timelogicapi.com/api/timezone/Europe/London?api_key=YOUR_KEY"
What happened to worldtimeapi.org?
WorldTimeAPI was a free, keyless JSON and plain-text time API used everywhere from Python tutorials to Power BI reports and ESP32 clocks. Its reliability fell apart over 2025: in January 2025 its own status page showed 15.48% uptime for the previous month, and by November 2025 users reported 2.79% (Python forum thread). In 2026 it was shut down: since April 2026 its API has answered 410 Gone with {"error":"gone","status":410,"message":"WorldTimeAPI has been sunset. This endpoint is gone."} when it answers at all (see this archived response from September 1, 2026).
When we checked on October 30, 2026, worldtimeapi.org closed connections without answering. If your logs show Connection reset by peer, ERR_EMPTY_RESPONSE, timeouts, or error pages from worldtimeapi.org, the problem is not your code.
How do I migrate from WorldTimeAPI?
- Create a free API key. The Free plan includes 10,000 requests per month; no card needed.
- Replace
worldtimeapi.orgwithapi.timelogicapi.comand usehttps://. - Send the key. Use a header where you can (
Authorization: Bearer …orX-API-Key: …); use theapi_keyquery parameter for tools that cannot set headers. - Keep the rest of the path, and your response handling, exactly as it is.
| You call today | Call this instead |
|---|---|
/api/timezone | https://api.timelogicapi.com/api/timezone |
/api/timezone/Europe | https://api.timelogicapi.com/api/timezone/Europe |
/api/timezone/America/New_York | https://api.timelogicapi.com/api/timezone/America/New_York |
/api/timezone/America/Argentina/Salta.txt | https://api.timelogicapi.com/api/timezone/America/Argentina/Salta.txt |
/api/ip | https://api.timelogicapi.com/api/ip |
/api/ip/8.8.8.8.txt | https://api.timelogicapi.com/api/ip/8.8.8.8.txt |
No /v1 prefix: the WorldTimeAPI-compatible routes live at the same paths WorldTimeAPI used.
Code examples
JavaScript (Node 18+ or any runtime with fetch):
const res = await fetch("https://api.timelogicapi.com/api/timezone/Europe/London", {
headers: { Authorization: `Bearer ${process.env.TIMELOGIC_API_KEY}` },
});
const data = await res.json();
console.log(data.datetime, data.abbreviation); // same fields as worldtimeapi.org
Python:
import os, requests
r = requests.get(
"https://api.timelogicapi.com/api/ip",
headers={"X-API-Key": os.environ["TIMELOGIC_API_KEY"]},
timeout=10,
)
r.raise_for_status()
print(r.json()["timezone"])
Go:
req, _ := http.NewRequest("GET", "https://api.timelogicapi.com/api/timezone/Asia/Tokyo", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("TIMELOGIC_API_KEY"))
res, err := http.DefaultClient.Do(req)
Plain text, for shell scripts and small devices:
curl "https://api.timelogicapi.com/api/timezone/Etc/UTC.txt" \
-H "X-API-Key: $TIMELOGIC_API_KEY"
Power BI / Power Query, where headers are awkward:
= Json.Document(Web.Contents("https://api.timelogicapi.com/api/timezone/Etc/UTC?api_key=YOUR_KEY"))
Every language, line by line (PHP, Java, C#, Ruby, ESP32 and more), with fixes for common errors: Migrate from WorldTimeAPI.
What stays exactly the same?
- Paths:
/api/timezone,/api/timezone/{area},/api/timezone/{area}/{location}[/{region}],/api/ip,/api/ip/{ip}, each with a.txtvariant. - Fields: the same 15 fields with the same names, types and formats, including
datetimewith six fractional digits and an offset (2025-08-13T11:13:46.612000+01:00),dst_from/dst_untilasnulloutside DST, and ISOweek_number. - Errors:
404 {"error":"unknown location"},{"error":"malformed ip"}and{"error":"not found"}, orError: …lines on.txt. - Behaviour: case-insensitive zone names, the same zone list (WorldTimeAPI's final 596 names plus
America/Coyhaique), open CORS, andapplication/json/text/plainwithcharset=utf-8.
What is different?
- A key is required on every request. It shares your plan's quota with the rest of the API.
- Microseconds always end in
000, because timestamps come from a millisecond clock. .txtlines are alphabetical, the fixed order WorldTimeAPI served from 2019 to July 2024 (later its order changed per request).- Newer data: current tz and IP datasets, so a few IP addresses may resolve differently than they did years ago.
- Optional extra: add
sign=trueand the response carries an Ed25519 signature in sixX-TimeLogic-*headers. The body is unchanged, JSON or.txt.
The complete contract (every route, field, header and error) is in the WorldTimeAPI-compatible routes documentation, with a machine-readable OpenAPI file and an interactive reference for the WorldTimeAPI-compatible API, where you can try each route with your key.
When should I use the /v1 API instead?
The compatible routes exist so old code keeps working. New code can use the same key with the /v1 World Time API, which adds what WorldTimeAPI never had: coordinate and IP time zone lookup, time zone conversion, DST transitions, business days with holiday calendars, up to 10 zones per bulk request, and signed responses. You can mix both in one project.
Read the launch post: WorldTimeAPI is gone. Your code doesn't have to change.
Still choosing? Compare TimeLogic with other providers in the time API comparison.
Frequently asked questions
What happened to worldtimeapi.org?
WorldTimeAPI was a free, keyless time API that was shut down in 2026. Since April 2026 its API has answered 410 Gone with the message "WorldTimeAPI has been sunset. This endpoint is gone." It had been unreliable for over a year before that: in January 2025 its status page showed 15.48% uptime for the previous month, and by November 2025 users reported 2.79%. When we checked on October 30, 2026, worldtimeapi.org did not answer API requests at all.
What is the best WorldTimeAPI alternative?
If you want to change as little code as possible, use a service that answers the same paths with the same response format. TimeLogic serves /api/timezone, /api/timezone/{area}/{location}, /api/ip and their .txt variants on https://api.timelogicapi.com with the same 15 fields, so the only changes are the host name and an API key.
Do I need an API key to replace WorldTimeAPI with TimeLogic?
Yes. Every request needs a TimeLogic API key, sent as an Authorization: Bearer header, an X-API-Key header, or an api_key query parameter. The Free plan includes 10,000 requests per month with no credit card.
Are the JSON field names the same as WorldTimeAPI?
Yes. The time object has the same 15 fields with the same names, types and formats: abbreviation, client_ip, datetime, day_of_week, day_of_year, dst, dst_from, dst_offset, dst_until, raw_offset, timezone, unixtime, utc_datetime, utc_offset and week_number.
Do the .txt endpoints still work?
Yes. Add .txt to any route, for example /api/timezone/Europe/London.txt or /api/ip.txt, to get text/plain key: value lines. Errors on .txt routes are plain text too, such as Error: unknown location.
What does an unknown time zone return?
The same as WorldTimeAPI: HTTP 404 with the body {"error":"unknown location"} on JSON routes and Error: unknown location on .txt routes. These 404 responses do not count against your quota.
Is the replacement free?
The Free plan includes 10,000 requests per month without a credit card and covers the WorldTimeAPI-compatible routes and the /v1 API alike. Paid plans raise the monthly quota.
Does /api/ip work with IPv6 addresses?
Yes. /api/ip/{ip} accepts IPv4 and IPv6 addresses, and /api/ip resolves the zone of the address the request comes from. A malformed address returns 404 {"error":"malformed ip"}.
Can I call the compatible routes from a browser?
Yes, CORS is open (Access-Control-Allow-Origin: *). Because every request needs a key, public web pages should call your own backend and let it add the key.
Is the .txt format exactly the same?
The same 15 fields as key: value lines, with null written as the key followed by a colon and a space. Lines come in alphabetical order, the order WorldTimeAPI used from 2019 to July 2024, and the body has no trailing newline.
How do I list every time zone?
GET /api/timezone returns a JSON array of all 597 names (WorldTimeAPI's final 596 plus America/Coyhaique); /api/timezone.txt returns one name per line, and /api/timezone/Europe lists one area.
Will my WorldTimeAPI rate-limit handling still work?
There are no x-ratelimit-* headers. Limits follow your plan's monthly quota; when it is used up the API returns 429 with the code QUOTA_EXCEEDED.
Can I prove which time the API returned?
Yes. Add sign=true and the response carries an Ed25519 signature in six X-TimeLogic-* headers, while the body stays byte-for-byte the same WorldTimeAPI-format JSON or text.
Is TimeLogic the same service as WorldTimeAPI?
No. TimeLogic is a separate time API that serves the same public paths and response format, so code written for worldtimeapi.org keeps working with a new host and an API key.