Source: https://developers.woosmap.com/products/geolocation-api/migration/

> For clean Markdown of any page, append `.md` to the page URL.

> For a complete documentation index, see https://developers.woosmap.com/llms.txt

# Migrating from Google Geolocation & Timezone



Unlike the other migrations, this one isn't a namespace swap — the approach is different.

Google requires the client to collect cell tower or WiFi data and POST it. Woosmap locates users by
**IP address** with a simple GET — no device data touches your servers.

IP geolocation resolves to city level — enough for store preference, content localization, currency
selection, or timezone detection. No personal device data is collected, so no GDPR concerns around
device identifiers.

## Geolocation

```bash
# Google Maps (POST with device data)
curl -X POST "https://www.googleapis.com/geolocation/v1/geolocate?key=YOUR_GOOGLE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"wifiAccessPoints": [{"macAddress": "00:25:9c:cf:1c:ac", "signalStrength": -65}]}'

# Woosmap — client-side (IP detected automatically)
curl "https://api.woosmap.com/geolocation/position/?key=YOUR_PUBLIC_KEY"

# Woosmap — server-side (explicit IP)
curl "https://api.woosmap.com/geolocation/position/?ip_address=173.79.254.254&private_key=YOUR_PRIVATE_KEY"
```

| Aspect         | Google                               | Woosmap                                    |
| :------------- | :----------------------------------- | :----------------------------------------- |
| Method         | POST with device data                | GET, no body                               |
| Data collected | Cell tower / WiFi MAC addresses      | IP address only                            |
| Accuracy       | Street-level (with good device data) | City-level                                 |
| Response       | Coordinates + accuracy radius        | Coordinates, city, country, timezone, etc. |
| Privacy        | Collects device identifiers          | No personal device data                    |

A nice side effect: Woosmap returns city, region, postal code, country **and timezone** in that single call.
With Google you'd chain three APIs (Geolocation + Reverse Geocoding + Time Zone) to get the same data.

## Timezone

If you need timezone for arbitrary coordinates (not the current user), the two APIs are almost identical:

```bash
# Google Maps
curl "https://maps.googleapis.com/maps/api/timezone/json?location=48.8566,2.3522&timestamp=1708440298&key=YOUR_GOOGLE_KEY"

# Woosmap
curl "https://api.woosmap.com/geolocation/timezone/?location=48.8566,2.3522&timestamp=1708440298&key=YOUR_PUBLIC_KEY"
```

Same data, just `snake_case` instead of `camelCase`:

| Field            | Google Maps    | Woosmap         |
| :--------------- | :------------- | :-------------- |
| Timezone ID      | `timeZoneId`   | `timezone_id`   |
| Timezone name    | `timeZoneName` | `timezone_name` |
| UTC offset (sec) | `rawOffset`    | `raw_offset`    |
| DST offset (sec) | `dstOffset`    | `dst_offset`    |

> ⚠️ `timestamp` is optional in Woosmap (defaults to now) but required in Google. And if you're already calling
> the geolocation endpoint, timezone comes included — you may not need this endpoint at all.
