Table: ip2locationio_geolocation
Get location and other information about an IP address.
The ip2locationio_geolocation
table requires the ip
field to be specified in all queries, defining the IP address to lookup.
Examples
Info for a specific IP address
select country_code, country_name, region_name, city_namefrom ip2locationio_geolocationwhere ip = '8.8.8.8';
Nested info for specific IP address
select country_code, country ->> 'capital' as capital_city, country [ 'translation' ] as translationfrom ip2locationio_geolocationwhere ip = '8.8.8.8' and lang = 'es';
Schema for ip2locationio_geolocation
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
address_type | text | Anycast/Unicast/Multicast/Broadcast. | |
ads_category | text | Domain category code based on IAB Tech Lab Content Taxonomy. | |
ads_category_name | text | Domain category based on IAB Tech Lab Content Taxonomy. | |
area_code | text | Area code. | |
as | text | Autonomous System (AS). | |
asn | text | Autonomous System Number (ASN). | |
city | jsonb | City details. | |
city_name | text | City name. | |
continent | jsonb | Continent details. | |
country | jsonb | Country details. | |
country_code | text | ISO-3166 Country code. | |
country_name | text | Country name. | |
district | text | District name. | |
domain | text | Internet domain name. | |
elevation | bigint | Elevation above sea level in meters. | |
geotargeting | jsonb | Metro code. | |
idd_code | text | IDD code. | |
ip | inet | = | IP address to query. |
is_proxy | boolean | True if IP a proxy. | |
isp | text | Internet Service Provider (ISP). | |
lang | text | = | Translation language (only for Plus and Security plans). |
latitude | double precision | Latitude. | |
longitude | double precision | Longitude. | |
mcc | text | Mobile Country Codes (MCC) as defined in ITU E.212. | |
mnc | text | Mobile Network Code (MNC). | |
mobile_brand | text | Commercial brand associated with the mobile carrier. | |
net_speed | text | Internet connection type. | |
proxy | jsonb | Proxy details. | |
region | jsonb | Region details. | |
region_name | text | Region name. | |
time_zone | text | Time zone. | |
time_zone_info | jsonb | Time zone details. | |
usage_type | text | Usage type classification of ISP or company. | |
weather_station_code | text | Weather station code. | |
weather_station_name | text | Weather station name. | |
zip_code | text | Postal code. |