Location
Explore what information is available for locations.
This type represents specific geographic positions or areas, such as a point on a map or a region, typically indicating temporary locations like where a user is accessing a website from.
All properties in this type are optional and represent different levels of accuracy, which may vary depending on the source of information — such as GPS or IP — and the user's privacy settings.
Generally, if more specific properties are available, less specific properties are likely to be available as well. For example, the city is usually unavailable when the state is unknown.
Some countries use regions instead of states for administrative divisions, so we included both to let you choose the best option for your scenario.
Properties
These are the available properties:
- continent(optional)
The name of the continent in English. For example, "North America" or "South America".
- continentCode(optional)
The continent as a two-letter code. For example, "na" for North America.
- country(optional)
Name of the country in English. For example, "United States" or "Brazil".
- countryCode(optional)
The country code following the ISO 3166-1 alpha-2 standard, always in lower case. For example, "us" for United States.
- region(optional)
The name of the region in its native language. For example, "California" or "Rio de Janeiro".
- regionCode(optional)
The code is based on the ISO 3166-2 standard or official codes whenever available, always in lowercase. For example, "ca" for California.
- state(optional)
An alias for the region property.
- stateCode(optional)
An alias for the regionCode property.
- city(optional)
The name of the city in its native language. For example, "New York" or "São Paulo".
- district(optional)
The name of the district in its native language. For example, "Manhattan" for New York City or "Zona Sul" for São Paulo City.
- timeZone(optional)
The time zone name as specified in the IANA Time Zone Database. For example, "America/New_York" or "America/Sao_Paulo".
Continent
These are the possible values and what they represent:
Code | Continent |
---|---|
af | Africa |
an | Antarctica |
as | Asia |
eu | Europe |
na | North America |
oc | Oceania |
sa | South America |