example-data.com
Menu
Browse docs and collections

time-zones

time-zones

Page 2 of 3.

Overview

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/time-zones?limit=25"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/time-zones?limit=25"
);
const { data, meta } = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/time-zones.d.ts https://example-data.com/types/time-zones.d.ts
import type { TimeZone, ListEnvelope } from "./types/time-zones";

const res = await fetch(
  "https://example-data.com/api/v1/time-zones?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<TimeZone>;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/time-zones",
    params={"limit": 25},
)
data = res.json()

Response

{
  "data": [
    {
      "id": 25,
      "name": "Europe/Rome",
      "offsetMinutes": 60,
      "abbreviation": "CET",
      "countryAlpha2": "IT"
    },
    {
      "id": 26,
      "name": "Europe/Lisbon",
      "offsetMinutes": 0,
      "abbreviation": "WET",
      "countryAlpha2": "PT"
    },
    {
      "id": 27,
      "name": "Europe/Athens",
      "offsetMinutes": 120,
      "abbreviation": "EET",
      "countryAlpha2": "GR"
    }
  ],
  "meta": {
    "page": 2,
    "limit": 24,
    "total": 66,
    "totalPages": 3
  },
  "links": {
    "self": "/api/v1/time-zones?page=2&limit=24",
    "first": "/api/v1/time-zones?page=1&limit=24",
    "last": "/api/v1/time-zones?page=3&limit=24",
    "next": "/api/v1/time-zones?page=3&limit=24",
    "prev": "/api/v1/time-zones?page=1&limit=24"
  }
}