World Time API

Usage Examples

Request a list of valid timezones (as JSON):

# curl "http://worldtimeapi.org/api/timezone"

Request a list of valid locations for an area (as JSON):

http://worldtimeapi.org/api/timezone/:area
# curl "http://worldtimeapi.org/api/timezone/Europe"

Request the current time for a timezone with region:

http://worldtimeapi.org/api/timezone/:area/:location[/:region]
# curl "http://worldtimeapi.org/api/timezone/America/Argentina/Salta"

By default, API responses are in JSON format nohighlight. Adding a suffix of .txt to any API URL will return a plain-text response which may be easier to parse on some systems:

# curl "http://worldtimeapi.org/api/timezone/Europe/London.txt"

Request the current time based on your public IP (as JSON):

# curl "http://worldtimeapi.org/api/ip"

Request the current time for a specific IP (in plain text):

http://worldtimeapi.org/api/ip/:ipv4
# curl "http://worldtimeapi.org/api/ip/8.8.8.8.txt"