# World Time API

> World Time looks up the current local time, date, and timezone for any city, or for any latitude and longitude. Search by city name to get matching locations with country codes, IANA timezone identifiers, UTC offsets, and formatted times in 12-hour, 24-hour, and ISO 8601 formats.

**Endpoint:** `GET https://api.apiverve.com/v1/worldtime`  
**Category:** Data Lookup  
**Cost:** 2 credits per call  
**Canonical page:** https://apiverve.com/marketplace/worldtime

## Overview

A world clock and time zone API. World Time works by using the timezone database to determine the current time in any city. Based on the current time, it returns the current time, date, and more for any given city in the world

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/worldtime?city=San%20Francisco" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `city` | string | Yes | The city name for which you want to get the current time (e.g., New York). Add a state, province or country after a comma to narrow it (e.g., Portland, Maine or London, UK). Matches are ordered with the best-known city first. Smaller cities (Plano, TX; Noida) and common former or local names (Bangalore, Bombay, Saigon, NYC, Munchen) are found too |

## Response fields

- `search` — string · The city name that was searched for, or lat,lon for a coordinates lookup
  - `foundCities.0.city` — string · City name as found in database
  - `foundCities.0.city_ascii` — string · City name in ASCII format
  - `foundCities.0.country` — string · Full country name for the city
  - `foundCities.0.iso2` — string · ISO 3166-1 alpha-2 country code
  - `foundCities.0.iso3` — string · ISO 3166-1 alpha-3 country code
  - `foundCities.0.province` — string · Province or state name for the city
  - `foundCities.0.timezone` — string · IANA timezone identifier for the city
  - `foundCities.0.time` — string · Current time in short format (HH:MM)
  - `foundCities.0.time24` — string · Current time in 24-hour format (HH:MM:SS)
  - `foundCities.0.time12` — string · Current time in 12-hour format with AM/PM
  - `foundCities.0.date` — string · Current date in ISO format (YYYY-MM-DD)
  - `foundCities.0.day` — string · Day of week name (e.g., Monday, Tuesday) · (premium)
  - `foundCities.0.month` — string · Month name (e.g., January, February) · (premium)
  - `foundCities.0.year` — string · Current year as string · (premium)
  - `foundCities.0.unix` — string · Unix timestamp (seconds since epoch) · (premium)
  - `foundCities.0.dst` — boolean · Whether daylight saving time is active · (premium)
  - `foundCities.0.dst_start` — object · Start of the current DST period, or the next one if DST is not in effect (YYYY-MM-DD HH:MM:SS, local time); null when the zone has no DST · (premium)
  - `foundCities.0.dst_end` — object · End of the current DST period, or of the next one if DST is not in effect (YYYY-MM-DD HH:MM:SS, local time); null when the zone has no DST · (premium)
  - `foundCities.0.dst_name` — string · DST timezone abbreviation or offset · (premium)
  - `foundCities.0.utc_offset` — string · Current offset from UTC as +HH:MM or -HH:MM, including any daylight saving shift
  - `foundCities.0.datetime` — string · Current local date and time in ISO 8601 with the UTC offset (e.g., 2026-10-26T13:50:42-07:00)
  - `foundCities.0.utc_datetime` — string · The same instant in UTC, ISO 8601 (e.g., 2026-10-26T20:50:42Z) · (premium)
  - `foundCities.0.day_of_year` — number · Local day of the year, 1 to 366 · (premium)
  - `foundCities.0.week_number` — number · ISO 8601 week number of the local date · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "search": "San Francisco",
    "foundCities": [
      {
        "city": "San Francisco",
        "city_ascii": "San Francisco",
        "country": "Argentina",
        "iso2": "AR",
        "iso3": "ARG",
        "province": "Córdoba",
        "timezone": "America/Argentina/Cordoba",
        "time": "17:51",
        "time24": "17:51:13",
        "time12": "05:51:13 PM",
        "date": "2026-10-26",
        "day": "Monday",
        "month": "October",
        "year": "2026",
        "unix": "1793047873",
        "dst": false,
        "dst_start": null,
        "dst_end": null,
        "dst_name": "-03",
        "utc_offset": "-03:00",
        "datetime": "2026-10-26T17:51:13-03:00",
        "utc_datetime": "2026-10-26T20:51:13Z",
        "day_of_year": 299,
        "week_number": 44
      },
      {
        "city": "San Francisco",
        "city_ascii": "San Francisco",
        "country": "United States of America",
        "iso2": "US",
        "iso3": "USA",
        "province": "California",
        "state_ansi": "CA",
        "timezone": "America/Los_Angeles",
        "time": "13:51",
        "time24": "13:51:13",
        "time12": "01:51:13 PM",
        "date": "2026-10-26",
        "day": "Monday",
        "month": "October",
        "year": "2026",
        "unix": "1793047873",
        "dst": true,
        "dst_start": "2026-03-08 03:00:00",
        "dst_end": "2026-11-01 01:00:00",
        "dst_name": "PDT",
        "utc_offset": "-07:00",
        "datetime": "2026-10-26T13:51:13-07:00",
        "utc_datetime": "2026-10-26T20:51:13Z",
        "day_of_year": 299,
        "week_number": 44
      }
    ]
  }
}
```

## Use cases

- **Time Conversion** — Convert time between different time zones by using the World Time API. Get the current time in any city and convert it to another time zone
- **Time Synchronization** — Synchronize time across different devices and systems by using the World Time API. Get the current time in any city and use it to set the time on your devices
- **Scheduling Software** — Integrate the World Time API into scheduling software to display the current time in different cities. Use the API to show the current time in various time zones
- **Travel Planning** — Plan travel itineraries by using the World Time API to determine the current time in different cities. Use the API to schedule flights, meetings, and events across different time zones

## SDKs

- **npm** — `npm install @apiverve/worldtime` (https://www.npmjs.com/package/@apiverve/worldtime)
- **PyPI** — `pip install apiverve-worldtime` (https://pypi.org/project/apiverve-worldtime/)
- **NuGet** — `dotnet add package APIVerve.API.WorldTime` (https://www.nuget.org/packages/APIVerve.API.WorldTime)
- **Source** — https://github.com/apiverve/worldtime-api

## More

- Full reference: https://docs.apiverve.com/ref/worldtime
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
