# Location

Learn about the type that represents a geographic location.

A location describes the geographic area detected for the user, including details such as the continent, country, region, city, and coordinates.

## Properties

These are the available properties:

- `continent`: `string` (optional)

  The continent code where the location is situated. The possible values are:

  | Value | Description   |
  | ----- | ------------- |
  | `AF`  | Africa        |
  | `AN`  | Antarctica    |
  | `AS`  | Asia          |
  | `EU`  | Europe        |
  | `NA`  | North America |
  | `OC`  | Oceania       |
  | `SA`  | South America |

- `country`: `string` (optional)

  The country code following the [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) standard, in upper case.

  For example, "US" for United States.

- `region`: `object` (optional)

  The primary administrative division within the country, such as a state or province.

  - `name`: `string`

    The name of the region in English.

    For example, "California" or "New York".

  - `code`: `string` (optional)

    The code is based on the [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) standard or official codes whenever available, in upper case.

    For example, "CA" for California.

- `city`: `string` (optional)

  The incorporated city or town political entity.

  For example, "New York", "Mexico City" or "São Paulo".

- `district`: `string` (optional)

  The district, county, or department within the region.

  For example, "Los Angeles County" or "Greater London".

- `timeZone`: `string` (optional)

  The time zone name as specified in the [IANA Time Zone Database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).

  For example, "America/New\_York" or "America/Sao\_Paulo".

- `coordinates`: `object` (optional)

  The geographic coordinates of the location.

  - `latitude`: `number`

    The latitude of the location as a decimal.

    For example, `36.7783` or `-23.5475`.

  - `longitude`: `number`

    The longitude of the location as a decimal.

    For example, `119.4179` or `-46.63611`.

- `source`: `string`

  The sources of location information. The possible values are:

  | Value     | Description                                         |
  | --------- | --------------------------------------------------- |
  | `IP`      | Location inferred based on the IP address.          |
  | `GPS`     | Location inferred based on the GPS data.            |
  | `BROWSER` | Location inferred based on the browser information. |
  | `INPUT`   | Location provided by the application.               |
  | `UNKNOWN` | An unknown source.                                  |

- `currency`: `object` (optional)

  The official currency used in the location.

  - `name`: `string` (optional)

    The name of the currency in English.

    For example, "US Dollar" or "Real".

  - `code`: `string` (optional)

    The currency code following the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) standard, in upper case.

    For example, "USD" or "BRL".

- `phoneCode`: `string` (optional)

  The international dialing code for this location.

  For example, "+1" for the United States or Canada, or "+55" for Brazil.

- `population`: `number` (optional)

  The approximate population within the boundaries of the returned location.

  If the location refers to a city, this value reflects the city's population. If it refers to a broader area, such as a region, it reflects the population of that region.

- `postalCode`: `string` (optional)

  The postal or ZIP code associated with the location.

  The value follows a valid format (e.g., "90210", "SW1A 1AA", or "28430-000"), but may represent an approximate or example code for the region rather than an exact or specific address. In some areas, it may reflect the beginning of a postal range.

