Info Endpoint
Checks the provided IP address (both v4 & v6 formats) and returns all available information.
IP Information
This IP information endpoint returns information your client's or a specific IP address.
Optional attributes
- Name
ip- Type
- string
- Description
The IP address you want to query
- Name
language- Type
- string
- Description
An ISO Alpha 2 Language Code for localizing the IP data. Supported values:
de,en,es,fr,ja,pt,ru,zh(default:en). Any other code returns a422validation error.
- Name
hostname- Type
- boolean
- Description
If the hostname parameter is set to 1, the API response will contain the hostname of the ip
- Name
fields- Type
- string
- Description
Comma-separated dot paths to return instead of the full object, e.g.
ip,location.country.alpha2,security. Naming an object (security) keeps it whole; unknown paths are ignored. Use it to keep responses small when you only need a few values.
Only the country and ASN
curl -G https://api.ipbase.com/v2/info \
-d ip=1.1.1.1 \
-d fields=ip,location.country.alpha2,connection.asn \
-H "apikey: YOUR-API-KEY"
Response
{
"data": {
"ip": "1.1.1.1",
"connection": {
"asn": 13335
},
"location": {
"country": {
"alpha2": "US"
}
}
}
}
To look up many addresses at once, use the batch endpoint.
Response Structure
Our /info endpoint offers the following information: data (general information), range_type, connection, location, tlds, timezone, security and domains.
Request
curl -G https://api.ipbase.com/v2/info \
-d ip=1.1.1.1 \
-H "apikey: YOUR-API-KEY"
Full 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": 5368753,
"latitude": 34.053611755371094,
"longitude": -118.24549865722656,
"zip": "90012",
"continent": {
"code": "NA",
"name": "North America",
"name_translated": "North America",
"geonames_id": 6255149,
"wikidata_id": "Q49"
},
"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": "0644000",
"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/Los_Angeles",
"current_time": "2023-06-28T07:46:37-07:00",
"code": "PDT",
"is_daylight_saving": true,
"gmt_offset": -25200
},
"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": 12337,
"domains": [
"eliwise.academy",
"accountingprose.academy",
"1and1-test-ntlds-fr.accountant",
"sulphur.africa",
"saadeh.agency"
]
}
}
}
data Response Properties
- Name
ip- Type
- string
- Description
The requested IP address
- Name
hostname- Type
- string
- Description
️The IPs hostname - if requested via
?hostname=1
- Name
type- Type
- string
- Description
IP type
v4orv6
- Name
tlds- Type
- array<string>
- Description
The top-level domains associated with the country of the IP address (e.g.
[".us"])
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.
{
"data": {
"ip": "1.1.1.1",
"hostname": "one.one.one.one",
"type": "v4",
...
}
}
range_type Response Properties
- Name
type- Type
- string
- Description
See below
- Name
description- Type
- string
- Description
️Range type
The range type field can have the following values:
- Name
UNSPECIFIED- Type
- Description
Unspecified/unknown address
- Name
RESERVED- Type
- Description
️Reserved/internal use only
- Name
THIS_NETWORK- Type
- Description
️Refer to source hosts on this network
- Name
LOOPBACK- Type
- Description
️Internet host loopback address
- Name
ANYCAST_RELAY- Type
- Description
️Relay anycast address
- Name
LIMITED_BROADCAST- Type
- Description
️Limited broadcast destination address
- Name
MULTICAST- Type
- Description
️Multicast address assignments - Identify a group of interfaces
- Name
LINKLOCAL- Type
- Description
️Link local address, allocated for communication between hosts on a single link
- Name
LINKLOCAL_UNICAST- Type
- Description
️Link local unicast / Linked-scoped unicast
- Name
DISCARD_ONLY- Type
- Description
️Discard only
- Name
DISCARD- Type
- Description
️Discard
- Name
PRIVATE_NETWORK- Type
- Description
️For use in private networks
- Name
PUBLIC- Type
- Description
️Public address
- Name
CGNAT- Type
- Description
️Carrier-grade NAT
{
"range_type": {
"type": "PUBLIC",
"description": "Public address"
}
}
connection Response Properties
- Name
asn- Type
- integer
- Description
The ASN number
- Name
organization- Type
- string
- Description
️️The ASN organization
- Name
isp- Type
- string
- Description
️️The name of the ISP
- Name
range- Type
- string
- Description
The IP range
Tip: You can request more information about the ASN via the asn endpoint. The ASN endpoint is available in the medium plan and above.
{
"connection": {
"asn": 13335,
"organization": "Cloudflare, Inc.",
"isp": "APNIC Research and Development",
"range": "1.1.1.1/32"
}
}
location Response Properties
- Name
geonames_id- Type
- integer
- Description
Geonames identifier for the Geonames Registry
- Name
latitude- Type
- float
- Description
️️Latitude associated with the IP address
- Name
longitude- Type
- float
- Description
Longitude associated with the IP address
- Name
zip- Type
- string
- Description
ZIP code associated with the IP address
Third-party data IDs
Our location information features IDs of the following data sources that can be mapped for further data ingestion:
- Name
geonames_id- Type
- source: Geonames
- Description
Example: https://www.geonames.org/5332921/ for California
- Name
hasc_id- Type
- source: Wikidata
- Description
Example: https://www.wikidata.org/wiki/Property:P8119 represents country subdivisions within
- Name
wikidata_id- Type
- source: Wikidata
- Description
Example: https://www.wikidata.org/wiki/Q30 for the United States
- Name
fips- Type
- source: FIPS
- Description
https://www.census.gov/library/reference/code-lists/ansi.html
More detailed location data is available within four objects: continent, country, city, and region.
continent
Type: object
- Name
code- Type
- string
- Description
The two-letter continent code (e.g.
NA)
- Name
name- Type
- string
- Description
The continent name
- Name
name_translated- Type
- string
- Description
The continent name, localized via the
languageparameter
- Name
geonames_id- Type
- integer
- Description
- Name
wikidata_id- Type
- string
- Description
country
Type: object
- Name
alpha2- Type
- string
- Description
The alpha2 representation of the country code
- Name
alpha3- Type
- string
- Description
️ The alpha3 representation of the country code
- Name
calling_codes- Type
- array<string>
- Description
All available calling codes for this country
- Name
emoji- Type
- string
- Description
The country's flag as an emoji
- Name
ioc- Type
- string
- Description
The IOC three-letter representation of the country code (reference)
- Name
name- Type
- string
- Description
The country name data
- Name
name_translated- Type
- string
- Description
The local country name data
- Name
timezones- Type
- array<string>
- Description
All of the available timezones within the country data
- Name
is_in_european_union- Type
- boolean
- Description
trueif the country is in the European Union (helpful for GDPR redirects), otherwisefalse
- Name
fips- Type
- string
- Description
The FIPS two letter representation of the country code (reference)
- Name
geonames_id- Type
- integer
- Description
- Name
hasc_id- Type
- string
- Description
- Name
wikidata_id- Type
- string
- Description
country > currencies
Type: object
- Name
symbol- Type
- string
- Description
The currency symbol
- Name
name- Type
- string
- Description
️ ️The currency name
- Name
symbol_native- Type
- string
- Description
The native currency symbol
- Name
decimal_digits- Type
- integer
- Description
How many decimal digits does the currency use
- Name
rounding- Type
- integer
- Description
The rounding increment used for cash amounts in this currency (
0if no special rounding applies)
- Name
code- Type
- string
- Description
️The three letter currency code
- Name
name_plural- Type
- string
- Description
The plural version of the currency
country > languages
Type: array<object>
- Name
name- Type
- string
- Description
The language name
- Name
name_native- Type
- string
- Description
The native language name
city
Type: object
- Name
fips- Type
- string
- Description
The FIPS two letter representation of the city code (reference)
- Name
alpha2- Type
- string
- Description
️ The two-letter representation of the city
- Name
geonames_id- Type
- integer
- Description
- Name
hasc_id- Type
- string
- Description
- Name
wikidata_id- Type
- string
- Description
- Name
name- Type
- string
- Description
The city name
- Name
name_translated- Type
- string
- Description
The city name, localized via the
languageparameter
region
Type: object
- Name
fips- Type
- string
- Description
The FIPS code of the region (reference)
- Name
alpha2- Type
- string
- Description
The ISO 3166-2 code of the region (e.g.
US-CA)
- Name
geonames_id- Type
- integer
- Description
- Name
hasc_id- Type
- string
- Description
- Name
wikidata_id- Type
- string
- Description
- Name
name- Type
- string
- Description
The region name
- Name
name_translated- Type
- string
- Description
The region name, localized via the
languageparameter
{
"location": {
"geonames_id": 5368753,
"latitude": 34.053611755371094,
"longitude": -118.24549865722656,
"zip": "90012",
"continent": {
"code": "NA",
"name": "North America",
"name_translated": "North America",
"geonames_id": 6255149,
"wikidata_id": "Q49"
},
"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",
"..."
],
"is_in_european_union": false,
"fips": "US",
"geonames_id": 6252001,
"hasc_id": "US",
"wikidata_id": "Q30"
},
"city": {
"fips": "0644000",
"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"
}
}
}
timezone Response Properties
- Name
id- Type
- string
- Description
The timezone
- Name
current_time- Type
- string
- Description
️The current time as a datetime string
- Name
code- Type
- string
- Description
️ The three-letter code for the timezone
- Name
is_daylight_saving- Type
- boolean
- Description
️ If the timezone is currently in daylight saving time
- Name
gmt_offset- Type
- integer
- Description
️ The offset to GMT in seconds
{
"timezone": {
"id": "America/Los_Angeles",
"current_time": "2023-06-28T07:46:37-07:00",
"code": "PDT",
"is_daylight_saving": true,
"gmt_offset": -25200
}
}
security Response Properties
>= Medium plan
- Name
is_anonymous- Type
- boolean
- Description
Tor exit node, VPN, open proxy or privacy relay (e.g. iCloud Private Relay)
- Name
is_datacenter- Type
- boolean
- Description
Address of a datacenter, cloud, hosting or CDN network
- Name
is_vpn- Type
- boolean
- Description
Server of a commercial or consumer VPN service
- Name
is_bot- Type
- boolean
- Description
Verified crawler or monitor published by its operator (e.g. Googlebot) or an internet-wide research scanner
- Name
is_abuser- Type
- boolean
- Description
Recently reported for abusive behaviour by one or more blocklists
- Name
is_known_attacker- Type
- boolean
- Description
Recently seen attacking (brute force, exploitation, botnets) by threat feeds, or part of a hijacked netblock
- Name
is_proxy- Type
- boolean
- Description
Public or open proxy (HTTP, SOCKS)
- Name
is_spam- Type
- boolean
- Description
Known spam sender
- Name
is_tor- Type
- boolean
- Description
Tor exit node
- Name
proxy_type- Type
- string
- Description
Anonymity type:
tor,vpn,proxy,relayor an empty string when the IP is not anonymous (if several apply, the first in this order)
- Name
is_icloud_relay- Type
- boolean
- Description
iCloud Private Relay egress address
- Name
threat_score- Type
- integer
- Description
Evidence-based threat score from 0 (no known threat) to 100, in steps of 10 (see below)
The threat_score combines the anonymity type (Tor exit, open proxy, VPN, relay), internet scanners, datacenter hosting and every threat feed that lists the address, weighted by the feed's reliability and by how recently it saw the address. Verified crawlers and allowlisted infrastructure such as public DNS resolvers score 0. For example, a datacenter address alone scores 10, a VPN server 30, a VPN server in a datacenter 40, a Tor exit node 60 and a Tor exit node that is also reported for attacks 90. All fields are null when your plan does not include security data.
{
"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 Response Properties
>= Medium plan
- Name
count- Type
- integer
- Description
How many domains are hosted on this domain
- Name
domains- Type
- array<string>
- Description
️️A list of domains hosted on this IP. Up to 5 domains are listed here; more are available with our Hosted Domain API (soon).
You can request all domains via the domains endpoint.
{
"domains": {
"count": 12360,
"domains": [
"eliwise.academy",
"accountingprose.academy",
"pistola.academy",
"1and1-test-ntlds-fr.accountant",
"omnergy.africa"
]
}
}
Legacy v1 endpoint
A legacy v1 endpoint, GET https://api.ipbase.com/v1/json/{ip}, is still available for backwards compatibility. It returns a flat JSON object with basic geolocation fields only (ip, country_code, country_name, region_code, region_name, city, zip_code, time_zone, latitude, longitude, metro_code). New integrations should use /v2/info, which supersedes it.