IPinfo - Comprehensive IP address data, IP geolocation API and database

IPinfo Core API Developer Resource

The IPinfo Core API is our entry-level premium API access plan, which includes granular geolocation information, ASN information, network flags, and access to the dedicated ASN API.

  • Geolocation information: City, Region/State, Country, Postal code etc.
  • ASN information: ASN (Autonomous System Number), AS Name, ASN Domain and ASN Type
  • Network flags: Anonymous IP address (VPN, proxy, Tor, or relay), Hosting IP address (data center or server IP), Anycast IP, Carrier mobile IP flag, and Satellite IP address

You can access IPinfo Core data as a downloadable dataset as well: IPinfo Core IP Data Downloads

Quick Reference

API Schema
JSON
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "IPinfo Core API Response",
  "description": "Schema for IPinfo Core API response",
  "type": "object",
  "properties": {
    "ip": {
      "type": "string",
      "description": "The IP address being queried.",
      "example": "51.68.57.72"
    },
    "hostname": {
      "type": "string",
      "description": "The hostname associated with the IP address.",
      "example": "generic.hostname.com"
    },
    "geo": {
      "type": "object",
      "description": "Geographic location information for the IP address.",
      "properties": {
        "city": {
          "type": "string",
          "description": "The city where the IP address is located.",
          "example": "Lille"
        },
        "region": {
          "type": "string",
          "description": "The region or state where the IP address is located.",
          "example": "Hauts-de-France"
        },
        "region_code": {
          "type": "string",
          "description": "The two-letter region code in ISO 3166 format.",
          "example": "HDF"
        },
        "country": {
          "type": "string",
          "description": "The country where the IP address is located.",
          "example": "France"
        },
        "country_code": {
          "type": "string",
          "description": "The ISO 3166 country code of the IP address.",
          "example": "FR"
        },
        "continent": {
          "type": "string",
          "description": "The continent where the IP address is located.",
          "example": "Europe"
        },
        "continent_code": {
          "type": "string",
          "description": "The two-letter continent code.",
          "example": "EU"
        },
        "latitude": {
          "type": "number",
          "description": "The latitude coordinate of the IP address location.",
          "example": 50.63297
        },
        "longitude": {
          "type": "number",
          "description": "The longitude coordinate of the IP address location.",
          "example": 3.05858
        },
        "timezone": {
          "type": "string",
          "description": "The local timezone of the IP address location, formatted according to the IANA Time Zone Database.",
          "example": "Europe/Paris"
        },
        "postal_code": {
          "type": "string",
          "description": "The postal or zip code associated with the IP address location.",
          "example": "59000"
        }
      }
    },
    "as": {
      "type": "object",
      "description": "Autonomous System (AS) information for the IP address.",
      "properties": {
        "asn": {
          "type": "string",
          "description": "The Autonomous System Number (ASN) identifying the organization that owns or operates the IP address.",
          "example": "AS16276"
        },
        "name": {
          "type": "string",
          "description": "The official name of the Autonomous System (AS) organization.",
          "example": "OVH SAS"
        },
        "domain": {
          "type": "string",
          "description": "The official domain name of the Autonomous System (AS) organization.",
          "example": "ovhcloud.com"
        },
        "type": {
          "type": "string",
          "description": "The type of the Autonomous System (AS) organization, such as hosting, ISP, education, government, or business.",
          "example": "hosting",
          "enum": ["hosting", "isp", "education", "government", "business"]
        }
      }
    },
    "anonymous": {
      "type": "object",
      "description": "Anonymity and privacy service detection information.",
      "properties": {
        "is_proxy": {
          "type": "boolean",
          "description": "Indicates whether the IP address is an open web proxy.",
          "example": false
        },
        "is_relay": {
          "type": "boolean",
          "description": "Indicates whether the IP address is part of an anonymous relay service, such as iCloud Private Relay.",
          "example": false
        },
        "is_tor": {
          "type": "boolean",
          "description": "Indicates whether the IP address is a TOR (The Onion Router) exit node.",
          "example": false
        },
        "is_vpn": {
          "type": "boolean",
          "description": "Indicates whether the IP address is a Virtual Private Network (VPN) exit node.",
          "example": true
        }
      }
    },
    "is_anonymous": {
      "type": "boolean",
      "description": "Indicates whether the IP address is anonymous. true if the IP address is associated with an IP privacy service.",
      "example": false
    },
    "is_anycast": {
      "type": "boolean",
      "description": "Indicates whether the IP address is an anycast IP. true if the IP address maps to multiple physical servers.",
      "example": false
    },
    "is_hosting": {
      "type": "boolean",
      "description": "Indicates whether the IP address is an internet service hosting IP address.",
      "example": true
    },
    "is_mobile": {
      "type": "boolean",
      "description": "Indicates whether the IP address belongs to a mobile network.",
      "example": false
    },
    "is_satellite": {
      "type": "boolean",
      "description": "Indicates whether the IP address is part of a satellite internet connection.",
      "example": false
    }
  }
}
FieldDescriptionExample
ipQueried IP address51.68.57.72
geocityCity of the IP addressLille
regionRegion/State of the IP addressHauts-de-France
region_codeRegion code in two-letter format in ISO 3166HDF
countryName of the country of the IP addressFrance
country_codeISO 3166 country code of the IP addressFR
continentName of the continentEurope
continent_codeContinent name code in two-letter formatEU
latitudeLatitude value of the IP address50.63297
longitudeLongitude value of the IP address3.05858
timezoneThe local timezone of the IP address location, formatted according to the IANA Time Zone Database.Europe/Paris
postal_codeThe postal code or zip code associated with the IP address's location.59000
asasnAutonomous System Number (ASN), identifying the organization that owns or operates the IP address.AS16276
nameThe official name of the Autonomous System (AS) organization.OVH SAS
domainThe official domain name of the Autonomous System (AS) organization.ovhcloud.com
typeThe type of the Autonomous System (AS) organization, such as hosting, ISP, education, government, or business.hosting
is_anonymousIndicates whether the IP address is anonymous. true if the IP address is associated with an IP privacy service.false
is_anycastIndicates whether the IP address is an anycast IP. true if the IP address maps to multiple physical servers.false
is_hostingIndicates whether the IP address is an internet service hosting IP address.true
is_mobileIndicates whether the IP address belongs to a mobile network.false
is_satelliteIndicates whether the IP address is part of a satellite internet connection.false

