Worldtimeapi

World Time API

A simple API to get the current time based on a request with a timezone.

Maps & location#openapi#location

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

A simple API to get the current time based on a request with a timezone.

Endpoints 12

  • GETrequest the current time based on the ip of the request. note: this is a "best guess" obtained from open-source data./ip
  • GETrequest the current time based on the ip of the request. note: this is a "best guess" obtained from open-source data./ip.txt
  • GETrequest the current time based on the ip of the request. note: this is a "best guess" obtained from open-source data./ip/:ipv4
  • GETrequest the current time based on the ip of the request. note: this is a "best guess" obtained from open-source data./ip/:ipv4.txt
  • GETa listing of all timezones./timezone
  • GETa listing of all timezones./timezone.txt
  • GETa listing of all timezones available for that area./timezone/:area
  • GETa listing of all timezones available for that area./timezone/:area.txt
  • GETrequest the current time for a timezone./timezone/:area/:location
  • GETrequest the current time for a timezone./timezone/:area/:location.txt
  • GETrequest the current time for a timezone./timezone/:area/:location/:region
  • GETrequest the current time for a timezone./timezone/:area/:location/:region.txt

API details

Base URL
http://worldtimeapi.org/api
Authentication
None declared in the description
Operations
12 operations on 12 pathsGET 12
Description format
OpenAPI 3.0.1, API version 20210108
Listed from
APIs.guru OpenAPI Directory (CC0-1.0)
Source updated

How to test the World Time API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the World Time API collection, without the publisher's secrets.
  3. Add your credentialsOpen the collection's variables or an environment and enter your API key or token, if the API needs one.
  4. Send a requestPick an endpoint, for example “request the current time based on the ip of the request. note: this is a "best guess" obtained from open-source data.” (GET /ip), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the World Time API?

A simple API to get the current time based on a request with a timezone. It is listed under Maps & location and has 12 endpoints.

Who publishes the World Time API?

It is listed from Worldtimeapi's public API description (an OpenAPI document), not published by Worldtimeapi on Swastik Codes. Anyone who controls worldtimeapi.org can claim the profile by adding a DNS TXT record.

What is the base URL of the World Time API?

Requests go to http://worldtimeapi.org/api. Endpoint paths are added to this base URL.

How do I authenticate with the World Time API?

Its OpenAPI description does not declare an authentication scheme. Some endpoints may be open; check the provider's documentation before relying on that.

How many endpoints does the World Time API have?

12 operations on 12 paths (12 GET).

Is forking the World Time API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.