Timezone API
The Timezone API returns the time zone at any latitude and longitude, together with the exact UTC offset and local time at a given moment. Daylight saving time is already applied, and the response tells you when the next offset change happens.
This API can be used for:
- Showing local time - display the current time at a store, an office, or a user's location
- Scheduling - convert appointments, deliveries, and departures between UTC and local time
- Reminders and notifications - send messages at the right local hour
- Data processing - add a time zone and offset to stored coordinates and timestamps
The API has two endpoints: one returns the time zone and offset at an instant, the other lists all offset changes, such as daylight saving time starts and ends, within a period.
Authentication and API key
To use the Timezone API, you'll need an API key. You can register and get a Timezone API Key for free without a credit card.
We offer a free plan, so there's no need to stress about cost. Start for free and upgrade to a paid plan when the needs of your project increase. For more information on our plans, visit the Pricing page.
How to get the Geoapify API key
- Register on the Geoapify MyProjects page.
- Create a new project.
- Go to the API Keys section. One API key is generated automatically. You can generate multiple API keys per project if required.
- Optionally, you can protect the API key by listing allowed IP addresses, HTTP referrers, origins, and CORS.
API reference
The Timezone API operates through HTTP GET requests. It has two endpoints:
/v1/timezonereturns the time zone, UTC offset, and local time at coordinates for one instant./v1/timezone/transitionslists the offset changes at coordinates within a period.
Times are resolved with the IANA time zone database. Supported instants are from 2025-01-01T00:00:00Z through 2031-12-31T23:59:59Z (UTC).
Authentication
Pass your API key as the apiKey URL parameter or in the x-api-key request header. Use the header for server-to-server requests, because URLs can be logged.
Get the time zone at an instant
HTTP GET https://api.geoapify.com/v1/timezone?lat=LATITUDE&lon=LONGITUDE&apiKey=YOUR_API_KEY
Request URL parameters
| Name | Format | Description | Example |
|---|---|---|---|
| lat | number | Required. Latitude, from -90 to 90. |
lat=40.758 |
| lon | number | Required. Longitude, from -180 to 180. |
lon=-73.9855 |
| at | string | RFC 3339 timestamp with Z or an explicit offset. The default value is the current time. A timestamp without an offset is rejected. |
at=2027-01-15T14:00:00Z |
| apiKey | string | Your Geoapify API key. | apiKey=YOUR_API_KEY |
Here is a request example using cURL:
curl "https://api.geoapify.com/v1/timezone?lat=40.758&lon=-73.9855&at=2027-01-15T14:00:00Z&apiKey=YOUR_API_KEY"
Response object
| Name | Description |
|---|---|
| lat, lon | The requested coordinates |
| at | The instant the result applies to, in UTC |
| tzdb_version | Version of the IANA time zone database used, for example 2026e |
| timezones | Array of time zones at the coordinates. Usually it contains one item; at a disputed boundary, more than one time zone can be returned. |
| timezones[].name | IANA time zone name, for example America/New_York. Over open ocean, a nautical zone such as Etc/GMT+3 is returned; its sign is inverted by convention, so Etc/GMT+3 is -03:00. |
| timezones[].type | standard, daylightSaving, or other |
| timezones[].utc_offset | UTC offset at the instant, for example -05:00 |
| timezones[].offset_seconds | UTC offset in seconds, for example -18000 |
| timezones[].abbreviation | Time zone abbreviation, for example EST. Where no letter abbreviation is defined, the offset is used, for example +0545. |
| timezones[].local_time | Local date and time at the instant, with its offset |
| timezones[].next_transition | The next known offset change after the instant, as a transition object. null when no change is known within the supported date range, for example where daylight saving time is not observed. |
Transition object:
| Name | Description |
|---|---|
| at | Moment of the change, in UTC |
| before | State before the change: type, utc_offset, offset_seconds, and abbreviation |
| after | State after the change, with the same fields |
| offset_change_seconds | Difference between the new and the old offset, in seconds. Negative when clocks go back. Not always one hour; for example, on Lord Howe Island it is 30 minutes. |
| kind | daylight-start, daylight-end, offset-change, or designation-change |
Here is a response example:
{
"lat": 40.758,
"lon": -73.9855,
"at": "2027-01-15T14:00:00.000Z",
"tzdb_version": "2026e",
"timezones": [
{
"name": "America/New_York",
"type": "standard",
"utc_offset": "-05:00",
"offset_seconds": -18000,
"abbreviation": "EST",
"local_time": "2027-01-15T09:00:00.000-05:00",
"next_transition": {
"at": "2027-03-14T07:00:00.000Z",
"before": {
"type": "standard",
"utc_offset": "-05:00",
"offset_seconds": -18000,
"abbreviation": "EST"
},
"after": {
"type": "daylightSaving",
"utc_offset": "-04:00",
"offset_seconds": -14400,
"abbreviation": "EDT"
},
"offset_change_seconds": 3600,
"kind": "daylight-start"
}
}
]
}
List offset changes within a period
HTTP GET https://api.geoapify.com/v1/timezone/transitions?lat=LATITUDE&lon=LONGITUDE&from=START&to=END&apiKey=YOUR_API_KEY
Request URL parameters
| Name | Format | Description | Example |
|---|---|---|---|
| lat | number | Required. Latitude, from -90 to 90. |
lat=40.758 |
| lon | number | Required. Longitude, from -180 to 180. |
lon=-73.9855 |
| from | string | Required. Start of the period, inclusive. RFC 3339 timestamp with Z or an explicit offset. |
from=2027-01-01T00:00:00Z |
| to | string | Required. End of the period, exclusive. Must be later than from, at most 366 days after it, and not later than 2032-01-01T00:00:00Z. |
to=2028-01-01T00:00:00Z |
| apiKey | string | Your Geoapify API key. | apiKey=YOUR_API_KEY |
Here is a request example using cURL:
curl "https://api.geoapify.com/v1/timezone/transitions?lat=40.758&lon=-73.9855&from=2027-01-01T00:00:00Z&to=2028-01-01T00:00:00Z&apiKey=YOUR_API_KEY"
Response object
| Name | Description |
|---|---|
| lat, lon | The requested coordinates |
| from, to | The requested period, in UTC |
| tzdb_version | Version of the IANA time zone database used |
| timezones | Array of time zones at the coordinates |
| timezones[].name | IANA time zone name |
| timezones[].transitions | Array of transition objects in the period, in time order. Empty when the offset does not change in the period. |
Here is a response example:
{
"lat": 40.758,
"lon": -73.9855,
"from": "2027-01-01T00:00:00.000Z",
"to": "2028-01-01T00:00:00.000Z",
"tzdb_version": "2026e",
"timezones": [
{
"name": "America/New_York",
"transitions": [
{
"at": "2027-03-14T07:00:00.000Z",
"before": { "type": "standard", "utc_offset": "-05:00", "offset_seconds": -18000, "abbreviation": "EST" },
"after": { "type": "daylightSaving", "utc_offset": "-04:00", "offset_seconds": -14400, "abbreviation": "EDT" },
"offset_change_seconds": 3600,
"kind": "daylight-start"
},
{
"at": "2027-11-07T06:00:00.000Z",
"before": { "type": "daylightSaving", "utc_offset": "-04:00", "offset_seconds": -14400, "abbreviation": "EDT" },
"after": { "type": "standard", "utc_offset": "-05:00", "offset_seconds": -18000, "abbreviation": "EST" },
"offset_change_seconds": -3600,
"kind": "daylight-end"
}
]
}
]
}
Response HTTP status codes
| Name | Description |
|---|---|
| 200 | The request was successful. |
| 400 | Invalid coordinates, timestamp, or period. The message field explains the problem, for example "lat" must be less than or equal to 90. |
| 401 | Authentication failed or the API key is invalid. |
| 429 | Too many requests - rate limit exceeded. |
| 500 | Internal server error. |
Time zone in Reverse Geocoding results
If you also need the address at the coordinates, the Reverse Geocoding API returns a timezone object with the IANA name and both the standard and daylight saving offsets. It does not tell which offset applies at a given moment; use the Timezone API for that.
Pricing
At Geoapify, we use a universal unit called a "credit" to calculate the cost of our API calls.
With our Timezone API, each call is priced at just 1 credit:
| API name | Cost in credits | Example |
|---|---|---|
| Timezone API | 1 request = 1 credit | 3 Timezone API requests cost 3 credits |
Both endpoints, /v1/timezone and /v1/timezone/transitions, cost 1 credit per request.
Our pricing plans are designed to cater to the needs of any company, and our Free plan includes 3,000 credits per day. To see our pricing plans and find the best option for your business, visit our pricing page.