---
title: "Geolocated City (mmcity)"
canonical: "https://docs.devo.com/space/latest/95196378/Geolocated%20City%20(mmcity)"
format: markdown
---
> Macro (toc)

> ⚠️ **Deprecated operation**
> ⚠️ 
> ⚠️ This operation is deprecated and no longer supported. You will still be able to use it and add it manually to your queries, but it won’t appear in the Devo operations menu anymore. [Contact us](mailto:support@devo.com) if you have any question.
> ⚠️ 
> ⚠️ You can use [Geolocated City with MaxMind GeoIP2 (mm2city)](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95196416) instead.

## Description

<span style="color: #282828">Geolocates an IPv4 address and returns the corresponding city name.</span>

- This operation returns data for public IP addresses. If an IP is private, it will return *null*.
- Use the [Geolocated City with MaxMind GeoIP2 (mm2city)](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95196416) operation if you want to get the cities corresponding to your IPv6 addresses (*ip6* data type).

## How does it work in the search window?

This operation needs only one argument:

| **Argument** | **Data type** |
| --- | --- |
| **Ip **<sup><span style="color: #ff0000">mandatory</span></sup> | *ip* |

The data type of the new column is *string*.

### Example

<span style="color: #000000">In the </span>`demo.ecommerce.data`<span style="color: #000000"> table, we want to get the cities </span>corresponding to the IP addresses in our *clientIpAddress* column, so we click **Create column** and select the** Geolocated City **operation. Select* clientIpAddress* as the argument and assign a name to the new column - let's call it *city*.

![image](media://b1289adb-0399-4714-b92e-e640e1f49063)

You will see the following result:

![image](media://73891cfd-6a52-4807-953f-70e251d2fa1e)

## How does it work in LINQ?

Use the operator `select`... `as`...  and add the** **operation syntax to create the new column. The syntax is as follows:

- `mmcity(ip)`

### <span style="color: #282828">Example</span>

<span style="color: #282828">Copy the following LINQ script and try the above example on the </span>`demo.ecommerce.data`<span style="color: #282828"> table. </span>

```
from demo.ecommerce.data
select mmcity(clientIpAddress) as city
```