Interface IncomingRequestCfPropertiesGeographicInformation

Geographic data about the request's origin.

interface IncomingRequestCfPropertiesGeographicInformation {
    city?: string;
    continent?: ContinentCode;
    country?: Iso3166Alpha2Code | "T1";
    isEUCountry?: "1";
    latitude?: string;
    longitude?: string;
    metroCode?: string;
    postalCode?: string;
    region?: string;
    regionCode?: string;
    timezone?: string;
}

Properties

city?: string

The city the request originated from

Example

"Austin"
continent?: ContinentCode

A two-letter code indicating the continent the request originated from.

Example

"AN"
country?: Iso3166Alpha2Code | "T1"

The ISO 3166-1 Alpha 2 country code the request originated from.

If your worker is configured to accept TOR connections, this may also be "T1", indicating a request that originated over TOR.

If Cloudflare is unable to determine where the request originated this property is omitted.

The country code "T1" is used for requests originating on TOR.

Example

"GB"
isEUCountry?: "1"

If present, this property indicates that the request originated in the EU

Example

"1"
latitude?: string

Latitude of the incoming request

Example

"30.27130"
longitude?: string

Longitude of the incoming request

Example

"-97.74260"
metroCode?: string

Metro code (DMA) of the incoming request

Example

"635"
postalCode?: string

Postal code of the incoming request

Example

"78701"
region?: string

If known, the ISO 3166-2 name for the first level region associated with the IP address of the incoming request

Example

"Texas"
regionCode?: string

If known, the ISO 3166-2 code for the first-level region associated with the IP address of the incoming request

Example

"TX"
timezone?: string

Timezone of the incoming request

Example

"America/Chicago"