Timezones

Retrieve information about IANA timezones, including UTC offsets and regional associations.

Standards Used

  • IANA TZDB
  • ISO 3166-1

Path Encoding#

IANA timezone IDs contain slashes (e.g., America/New_York), which is typically not URL-safe. Make sure you URL-encode these identifiers, otherwise our API will most likely return 404 Not Found.

The Timezone object#

FieldTypeRequiredDescription
countrystringNoPrimary country (alpha-2 code).
Example: US
idstringYesIANA timezone identifier.
Example: America/New_York
namestringYesHuman-readable name.
Example: Eastern Time
offsetstringYesUTC offset string (e.g., "-05:00").
Example: -05:00
offset_minutesinteger (int32)YesUTC offset in total minutes.
Example: -300

Endpoints#

Query Parameters

ParameterTypeRequiredDescription
pagequeryintegerNoPage number (1-indexed).
Example: 1
per_pagequeryintegerNoNumber of results per page (1-100).
Example: 20

Response

FieldTypeRequiredDescription
dataobject[]YesThe data items for this page.
paginationobjectYes Pagination metadata in response.
pageintegerYesCurrent page number.
Example: 1
per_pageintegerYesItems per page.
Example: 20
total_itemsintegerYesTotal number of items.
Example: 100
total_pagesintegerYesTotal number of pages.
Example: 5

Example Request

const response = await fetch(
  'https://worlddataapi.com/v1/timezones?page=1&per_page=20',
  {
    headers: {
      'X-API-Key': 'YOUR_API_KEY'
    }
  }
);

const data = await response.json();

Error Responses

StatusDescription
429Rate limit exceeded

Path Parameters

ParameterTypeRequiredDescription
identifierpathstringYesIANA timezone ID (e.g., 'America/New_York', 'Europe/London')

Response

FieldTypeRequiredDescription
countrystringNoPrimary country (alpha-2 code).
Example: US
idstringYesIANA timezone identifier.
Example: America/New_York
namestringYesHuman-readable name.
Example: Eastern Time
offsetstringYesUTC offset string (e.g., "-05:00").
Example: -05:00
offset_minutesinteger (int32)YesUTC offset in total minutes.
Example: -300

Example Request

const response = await fetch(
  'https://worlddataapi.com/v1/timezones/example',
  {
    headers: {
      'X-API-Key': 'YOUR_API_KEY'
    }
  }
);

const data = await response.json();

Error Responses

StatusDescription
404Timezone not found