Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ip2geo.dev/llms.txt

Use this file to discover all available pages before exploring further.

The SELECT constants allow you to retrieve only the data fields you need instead of the full conversion, reducing payload size and improving performance. They work with both the SDK’s and the API.
import { GetConversion, SELECT } from '@ip2geo/sdk'

const { data } = await GetConversion({
    conversionId: 'your-conversion-uuid',
    select: [
        SELECT.COUNTRY_NAME,
        SELECT.COUNTRY_CODE,
        SELECT.ASN_NAME
    ]
})
The full list of SELECT constant you can import and use when retrieving data:
ConstantValue
SELECT.IP'ip'
SELECT.TYPE'type'
SELECT.IS_EU'is_eu'
SELECT.CONTINENT_NAME'continent.name'
SELECT.CONTINENT_CODE'continent.code'
SELECT.CONTINENT_GEONAME_ID'continent.geoname_id'
SELECT.COUNTRY_NAME'continent.country.name'
SELECT.COUNTRY_CODE'continent.country.code'
SELECT.COUNTRY_GEONAME_ID'continent.country.geoname_id'
SELECT.COUNTRY_PHONE_CODE'continent.country.phone_code'
SELECT.COUNTRY_CAPITAL'continent.country.capital'
SELECT.COUNTRY_TLD'continent.country.tld'
SELECT.SUBDIVISION_NAME'continent.country.subdivision.name'
SELECT.SUBDIVISION_CODE'continent.country.subdivision.code'
SELECT.CITY_NAME'continent.country.city.name'
SELECT.CITY_GEONAME_ID'continent.country.city.geoname_id'
SELECT.CITY_LATITUDE'continent.country.city.latitude'
SELECT.CITY_LONGITUDE'continent.country.city.longitude'
SELECT.CITY_ACCURACY_RADIUS'continent.country.city.accuracy_radius'
SELECT.CITY_METRO_CODE'continent.country.city.metro_code'
SELECT.CITY_POSTAL_CODE'continent.country.city.postal_code'
SELECT.TIMEZONE_NAME'continent.country.city.timezone.name'
SELECT.TIMEZONE_TIME_NOW'continent.country.city.timezone.time_now'
SELECT.FLAG_IMG'continent.country.flag.img'
SELECT.FLAG_EMOJI'continent.country.flag.emoji'
SELECT.FLAG_EMOJI_UNICODE'continent.country.flag.emoji_unicode'
SELECT.CURRENCY_NAME'continent.country.currency.name'
SELECT.CURRENCY_CODE'continent.country.currency.code'
SELECT.CURRENCY_SYMBOL'continent.country.currency.symbol'
SELECT.REGISTERED_COUNTRY_NAME'registered_country.name'
SELECT.REGISTERED_COUNTRY_CODE'registered_country.code'
SELECT.REGISTERED_COUNTRY_GEONAME_ID'registered_country.geoname_id'
SELECT.ASN_NUMBER'asn.number'
SELECT.ASN_NAME'asn.name'
SELECT.COMPLETION_TIME_MILISECONDS'completion_time.miliseconds'
SELECT.COMPLETION_TIME_SECONDS'completion_time.seconds'

Raw Values

In case you are using the API instead of our SDKs to call it, here are the raw constants you can use for reference.
const SELECT = {
    IP: 'ip',
    TYPE: 'type',
    IS_EU: 'is_eu',
    CONTINENT_NAME: 'continent.name',
    CONTINENT_CODE: 'continent.code',
    CONTINENT_GEONAME_ID: 'continent.geoname_id',
    COUNTRY_NAME: 'continent.country.name',
    COUNTRY_CODE: 'continent.country.code',
    COUNTRY_GEONAME_ID: 'continent.country.geoname_id',
    COUNTRY_PHONE_CODE: 'continent.country.phone_code',
    COUNTRY_CAPITAL: 'continent.country.capital',
    COUNTRY_TLD: 'continent.country.tld',
    SUBDIVISION_NAME: 'continent.country.subdivision.name',
    SUBDIVISION_CODE: 'continent.country.subdivision.code',
    CITY_NAME: 'continent.country.city.name',
    CITY_GEONAME_ID: 'continent.country.city.geoname_id',
    CITY_LATITUDE: 'continent.country.city.latitude',
    CITY_LONGITUDE: 'continent.country.city.longitude',
    CITY_ACCURACY_RADIUS: 'continent.country.city.accuracy_radius',
    CITY_METRO_CODE: 'continent.country.city.metro_code',
    CITY_POSTAL_CODE: 'continent.country.city.postal_code',
    TIMEZONE_NAME: 'continent.country.city.timezone.name',
    TIMEZONE_TIME_NOW: 'continent.country.city.timezone.time_now',
    FLAG_IMG: 'continent.country.flag.img',
    FLAG_EMOJI: 'continent.country.flag.emoji',
    FLAG_EMOJI_UNICODE: 'continent.country.flag.emoji_unicode',
    CURRENCY_NAME: 'continent.country.currency.name',
    CURRENCY_CODE: 'continent.country.currency.code',
    CURRENCY_SYMBOL: 'continent.country.currency.symbol',
    REGISTERED_COUNTRY_NAME: 'registered_country.name',
    REGISTERED_COUNTRY_CODE: 'registered_country.code',
    REGISTERED_COUNTRY_GEONAME_ID: 'registered_country.geoname_id',
    ASN_NUMBER: 'asn.number',
    ASN_NAME: 'asn.name',
    COMPLETION_TIME_MILISECONDS: 'completion_time.miliseconds',
    COMPLETION_TIME_SECONDS: 'completion_time.seconds'
}