# Google Maps Timezone & Local Time Lookup (`dataspryva/google-maps-timezone-and-local-time-lookup`) Actor

Resolve the IANA timezone, current local time, UTC offset, and daylight-saving information for any coordinate. Accepts single or batch lat/lng inputs.

- **URL**: https://apify.com/dataspryva/google-maps-timezone-and-local-time-lookup.md
- **Developed by:** [Dataspryva](https://apify.com/dataspryva) (community)
- **Categories:** Automation, Developer tools, Travel
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Google Maps Timezone & Local Time Lookup

Find the IANA timezone and the current local time for any Google Maps place, address, Place ID or latitude/longitude pair. Submit one item or a batch and get a clean record per match: timezone name, local wall-clock time, UTC time, current UTC offset, weekday, Unix timestamp and daylight-saving detail, plus the matched place and a Google Maps link.

No Google API key, browser, login or cookie is required.

### What you can look up

| Mode | What you provide | What Google Maps resolves |
|---|---|---|
| **Coordinates** | One `{lat, lng}` pair or a batch of pairs | The nearest address or named place at that point and its timezone |
| **Place or address** | An address, landmark, business name or postcode | The best matching place, its address, coordinates and timezone |
| **Place ID** | A Google Place ID (starts with `ChIJ`) or a full Google Maps place URL | The exact place and its timezone |
| **Mixed batch** | Any combination of the three lists | Every filled list in one run |

When `mode` is omitted, every filled list is processed, so old coordinate-only tasks keep working unchanged.

### Inputs

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | select | – | `coordinates`, `place`, `placeId` or `mixed` |
| `location` | object | – | One coordinate: `{"lat": 40.7128, "lng": -74.006}` |
| `locations` | array | – | A batch of `{lat, lng}` coordinates |
| `address` | string | – | One address, landmark, business name or postcode |
| `addresses` | array | – | A batch of addresses or place names |
| `placeId` | string | – | One Google Place ID or Maps place URL |
| `placeIds` | array | – | A batch of Place IDs or Maps URLs |
| `language` | select | `en` | Language for returned place names and addresses (35 options) |
| `country` | select | – | Optional country bias for ambiguous place/address searches |

Latitude must be within `[-90, 90]` and longitude within `[-180, 180]`. The keys `latitude`/`longitude`/`lon` are accepted as synonyms for `lat`/`lng`. Duplicate coordinates, addresses and Place IDs are removed before lookup; blank values are skipped and invalid coordinates or Place IDs are reported in the run status.

#### Daily prefill

The default run resolves one New York coordinate and returns one record, which keeps the daily platform test cheap.

### Output fields

| Field | Description |
|---|---|
| `recordType` | Always `timezone` |
| `mode` | `coordinates`, `place` or `placeId` |
| `inputLocation` / `inputAddress` / `inputPlaceId` | The exact input that produced the row |
| `placeName` | Matched Google Maps place name |
| `formattedAddress` | Matched formatted address |
| `location` | Resolved `{lat, lng}` |
| `placeId` | Google Place ID, when Google returns one |
| `featureId` | Google feature identifier, when available |
| `countryCode` | ISO 3166-1 alpha-2 country code, when available |
| `categories` | Google Maps place categories, when available |
| `timezone` | IANA timezone identifier, e.g. `America/New_York` |
| `timezoneAbbreviation` | Current short code, e.g. `EST`, `EDT`, `JST`, `+0545` |
| `utcOffset` | Current offset formatted as `+HH:MM` / `-HH:MM` |
| `utcOffsetSeconds` | Current offset in seconds |
| `currentLocalTime` | Current wall-clock time at the place, ISO 8601 with offset |
| `currentUtcTime` | Current UTC time, ISO 8601 |
| `dayOfWeek` | Local weekday name |
| `unixTimestamp` | Unix timestamp in seconds |
| `isDaylightSavingTime` | `true` while daylight saving is in effect |
| `daylightSavings` | `inEffect`, `observed`, next transition, standard/DST offsets and the current DST interval when applicable |
| `distanceMeters` | For coordinates, distance from your point to the matched place |
| `googleMapsUrl` | Google Maps place link |
| `sourceUrl` | A Google Maps link for the matched place or search |
| `language` | Language used for returned names |
| `scrapedAt` | UTC timestamp of the lookup |

Fields the source does not provide for a particular item are left out of that record. No field is ever filled with `null`, an empty string or a guessed value.

### Examples

#### One coordinate

```json
{
  "mode": "coordinates",
  "location": {"lat": 40.7128, "lng": -74.006}
}
```

#### A worldwide coordinate batch

```json
{
  "mode": "coordinates",
  "locations": [
    {"lat": 40.7128, "lng": -74.006},
    {"lat": 51.5074, "lng": -0.1278},
    {"lat": 35.6762, "lng": 139.6503},
    {"lat": -33.8688, "lng": 151.2093}
  ]
}
```

#### Addresses

```json
{
  "mode": "place",
  "addresses": [
    "Eiffel Tower, Paris",
    "1600 Amphitheatre Parkway, Mountain View, CA",
    "Tokyo Station"
  ]
}
```

#### Place IDs or Maps URLs

```json
{
  "mode": "placeId",
  "placeIds": [
    "ChIJrbS_8-Fv5kcRzSjPvnUT03s",
    "https://www.google.com/maps/place/?q=place_id:ChIJmQJIxlVYwokRLgeuocVOGVU"
  ]
}
```

#### Mixed batch

```json
{
  "addresses": ["Burj Khalifa, Dubai"],
  "locations": [{"lat": 48.8584, "lng": 2.2945}],
  "placeIds": ["ChIJmQJIxlVYwokRLgeuocVOGVU"]
}
```

### Use cases

- **Normalise business hours** — convert local opening hours from a places dataset into UTC ranges
- **Schedule across regions** — send notifications only during local business hours
- **Enrich geocoded data** — attach a timezone and current local time to addresses or coordinates
- **Travel and logistics** — check the local time and DST state at a destination before planning a call or delivery
- **Audit and compliance** — stamp events with the correct local time and DST flag for the location where they happened

### FAQ

**Does this need a Google Maps API key?**
No. It reads Google Maps' public place and timezone information, so there is no key, login or cookie to configure.

**Why is the timezone sometimes a different city from the coordinate?**
Google Maps resolves the nearest place that belongs to a timezone. Near a border the nearest address can sit on the other side, and Google's own boundary data decides the zone. The actor reports Google's answer and does not infer a zone from longitude.

**Why do some coordinates return no record?**
Points in the open ocean or in unclaimed areas may not resolve to a place with a timezone. Those inputs are named in the run status instead of receiving a guessed zone.

**How is the local time calculated?**
Google Maps supplies the IANA timezone identifier. The current local time, offset and daylight-saving state are then calculated from the bundled IANA timezone database at lookup time.

**Are fractional offsets supported?**
Yes. Nepal (`+05:45`), Chatham Islands (`+12:45`), Newfoundland (`-03:30`) and other fractional zones are preserved exactly.

**Does DST work in both hemispheres?**
Yes. Southern-hemisphere zones such as `Australia/Sydney` and `Pacific/Chatham` report DST correctly, including their opposite-season transition dates.

**Can I resolve a large batch?**
Yes. Lists accept many items and are processed concurrently. For very large batches, start with a small sample to confirm the output shape fits your pipeline.

**Does this return the country or address of a coordinate?**
Yes, when Google Maps resolves one. The matched place name, formatted address, coordinates and country code are included alongside the timezone fields.

**Is this affiliated with Google?**
No. This actor is not affiliated with or endorsed by Google.

### Limits

- A timezone requires a resolved place. Open-ocean and unmapped coordinates can return no timezone.
- Timezone boundaries follow Google Maps' own place data; this actor does not maintain a separate boundary map.
- Google Maps place names and addresses follow the selected `language`, while the timezone identifier is always IANA English.

# Actor input Schema

## `mode` (type: `string`):

Coordinates resolves latitude/longitude pairs. Place looks up an address, landmark or business name. Place ID resolves a Google Place ID or Maps URL. Mixed processes every filled list in one run.

## `location` (type: `object`):

One coordinate as {"lat": 40.7128, "lng": -74.006}. Decimal degrees, WGS84.

## `locations` (type: `array`):

A list of coordinates, each {"lat": 40.7128, "lng": -74.006}.

## `address` (type: `string`):

One address, landmark, business name or postcode. Example: Eiffel Tower, Paris.

## `addresses` (type: `array`):

One address, landmark, business name or postcode per line.

## `placeId` (type: `string`):

One Google Place ID (starts with ChIJ) or a full Google Maps place URL.

## `placeIds` (type: `array`):

One Google Place ID or Google Maps place URL per line.

## `language` (type: `string`):

Language Google Maps uses for returned place names, addresses and country names. It does not translate the query itself.

## `country` (type: `string`):

Optional ISO 3166-1 alpha-2 country code. The country name is added to place and address queries so an ambiguous search resolves in that country first. Leave empty for no bias. Coordinates are unaffected.

## Actor input object example

```json
{
  "mode": "coordinates",
  "location": {
    "lat": 40.7128,
    "lng": -74.006
  },
  "language": "en",
  "country": ""
}
```

# Actor output Schema

## `timezones` (type: `string`):

Dataset containing all resolved timezone records.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mode": "coordinates",
    "location": {
        "lat": 40.7128,
        "lng": -74.006
    },
    "language": "en"
};

// Run the Actor and wait for it to finish
const run = await client.actor("dataspryva/google-maps-timezone-and-local-time-lookup").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mode": "coordinates",
    "location": {
        "lat": 40.7128,
        "lng": -74.006,
    },
    "language": "en",
}

# Run the Actor and wait for it to finish
run = client.actor("dataspryva/google-maps-timezone-and-local-time-lookup").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "coordinates",
  "location": {
    "lat": 40.7128,
    "lng": -74.006
  },
  "language": "en"
}' |
apify call dataspryva/google-maps-timezone-and-local-time-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dataspryva/google-maps-timezone-and-local-time-lookup"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/3gGc1bBnFZySrtNrc/builds/xJteA5XTOmDKdewKf/openapi.json