Lookup IP addresses:

Bash
curl https://api.ipinfo.io/lookup/8.8.8.8?token=$TOKEN
JSON
{
  "ip": "8.8.8.8",
  "geo": {
    "city": "Mountain View",
    "region": "California",
    "region_code": "CA",
    "country": "United States",
    "country_code": "US",
    "continent": "North America",
    "continent_code": "NA",
    "latitude": 37.4056,
    "longitude": -122.0775,
    "timezone": "America/Los_Angeles",
    "postal_code": "94043"
  },
  "as": {
    "asn": "AS15169",
    "name": "Google LLC",
    "domain": "google.com",
    "type": "hosting"
  },
  "is_anonymous": false,
  "is_anycast": true,
  "is_hosting": true,
  "is_mobile": false,
  "is_satellite": false
}

The API endpoint also supports explicit declaration of IP address connections (IPv4/IPv6).

DescriptionEndpoint typeEndpoint
General (Dual Stacked)Self / Client IPcurl https://api.ipinfo.io/lookup/me?token=$TOKEN
Lookup / Target IPcurl https://api.ipinfo.io/lookup/8.8.8.8?token=$TOKEN
IPv4Self / Client IPcurl https://v4.api.ipinfo.io/lookup/me?token=$TOKEN
Lookup / Target IPcurl https://v4.api.ipinfo.io/lookup/8.8.8.8?token=$TOKEN
IPv6Self / Client IPcurl https://v6.api.ipinfo.io/lookup/me?token=$TOKEN
Lookup / Target IPcurl https://v6.api.ipinfo.io/lookup/8.8.8.8?token=$TOKEN

The general API endpoint is built to support both IPv4 and IPv6 connection, ensuring you can call it from either without any issues.

Alternative API Schema

Our legacy API is still maintained with fresh data, and we are committed to providing continued service to existing customers.

IPinfo Core (Legacy)

Built on top of the IPinfo Basic tier API service, the IPinfo Core API service includes the IPinfo Core API and the network flags.

Bash
curl  https://ipinfo.io/8.8.8.8/json?token=$TOKEN
JSON
{
  "ip": "8.8.8.8",
  "hostname": "dns.google",
  "city": "Mountain View",
  "region": "California",
  "country": "US",
  "loc": "37.4056,-122.0775",
  "postal": "94043",
  "timezone": "America/Los_Angeles",
  "is_anycast": true,
  "is_mobile": false,
  "is_anonymous": false,
  "is_satellite": false,
  "is_hosting": true,
  "asn": {
    "asn": "AS15169",
    "name": "Google LLC",
    "domain": "google.com",
    "route": "8.8.8.0/24",
    "type": "hosting"
  }
}
IPinfo Basic (Legacy)

IPinfo Basic has been upgraded to the IPinfo Core API tier. It now includes network flags and extended geolocation details that were previously not available in the Basic tier.

Bash
curl  https://ipinfo.io/8.8.8.8/json?token=$TOKEN
JSON
{
  "ip": "8.8.8.8",
  "hostname": "dns.google",
  "city": "Mountain View",
  "region": "California",
  "country": "US",
  "loc": "37.4056,-122.0775",
  "postal": "94043",
  "timezone": "America/Los_Angeles",
  "asn": {
    "asn": "AS15169",
    "name": "Google LLC",
    "domain": "google.com",
    "route": "8.8.8.0/24",
    "type": "hosting"
  }
}

Check out the code snippets section for IPinfo Core API related code and responses.

Was this page helpful?