# Info Endpoint
Checks the provided IP address (both v4
& v6
formats) and returns all available information.
Request Method: GET
Request URL: https://api.ipbase.com/v2/info
# Request Parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
apikey | string | ️ | Your API Key |
ip | string | ️ ️ ️ ️ ️ ️ ️ ️ ️ ️ | The IP address you want to query |
language | string | An ISO Alpha 2 Language Code for localizing the IP data | |
hostname | boolean | If the hostname parameter is set to 1, the API response will contain the hostname of the ip |
# Sample Response
{
"data": {
"ip": "1.1.1.1",
"hostname": "one.one.one.one",
"type": "v4",
"range_type": { "type": "PUBLIC", "description": "Public address" },
"connection": {
"asn": 13335,
"organization": "Cloudflare, Inc.",
"isp": "APNIC Research and Development",
"range": "1.1.1.1/32"
},
"location": {
"geonames_id": 5332870,
"latitude": 34.053611755371094,
"longitude": -118.24549865722656,
"zip": "90012",
"continent": {
"code": "NA",
"name": "North America",
"name_translated": "North America"
},
"country": {
"alpha2": "US",
"alpha3": "USA",
"calling_codes": ["+1"],
"currencies": [
{
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
}
],
"emoji": "🇺🇸",
"ioc": "USA",
"languages": [{ "name": "English", "name_native": "English" }],
"name": "United States",
"name_translated": "United States",
"timezones": [
"America/New_York",
"America/Detroit",
"America/Kentucky/Louisville",
"America/Kentucky/Monticello",
"America/Indiana/Indianapolis",
"America/Indiana/Vincennes",
"America/Indiana/Winamac",
"America/Indiana/Marengo",
"America/Indiana/Petersburg",
"America/Indiana/Vevay",
"America/Chicago",
"America/Indiana/Tell_City",
"America/Indiana/Knox",
"America/Menominee",
"America/North_Dakota/Center",
"America/North_Dakota/New_Salem",
"America/North_Dakota/Beulah",
"America/Denver",
"America/Boise",
"America/Phoenix",
"America/Los_Angeles",
"America/Anchorage",
"America/Juneau",
"America/Sitka",
"America/Metlakatla",
"America/Yakutat",
"America/Nome",
"America/Adak",
"Pacific/Honolulu"
],
"is_in_european_union": false,
"fips": "US",
"geonames_id": 6252001,
"hasc_id": "US",
"wikidata_id": "Q30"
},
"city": {
"fips": "644000",
"alpha2": null,
"geonames_id": 5368753,
"hasc_id": null,
"wikidata_id": "Q65",
"name": "Los Angeles",
"name_translated": "Los Angeles"
},
"region": {
"fips": "US06",
"alpha2": "US-CA",
"geonames_id": 5332921,
"hasc_id": "US.CA",
"wikidata_id": "Q99",
"name": "California",
"name_translated": "California"
}
},
"tlds": [".us"],
"timezone": {
"id": "America/New_York",
"current_time": "2023-01-12T08:46:25-05:00",
"code": "EST",
"is_daylight_saving": false,
"gmt_offset": -18000
},
"security": {
"is_anonymous": false,
"is_datacenter": false,
"is_vpn": false,
"is_bot": false,
"is_abuser": false,
"is_known_attacker": false,
"is_proxy": false,
"is_spam": false,
"is_tor": false,
"proxy_type": "",
"is_icloud_relay": false,
"threat_score": 0
},
"domains": {
"count": 12360,
"domains": [
"eliwise.academy",
"accountingprose.academy",
"pistola.academy",
"1and1-test-ntlds-fr.accountant",
"omnergy.africa"
]
}
}
}
# Response structure
Our /info
endpoint offers the following information: data
(general information), range_type
, connection
, location
, tlds
, timezone
, security
and domains
.
# data
"data": {
"ip": "1.1.1.1",
"hostname": "one.one.one.one",
"type": "v4",
...
}
Available in: all plans
Name | Type | Description |
---|---|---|
ip | string | The requested IP address |
hostname | string | ️The IPs hostname (if requested via ?hostname=1) |
type | string | v4 or v6 |
Hostname Lookup
The ipbase API does not by default return details about the hostname that the specified IP address resolves to. Add the hostname parameter of the API and set it to 1 to include the hostname object in your API return.
Important: The hostname lookup is disabled by default to save request time. Please be aware that turning on hostname lookup can make the API take longer to respond.
# range_type
Type: object
"range_type": {
"type": "PUBLIC",
"description": "Public address"
}
Available in: all plans
Name | Type | Description |
---|---|---|
type | string | See below |
description | string | ️ |
This object can have the following values:
type | description |
---|---|
UNSPECIFIED | Unspecified/unknown address |
RESERVED | Reserved/internal use only |
THIS_NETWORK | Refer to source hosts on this network |
LOOPBACK | Internet host loopback address |
ANYCAST_RELAY | Relay anycast address |
LIMITED_BROADCAST | Limited broadcast destination address |
MULTICAST | Multicast address assignments - Indentify a group of interfaces |
LINKLOCAL | Link local address, allocated for communication between hosts on a single link |
LINKLOCAL_UNICAST | Link local unicast / Linked-scoped unicast |
DISCARD_ONLY | Discard only |
DISCARD | Discard |
PRIVATE_NETWORK | For use in private networks |
PUBLIC | Public address |
CGNAT | Carrier-grade NAT |
# connection
Type: object
"connection": {
"asn": 13335,
"organization": "Cloudflare, Inc.",
"isp": "APNIC Research and Development",
"range": "1.1.1.1/32"
}
Available in: all plans
Name | Type | Description |
---|---|---|
asn | integer | The ASN number |
organization | string | ️The ASN organization |
isp | string | The name of the ISP |
range | string | IP range |
TIP
You can request more information about the ASN via the asn endpoint.
Available in the medium plan and above.
# location
Type: object
"location": {
"geonames_id": 5332870,
"latitude": 34.053611755371094,
"longitude": -118.24549865722656,
"zip": "90012",
"continent": {
"code": "NA",
"name": "North America",
"name_translated": "North America"
},
"country": {
"alpha2": "US",
"alpha3": "USA",
"calling_codes": ["+1"],
"currencies": [
{
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
}
],
"emoji": "🇺🇸",
"ioc": "USA",
"languages": [
{
"name": "English",
"name_native": "English"
}
],
"name": "United States",
"name_translated": "United States",
"timezones": [
"America/New_York",
"America/Detroit",
"America/Kentucky/Louisville",
"America/Kentucky/Monticello",
"America/Indiana/Indianapolis",
"America/Indiana/Vincennes",
"America/Indiana/Winamac",
"America/Indiana/Marengo",
"America/Indiana/Petersburg",
"America/Indiana/Vevay",
"America/Chicago",
"America/Indiana/Tell_City",
"America/Indiana/Knox",
"America/Menominee",
"America/North_Dakota/Center",
"America/North_Dakota/New_Salem",
"America/North_Dakota/Beulah",
"America/Denver",
"America/Boise",
"America/Phoenix",
"America/Los_Angeles",
"America/Anchorage",
"America/Juneau",
"America/Sitka",
"America/Metlakatla",
"America/Yakutat",
"America/Nome",
"America/Adak",
"Pacific/Honolulu"
],
"is_in_european_union": false,
"fips": "US",
"geonames_id": 6252001,
"hasc_id": "US",
"wikidata_id": "Q30"
},
"city": {
"fips": "644000",
"alpha2": null,
"geonames_id": 5368753,
"hasc_id": null,
"wikidata_id": "Q65",
"name": "Los Angeles",
"name_translated": "Los Angeles"
},
"region": {
"fips": "US06",
"alpha2": "US-CA",
"geonames_id": 5332921,
"hasc_id": "US.CA",
"wikidata_id": "Q99",
"name": "California",
"name_translated": "California"
}
}
Available in: all plans
Name | Type | Description |
---|---|---|
geonames_id | integer | Your API Key |
latitude | float | ️The IP address you want to query |
longitude | float | An ISO Alpha 2 Language Code for localizing the IP data |
zip | string | Your API Key |
# Third-party data IDs
Our location information features IDs of the following data sources that can be mapped for further data ingestion:
Name | Datasource | Example |
---|---|---|
geonames_id | Geonames (opens new window) | https://www.geonames.org/5332870/ (opens new window) for California |
hasc_id | Wikidata (opens new window) | https://www.wikidata.org/wiki/Property:P8119 (opens new window) represents country subdivions within |
wikidata_id | Wikidata (opens new window) | https://www.wikidata.org/wiki/Q30 (opens new window) for California |
fips | FIPS (opens new window) |
More detailed location data is available within three objects: country
, city
, and region
.
# country
Type: object
Parameter | Type | Description |
---|---|---|
alpha2 | string | The alpha2 representation of the country code |
alpha3 | string | ️The alpha2 representation of the country code |
calling_codes | array<string> | All available calling codes for this country |
emoji | string | The country's flag as an emoji |
ioc | string | The IOCs three-letter representation of the country code (reference (opens new window)) |
name | string | The country name data |
name_translated | string | The local country name data |
timezones | array<string> | All of the available timezones within the country data |
is_in_european_union | boolean | true if the country is in the European Union (helpful for GDPR redirects), otherwise false |
fips | string | The FIPS two letter representation of the country code (reference (opens new window) |
geonames_id | integer | reference |
hasc_id | string | reference |
wikidata_id | string | reference |
# country
.currencies
Type: object
Parameter | Type | Description |
---|---|---|
symbol | string | The currency symbol |
name | string | ️The currency name |
symbol_native | string | The native currency symbol |
decimal_digits | integer | How many decimal digits does the currency use |
rounding | integer | |
code | string | ️The three letter currency code |
name_plural | string | The plural version of the currency |
# country
.languages
Type: array<object>
Name | Type | Description |
---|---|---|
name | string | The language name |
name_native | string | ️The native currency name |
# city
Type: object
Parameter | Type | Description |
---|---|---|
fips | string | The FIPS two letter representation of the city code (reference (opens new window) |
alpha2 | string | ️The two-letter representation of the city |
geonames_id | integer | reference |
hasc_id | integer | reference |
wikidata_id | string | ️reference |
name | string | The city name |
name_translated | string | The local city name |
# region
Type: object
Parameter | Type | Description |
---|---|---|
fips | string | The FIPS two letter representation of the region code (reference (opens new window) |
alpha2 | string | ️The two-letter representation of the city |
geonames_id | integer | reference |
hasc_id | string | reference |
wikidata_id | string | ️reference |
name | string | The region name |
name_translated | string | The local region name |
# timezone
"timezone": {
"id": "America/New_York",
"current_time": "2023-01-10T11:49:17-05:00",
"code": "EST",
"is_daylight_saving": false,
"gmt_offset": -18000
}
Type: object
Available in: all plans
Name | Type | Description |
---|---|---|
id | string | The timezone |
current_time | string | The current time as a datetime string |
code | string | The three-letter code for the timezone |
is_daylight_saving | boolean | If it is currency in daylight saving |
gmt_offset | integer | The offset to GMT in seconds |
# security
"security": {
"is_anonymous": false,
"is_datacenter": false,
"is_vpn": false,
"is_bot": false,
"is_abuser": false,
"is_known_attacker": false,
"is_proxy": false,
"is_spam": false,
"is_tor": false,
"proxy_type": "",
"is_icloud_relay": false,
"threat_score": 0
},
Type: object
Available in: Medium, Large, Custom and Enterprise
Name | Type | Description |
---|---|---|
is_anonymous | boolean | If the IP is anonymous |
is_datacenter | boolean | ️If the IP is an address used in a datacenter |
is_vpn | boolean | ️If the IP is a known VPN |
is_bot | boolean | ️If the IP is a known bot |
is_abuser | boolean | ️If the IP is a known bot |
is_known_attacker | boolean | If the IP is a known attacker |
is_proxy | boolean | If the IP is a known proxy |
is_spam | boolean | If the IP is a known spammer |
is_tor | boolean | If the IP is a known Tor endpoint |
proxy_type | string | The type of proxy, it can be vpn or an empty string |
is_icloud_relay | boolean | If the IP is a known iCloud relay IP |
threat_score | integer | A threat score on a scale from 0 to 100, with 0 representing no threat and 100 the highest threat level |
# domains
"domains": {
"count": 12360,
"domains": [
"eliwise.academy",
"accountingprose.academy",
"pistola.academy",
"1and1-test-ntlds-fr.accountant",
"omnergy.africa"
]
}
Type: object
Available in: Medium, Large, Custom and Enterprise
Name | Type | Description |
---|---|---|
count | integer | How many domains are hosted on this domain |
domains | array<string> | ️A list of domains hosted on this IP. Up to 5 domains are listed here; more are available with our Hosted Domain API (soon). |
TIP
You can request all domains via the domains endpoint.