# Time Zones API
> Every IANA time zone with its coordinates and country, enriched in real time with the current UTC offset, abbreviation, DST status and local time (computed from the system ICU time-zone database — always up to date, no key). Look up a zone by name, list all zones for a country, search zones by name, or find the nearest IANA zones to any latitude/longitude. 418 zones across 247 countries/territories. Ideal for scheduling, calendars, logistics, geo apps and any feature that needs to map a place or coordinate to the right time zone and current local time.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/timezones-api/..."
```

## Pricing
- **Free** (Free) — 8,000 calls/Mo, 3 req/s
- **Starter** ($6/Mo) — 80,000 calls/Mo, 8 req/s
- **Pro** ($19/Mo) — 450,000 calls/Mo, 20 req/s
- **Mega** ($47/Mo) — 2,000,000 calls/Mo, 50 req/s

## Endpoints

### Zones

#### `GET /v1/country` — All zones for a country

**Parameters:**
- `code` (query, required, string) — 2-letter ISO country code Example: `US`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/timezones-api/v1/country?code=US"
```

**Response:**
```json
{
    "data": {
        "count": 29,
        "zones": [
            {
                "lat": 40.7142,
                "long": -73.9936,
                "name": "America/New_York",
                "is_dst": true,
                "comments": "Eastern (most areas)",
                "countries": [
                    "US"
                ],
                "local_time": "2026-06-08T14:25:13",
                "utc_offset": "-04:00",
                "abbreviation": "EDT",
                "observes_dst": true,
                "offset_minutes": -240
            },
            {
                "lat": 42.3314,
                "long": -82.9542,
                "name": "America/Detroit",
                "is_dst": true,
                "comments": "Eastern - MI (most areas)",
                "countries": [
                    "US"
                ],
                "local_time": "2026-06-08T14:25:13",
                "utc_offset": "-04:00",
                "abbreviation": "EDT",
                "observes_dst": true,
                "offset_minutes": -240
            },
            {
                "lat": 38.2542,
                "long": -84.2406,
                "name": "America/Kentucky/Louisville",
                "is_dst": true,
                "comments": "Eastern - KY (Louisville area)",
                "countries": [
                    "US"
                ],
                "local_time": "2026-06-08T14:25:13",
                "utc_offset": "-04:00",
                "abbreviation
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/search` — Search zones by name

**Parameters:**
- `q` (query, required, string) — Substring (min 2 chars) Example: `berlin`
- `limit` (query, optional, string) — Max results (1-100, default 25) Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/timezones-api/v1/search?q=berlin&limit=25"
```

**Response:**
```json
{
    "data": {
        "count": 1,
        "query": "berlin",
        "total": 1,
        "zones": [
            {
                "lat": 52.5,
                "long": 13.3667,
                "name": "Europe/Berlin",
                "is_dst": true,
                "comments": "most of Germany",
                "countries": [
                    "DE",
                    "DK",
                    "NO",
                    "SE",
                    "SJ"
                ],
                "local_time": "2026-06-08T20:25:13",
                "utc_offset": "+02:00",
                "abbreviation": "GMT+2",
                "observes_dst": true,
                "offset_minutes": 120
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-08T18:25:13.905Z",
        "request_id": "64fb71af-04ac-4255-8855-47890da1c731"
    },
    "status": "ok",
    "message": "Search results retrieved successfully",
    "success": true
}
```

#### `GET /v1/zone` — Zone detail with current offset/DST/local time

**Parameters:**
- `name` (query, required, string) — IANA time-zone name Example: `Asia/Tokyo`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/timezones-api/v1/zone?name=Asia%2FTokyo"
```

**Response:**
```json
{
    "data": {
        "zone": {
            "lat": 35.6544,
            "long": 139.7447,
            "name": "Asia/Tokyo",
            "is_dst": false,
            "comments": "Eyre Bird Observatory",
            "countries": [
                "JP",
                "AU"
            ],
            "local_time": "2026-06-09T03:25:14",
            "utc_offset": "+09:00",
            "abbreviation": "GMT+9",
            "observes_dst": false,
            "offset_minutes": 540
        }
    },
    "meta": {
        "timestamp": "2026-06-08T18:25:14.024Z",
        "request_id": "56aac631-1d40-439a-87f9-59997eba2add"
    },
    "status": "ok",
    "message": "Zone retrieved successfully",
    "success": true
}
```

### Geo

#### `GET /v1/nearby` — Nearest IANA zones to a coordinate

**Parameters:**
- `lat` (query, required, string) — Latitude (-90..90) Example: `48.85`
- `lon` (query, required, string) — Longitude (-180..180) Example: `2.35`
- `limit` (query, optional, string) — Max results (1-25, default 5) Example: `5`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/timezones-api/v1/nearby?lat=48.85&lon=2.35&limit=5"
```

**Response:**
```json
{
    "data": {
        "count": 5,
        "query": {
            "lat": 48.85,
            "lon": 2.35
        },
        "zones": [
            {
                "lat": 48.8667,
                "long": 2.3333,
                "name": "Europe/Paris",
                "is_dst": true,
                "comments": null,
                "countries": [
                    "FR",
                    "MC"
                ],
                "local_time": "2026-06-08T20:25:14",
                "utc_offset": "+02:00",
                "distance_km": 2.2,
                "abbreviation": "GMT+2",
                "observes_dst": true,
                "offset_minutes": 120
            },
            {
                "lat": 50.8333,
                "long": 4.3333,
                "name": "Europe/Brussels",
                "is_dst": true,
                "comments": null,
                "countries": [
                    "BE",
                    "LU",
                    "NL"
                ],
                "local_time": "2026-06-08T20:25:14",
                "utc_offset": "+02:00",
                "distance_km": 262.4,
                "abbreviation": "GMT+2",
                "observes_dst": true,
                "offset_minutes": 120
            },
            {
                "lat": 49.4547,
                "long": -1.4639,
                "name": "Europe/Guernsey",
                "is_dst": true,
                "comments": null,
                "countries": [
                    "GG
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Spec & dataset stats

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/timezones-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "service": "timezones-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/zone": "Zone detail incl. current offset/DST/local time (name=, e.g. Asia/Tokyo).",
            "GET /v1/nearby": "Nearest IANA zones to a coordinate (lat=, lon=, limit=).",
            "GET /v1/search": "Search zones by name (q=, min 2 chars).",
            "GET /v1/country": "All zones for an ISO country code (code=, e.g. US)."
        },
        "description": "Every IANA time zone with coordinates, country, and the LIVE UTC offset, abbreviation, DST status and local time (computed from the system ICU tz database). Look up a zone, list a country's zones, search by name, or find the nearest zones to a coordinate. No key.",
        "total_zones": 418,
        "total_countries": 247
    },
    "meta": {
        "timestamp": "2026-06-08T18:25:14.235Z",
        "request_id": "799e82ea-17fd-4a7b-a9a9-de3af613554b"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/timezones-api
OpenAPI spec: https://www.oanor.com/api/timezones-api/openapi.json