- `languages`: `Array<string>` (optional)

  A list of locale codes of the languages spoken in the location as specified in the [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) and [ISO 3166-1](https://en.m.wikipedia.org/wiki/ISO_3166-1).

  For example, \["en", "en-CA", "fr-CA"] indicates that English and French are spoken in Canada, with English being more prevalent.

- `tags`: `Array<string>` (optional)

  One or more tags describing the location, such as natural features or climate.

  For example, a lake in a warm, touristic area might include tags like "warm", "lake" and "tourism".

  Tags related to the type of place or area:

  | Tag           | Description                                                     |
  | ------------- | --------------------------------------------------------------- |
  | `urban`       | Related to cities or densely populated areas                    |
  | `residential` | Areas where housing and living spaces are concentrated          |
  | `rural`       | Countryside or sparsely populated regions outside urban centers |
  | `remote`      | Locations distant from major settlements or infrastructure      |
  | `park`        | Public or protected areas with greenery or open space           |
  | `island`      | Land surrounded by water on all sides                           |

  Tags denoting social roles, institutions, and public services:

  | Tag          | Description                                                           |
  | ------------ | --------------------------------------------------------------------- |
  | `government` | Locations related to public services, institutions, or administration |
  | `politics`   | Places associated with political activity or governance               |
  | `military`   | Locations used for defense, training, or armed service operations     |
  | `religion`   | Sites with religious or spiritual significance                        |
  | `education`  | Places where people study and learn                                   |

  Tags related to economic activity:

  | Tag           | Description                                             |
  | ------------- | ------------------------------------------------------- |
  | `business`    | Areas with commercial presence or economic activity     |
  | `industry`    | Zones involving manufacturing, logistics, or production |
  | `agriculture` | Areas with fields, pastures, or crops                   |

  Tags related to transportation, utilities, and built environments:

  | Tag         | Description                                                                 |
  | ----------- | --------------------------------------------------------------------------- |
  | `transport` | Locations supporting transit or logistics                                   |
  | `facility`  | Places built for specific purposes, often supporting operations or services |
  | `waterway`  | Navigable or managed water routes such as rivers or canals                  |
  | `airport`   | Locations related to aircraft takeoff and landing                           |
  | `road`      | Infrastructure for vehicular travel                                         |
  | `railway`   | Locations involving rail transport infrastructure                           |
  | `seaport`   | Ports where ships may dock, load, or unload goods or passengers             |

  Tags for areas commonly used for sports and outdoor activities:

  | Tag        | Description                                             |
  | ---------- | ------------------------------------------------------- |
  | `fishing`  | Areas where fishing or related activity may take place  |
  | `surfing`  | Coastal areas with waves that may support surfing       |
  | `swimming` | Areas where people may swim or engage with water safely |
  | `hiking`   | Outdoor spaces where hiking might occur                 |
  | `skiing`   | Areas where snow allows skiing or similar activities    |

  Tags highlighting cultural, recreational, or scenic appeal:

  | Tag             | Description                                               |
  | --------------- | --------------------------------------------------------- |
  | `entertainment` | Places that can offer cultural or recreational activities |
  | `scenery`       | Locations appreciated for their natural beauty or view    |
  | `landmark`      | Notable spots or features that help identify a place      |
  | `recreation`    | Areas intended for outdoor activities, sports, or leisure |
  | `tourism`       | Places people visit for culture, nature, or history       |

  Tags describing natural features and landscapes:

  | Tag        | Description                                                      |
  | ---------- | ---------------------------------------------------------------- |
  | `mountain` | Elevated terrain rising above surroundings                       |
  | `lake`     | Bodies of still water surrounded by land                         |
  | `river`    | Naturally flowing body of water that may lead to lakes or oceans |
  | `canyon`   | Natural formations shaped by erosion                             |
  | `desert`   | Dry regions with little rainfall or vegetation                   |
  | `ocean`    | Coastal or open-sea areas facing large saltwater bodies          |
  | `coast`    | Edges of land meeting a sea or ocean                             |
  | `beach`    | Shoreline with sand or pebbles, often near water bodies          |
  | `forest`   | Areas with dense tree cover                                      |

  Tags related to climate and weather conditions:

  | Tag     | Description                                           |
  | ------- | ----------------------------------------------------- |
  | `warm`  | Regions with generally tropical or temperate climates |
  | `cold`  | Regions characterized by low temperatures             |
  | `snowy` | Areas with frequent snow or icy conditions            |

## Payload examples

Below is a payload example for this event:

**Payload**

```json
{
  "continent": "NA",
  "country": "US",
  "region": {
    "name": "California",
    "code": "CA"
  },
  "city": "Los Angeles",
  "district": "Arts District",
  "timeZone": "America/Los_Angeles",
  "coordinates": {
    "latitude": 34.0549,
    "longitude": 118.2426
  },
  "currency": {
    "name": "US Dollar",
    "code": "USD"
  },
  "phoneCode": "+1",
  "population": 3879000,
  "postalCode": "90021",
  "languages": ["en-us"],
  "tags": ["city", "beach", "coastal"],
  "source": "IP"
}
```

## Explore

- [Analytics](/reference/analytics): Learn how to analyze your dashboards.
- [CQL](/explanation/audience/examples/geolocation): Learn how to create audiences based on the user's location.
