{
  "openapi": "3.1.0",
  "info": {
    "title": "Timezone & World Time API",
    "version": "1.0.0",
    "description": "Current local time, UTC offset and daylight-saving status for any of 400+ IANA timezones.\n\nGet the current local time, UTC offset, and daylight-saving status for any of the 400+ IANA timezones. Look up time by timezone name, or list every supported zone — backed by the canonical IANA timezone database, no API juggling required.",
    "contact": {
      "name": "Data and APIs",
      "url": "https://dataandapis.com/contact"
    },
    "termsOfService": "https://dataandapis.com/terms-of-service",
    "license": {
      "name": "Data and APIs Terms of Service",
      "url": "https://dataandapis.com/terms-of-service"
    },
    "x-logo": {
      "url": "https://dataandapis.com/images/timezone.webp"
    }
  },
  "externalDocs": {
    "description": "Documentation, live tester and pricing",
    "url": "https://dataandapis.com/apis/timezone-world-time"
  },
  "servers": [
    {
      "url": "https://api-timezone.dataandapis.com"
    }
  ],
  "tags": [
    {
      "name": "Utilities",
      "description": "Timezone & World Time API belongs to the Utilities category of the Data and APIs catalog."
    }
  ],
  "paths": {
    "/v1/time": {
      "get": {
        "operationId": "getCurrentTime",
        "summary": "Get Current Time",
        "description": "Get Current Time endpoint of the Timezone & World Time API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/timezone-world-time/get-current-time"
        },
        "parameters": [
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "America/New_York"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "timezone": "America/New_York",
                  "datetime": "2026-05-30T10:23:01-04:00",
                  "date": "2026-05-30",
                  "time": "10:23:01",
                  "day_of_week": "Saturday",
                  "utc_offset": "-04:00",
                  "utc_offset_minutes": -240,
                  "is_dst": true,
                  "unix_timestamp": 1748614981
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/time/{timezone}": {
      "get": {
        "operationId": "getTimeByTimezone",
        "summary": "Get Time By Timezone",
        "description": "Get Time By Timezone endpoint of the Timezone & World Time API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/timezone-world-time/get-time-by-timezone"
        },
        "parameters": [
          {
            "name": "timezone",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "America/New_York"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "timezone": "America/New_York",
                  "datetime": "2026-05-30T10:23:01-04:00",
                  "date": "2026-05-30",
                  "time": "10:23:01",
                  "day_of_week": "Saturday",
                  "utc_offset": "-04:00",
                  "utc_offset_minutes": -240,
                  "is_dst": true,
                  "unix_timestamp": 1748614981
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/timezones": {
      "get": {
        "operationId": "listTimezones",
        "summary": "List Timezones",
        "description": "List Timezones endpoint of the Timezone & World Time API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/timezone-world-time/list-timezones"
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "count": 418,
                  "timezones": [
                    "Africa/Abidjan",
                    "America/New_York",
                    "Asia/Tokyo"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Create a free key at https://dataandapis.com/sign-up. 500 tokens a month on the Free plan; this API costs 1 token per call."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}