Options
All
  • Public
  • Public/Protected
  • All
Menu

Fastly Geolocation information about an IP address

Can be retrieved for the incoming request's client IP address using the {@linkcode ClientInfo#geo} accessor, and for arbitrary addresses using {@linkcode fastly.getGeolocationForIpAddress}.

Hierarchy

  • Geolocation

Index

Properties

area_code

area_code: number

The telephone area code associated with an IP address.

These are only available for IP addresses in the United States, its territories, and Canada.

as_name

as_name: string

The name of the organization associated with as_number.

For example, fastly is the value given for IP addresses under AS-54113.

as_number

as_number: number

Autonomous system (AS) number.

city

city: string

City or town name.

conn_speed

conn_speed: string

Connection speed.

conn_type

conn_type: string

Connection type.

continent

continent: string

Continent.

country_code

country_code: string

A two-character ISO 3166-1 country code for the country associated with an IP address.

The US country code is returned for IP addresses associated with overseas United States military bases.

These values include subdivisions that are assigned their own country codes in ISO 3166-1. For example, subdivisions NO-21 and NO-22 are presented with the country code SJ for Svalbard and the Jan Mayen Islands.

country_code3

country_code3: string

A three-character ISO 3166-1 alpha-3 country code for the country associated with the IP address.

The USA country code is returned for IP addresses associated with overseas United States military bases.

country_name

country_name: string

Country name.

This field is the ISO 3166-1 English short name for a country.

gmt_offset

gmt_offset: string

Time zone offset from Greenwich Mean Time (GMT) for city.

latitude

latitude: number

Latitude, in units of degrees from the equator.

Values range from -90.0 to +90.0 inclusive, and are based on the WGS 84 coordinate reference system.

longitude

longitude: number

Longitude, in units of degrees from the IERS Reference Meridian.

Values range from -180.0 to +180.0 inclusive, and are based on the WGS 84 coordinate reference system.

metro_code

metro_code: number

Metro code, representing designated market areas (DMAs) in the United States.

postal_code

postal_code: string

The postal code associated with the IP address.

These are available for some IP addresses in Australia, Canada, France, Germany, Italy, Spain, Switzerland, the United Kingdom, and the United States.

For Canadian postal codes, this is the first 3 characters. For the United Kingdom, this is the first 2-4 characters (outward code). For countries with alphanumeric postal codes, this field is a lowercase transliteration.

proxy_description

proxy_description: string

Client proxy description.

proxy_type

proxy_type: string

Client proxy type.

region

region: string

ISO 3166-2 country subdivision code.

For countries with multiple levels of subdivision (for example, nations within the United Kingdom), this variable gives the more specific subdivision.

This field can be None for countries that do not have ISO country subdivision codes. For example, None is given for IP addresses assigned to the Ă…land Islands (country code AX, illustrated below).

utc_offset

utc_offset: number

Time zone offset from coordinated universal time (UTC) for city.

Legend

  • Constructor
  • Property
  • Method
  • Accessor
  • Property
  • Method

Generated using TypeDoc