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

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:

curl https://api.ipinfo.io/lookup/8.8.8.8?token=$TOKEN
{
  "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
}

Example IP addresses:

Carrier IP address
{
  
VPN IP address
{
  

Get information on your or visitors' IP address:

curl https://api.ipinfo.io/lookup/me?token=$TOKEN

The IPinfo Core also supports ASN lookups via the ASN API:

curl https://ipinfo.io/AS18952?token=$TOKEN
{
  "asn": "AS18952",
  "name": "Big Valley of Pomo Indians of the Big Valley Rancheria California",
  "country": "US",
  "allocated": "2017-08-30",
  "registry": "arin",
  "domain": "big-valley.net",
  "num_ips": 512,
  "type": "government",
  "prefixes": [
    {
      "netblock": "162.208.96.0/24",
      "id": "BVR-NETS",
      "name": "Big Valley of Pomo Indians of the Big Valley Rancheria California",
      "country": "US",
      "size": "256",
      "status": "ALLOCATION",
      "domain": "big-valley.net"
    },
    {
      "netblock": "162.208.98.0/24",
      "id": "BVR-NETS",
      "name": "Big Valley of Pomo Indians of the Big Valley Rancheria California",
      "country": "US",
      "size": "256",
      "status": "ALLOCATION",
      "domain": "big-valley.net"
    }
  ],
  "prefixes6": [],
  "peers": ["7018"],
  "upstreams": ["7018"],
  "downstreams": null
}

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.

curl  https://ipinfo.io/8.8.8.8/json?token=$TOKEN
{
  "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.

curl  https://ipinfo.io/8.8.8.8/json?token=$TOKEN
{
  "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"
  }
}