Geo.city

The city, as a code from the United Nations Code for Trade and Transport Locations (UN/LOCODE). Present since OpenRTB 2.0.

CurrentstringOptionalSince 2.0

Field facts

Path
device.geo.city, user.geo.city
Object
Geo
Type
string
Requirement
Optional
Added
OpenRTB 2.0
Spec section
3.2.19

How it is used

A UN/LOCODE is the two-letter country code followed by a three-character location code, such as "USNYC" for New York. Plain city names also show up in live traffic, so buyers often need to handle both. The 2.5 COPPA guidance recommends dropping city for child-directed traffic.

Example

Where the field sits in a payload, with everything else left out:

{
  "id": "req-1",
  "device": {
    "geo": {
      "city": "USNYC"
    }
  }
}

Version history

Added in OpenRTB 2.0, and present in the latest snapshot. The table shows how each version's spec text types the field.

VersionsType in the specRequiredDeprecated
2.0 to 2.1stringNoNo
2.2string an (h viNoNo
2.3 to 2.3.1stringNoNo
2.4stringNoNo
2.5 to 2.6-202606stringNoNo

Related fields

Other Geo fields