Skip to main content
When you interact with our SDK or API, the geolocation data for an IP address is returned as a structured object containing details like country, region, city, coordinates, and similar information. The structure below represents the response format:
type IpTypes = 'ipv4' | 'ipv6'

interface Ip {
    ip: string | null
    type: IpTypes | null
    is_eu: boolean | null
    continent: {
        name: string | null
        code: string | null
        country: {
            name: string | null
            code: string | null
            phone_code: string | null
            capital: string | null
            tld: string | null
            city: {
                name: string | null
                latitude: number | null
                longitude: number | null
                postal_code: string | null
                timezone: {
                    name: string | null
                    time_now: string | null
                }
            }
            flag: {
                img: string | null
                emoji: string | null
                emoji_unicode: string | null
            }
            currency: {
                name: string | null
                code: string | null
                symbol: string | null
            }
        }
    }
    asn: {
        number: number | null
        name: string | null
    }
    completion_time: {
        miliseconds: number | null
        seconds: number | null
    }
}