Timezones API Endpoint - Free Public API

Endpoint URL:

https://aisenseapi.com/services/v1/timezones

Description:

This endpoint provides a list of all available timezones. Optionally, a timezone offset can be specified to filter the results to only those timezones that match the given offset. If no offset is provided, the API returns all timezones.

Response Format:

  • Content-Type: application/json
  • Default Behavior: Returns all timezones
  • Offset Filtering: Returns only timezones matching the given offset

Example Success Responses:

List all timezones

Request:

GET https://aisenseapi.com/services/v1/timezones

Response:

{
 "timezones": [
  { "timezone": "Europe/Paris", "offset": "+01:00" },
  { "timezone": "America/New_York", "offset": "-05:00" },
  { "timezone": "Asia/Tokyo", "offset": "+09:00" }
  ...
 ]
}
List timezones with a specific offset

Request:

GET https://aisenseapi.com/services/v1/timezones/+0100

or using an alias:

GET https://aisenseapi.com/services/v1/timezones/0100

Response: json

{
 "timezones": [
  { "timezone": "Europe/Paris", "offset": "+01:00" },
  { "timezone": "Africa/Tunis", "offset": "+01:00" },
  { "timezone": "CET", "offset": "+01:00" }
  ...
 ]
}
Invalid offset format

Request:

GET https://aisenseapi.com/services/v1/timezones/invalid

Response: json

"error": "Invalid timezone offset format. Expected format: ±HHMM" }
No timezones found for the given offset

Request:

GET https://aisenseapi.com/services/v1/timezones/+1500

Response: json

{ "error": "No timezones found for the given offset." }

Input Requirements:

  • The API accepts an optional timezone offset in the format ±HHMM.
  • If no offset is provided, the API returns all timezones.
  • Timezone offsets must be in the valid range -1200 to +1400.
  • Timezone offsets without a sign (+ or -) are assumed to be positive.
    • Example: 0100 is interpreted as +0100.

Use Cases:

  • Get a list of all available timezones for applications handling multiple regions.
  • Filter timezones by UTC offset for scheduling, event planning, or international applications.
  • Retrieve timezone offsets dynamically instead of relying on hardcoded timezone data.

How to Use:

1. Get all timezones

curl -X GET https://aisenseapi.com/services/v1/timezones

Response: Returns all timezones and their UTC offsets.

2. Get timezones matching a specific offset

curl -X GET https://aisenseapi.com/services/v1/timezones/+0200

Response: Returns only timezones that match the +0200 offset.

3. Use shorthand offset format (without +)

curl -X GET https://aisenseapi.com/services/v1/timezones/0200

Response: Returns the same result as +0200.

4. Handle invalid input gracefully

curl -X GET https://aisenseapi.com/services/v1/timezones/invalid

Response: Returns an error message.


Key Features:

  • Supports listing all timezones or filtering by offset
  • Allows shorthand offset input (for example, 0100 is treated as +0100)
  • Handles invalid offsets with clear error messages
  • Optimized for performance
  • No authentication required – Free public API

Scroll to Top