IPcheckly
Initializing Geolocation Engine…

Introduction

Welcome to the IPcheckly IP Geolocation API documentation.

IPcheckly provides a fast, reliable, and accurate way to retrieve IP address intelligence, including:

  • Geolocation data (country, region, city, latitude, longitude)
  • ASN (Autonomous System Number) and ISP information
  • Hosting provider details
  • Security threat detection (Proxy, VPN, Tor)

The API is built on REST architecture, returns responses in JSON format, and is optimized for sub-15ms latency worldwide.

Authentication

All API requests require a unique API Key, which you can obtain from your Dashboard after registration.

You can authenticate your requests in two ways:

  1. Via URL query parameter (recommended for testing):
    `?key=YOUR_API_KEY`
  2. Via HTTP Header (recommended for production):
    `Authorization: Bearer YOUR_API_KEY`

API Endpoints

The main base URL for making requests:

GET https://api.ipcheckly.com{ip_address}

You can pass both IPv4 and IPv6 addresses. If you do not provide an IP address and access the root (or pass `myip` or leave blank), the API will return data for the IP address making the request.

Query Parameters

Parameter Type Required Description
key string Yes* Your unique API key. Required if the key is not passed in the headers.
fields string No Allows filtering the API response by returning only the specified fields (comma-separated). For example: ?fields=ip,location.country,asn
lang string No Localization of country and city names. Available: en, ru, de, fr, es, zh, ja. Default: en.

Code Examples

You can integrate the IPcheckly API in minutes using ready-to-use code snippets for popular programming languages.

<?php
// Set your IP and API Key
$ip = '1.1.1.1';
$apiKey = 'YOUR_API_KEY';

// Init cURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.ipcheckly.com{$ip}?key={$apiKey}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Execute request
$response = curl_exec($ch);
curl_close($ch);

// Decode JSON
$data = json_decode($response, true);
echo "Country: " . $data["location"]["country"];
?>
curl -X GET "https://api.ipcheckly.com1.1.1.1?key=YOUR_API_KEY" \
  -H "Accept: application/json"
const fetch = require('node-fetch');

const ip = '1.1.1.1';
const apiKey = 'YOUR_API_KEY';

async function getIpData() {
  try {
	const response = await fetch(`https://api.ipcheckly.com${ip}?key=${apiKey}`);
	const data = await response.json();
	
	console.log(`Country: ${data.location.country}`);
	console.log(`ISP: ${data.company.name}`);
  } catch (error) {
	console.error("Error fetching data:", error);
  }
}

getIpData();
package main

import (
	"fmt"
	"io/ioutil"
	"net/http"
)

func main() {
	ip := "1.1.1.1"
	apiKey := "YOUR_API_KEY"
	url := "https://api.ipcheckly.com" + ip + "?key=" + apiKey

	resp, err := http.Get(url)
	if err != nil {
		fmt.Println("Error:", err)
		return
	}
	defer resp.Body.Close()

	body, _ := ioutil.ReadAll(resp.Body)
	fmt.Println(string(body))
}
# pip install requests
import requests

ip = '1.1.1.1'
key = 'YOUR_API_KEY'
url = 'https://api.ipcheckly.com{ip}?key={key}'

try:
	response = requests.get(url)
	response.raise_for_status()
	data = response.json()
	
	print(f"Country: {data['location']['country']}")
	print(f"Is Datacenter: {data['is_datacenter']}")
except requests.exceptions.HTTPError as err:
	print(f"HTTP Error: {err}")
const ip = '1.1.1.1';
const apiKey = 'YOUR_API_KEY'; // Reminder: Do not expose in client code

fetch(`https://api.ipcheckly.com${ip}?key=${apiKey}`)
  .then(response => response.json())
  .then(data => {
	console.log(data);
	alert(`This IP is from ${data.location.country_code}`);
  })
  .catch(error => console.error('Error:', error));

Response Object (JSON)

All responses are returned as a standardized JSON object. Below is a detailed breakdown of the response structure.

Example Response: 200 OK
{
  "ip": "1.1.1.1",
  "success": true,
  "rir": "APNIC",
  "continent_code": "OC",
  "country": "Australia",
  "country_code": "AU",
  "state": "Queensland",
  "city": "Brisbane",
  "currency_code": "AUD",
  "latitude": -27,
  "longitude": 153,
  "is_eu": false,
  "is_dst": false,
  "zip": "4000",
  "calling_code": "61",
  "datacenter": null,
  "company": {
	"name": "APNIC Research and Development",
	"abuser_score": "0.0156 (Elevated)",
	"domain": "apnic.net",
	"type": "business",
	"network": "1.1.1.0 - 1.1.1.255"
  },
  "asn": {
	"asn": 13335,
	"abuser_score": "0.0145 (Elevated)",
	"route": "1.1.1.0/24",
	"descr": "CLOUDFLARENET - Cloudflare, Inc., US",
	"country": "us",
	"active": true,
	"org": "Cloudflare, Inc.",
	"domain": "cloudflare.com",
	"abuse": "[email protected]",
	"type": "hosting",
	"created": "2010-07-14",
	"updated": "2017-02-17",
	"rir": "ARIN"
  },
  "location": {
	"is_eu_member": false,
	"calling_code": "61",
	"currency_code": "AUD",
	"continent": "OC",
	"country": "Australia",
	"country_code": "AU",
	"state": "Queensland",
	"city": "Brisbane",
	"latitude": -27.46754,
	"longitude": 153.02809,
	"zip": "4000",
	"timezone": "Australia/Brisbane",
	"local_time": "2026-04-08T08:49:41+10:00",
	"local_time_unix": 1775602181,
	"is_dst": false
  },
  "is_bogon": false,
  "is_mobile": false,
  "is_satellite": false,
  "is_crawler": false,
  "is_datacenter": false,
  "is_tor": false,
  "is_proxy": false,
  "is_vpn": true,
  "is_abuser": true,
  "message": null,
  "elapsed_ms": "0.53"
}

Top-level Fields

Field Type Description
ip string IP address that the data was requested for.
is_vpn boolean If true, this IP belongs to a known VPN service. (Available for Premium plans)
is_datacenter boolean If true, this IP belongs to a hosting provider, cloud platform, or datacenter.
datacenter object Object with detailed information about the datacenter (if applicable).
company object Object with information about the company owning the network (Abuse Score, Domain, Name).
asn object Object with Autonomous System (AS) data from the BGP table.
location object Object with geolocation data: continent, country, city, coordinates.

Error Codes

In case of an error, the API will return a standard HTTP status code, and the response body will contain JSON with the error description.

Code Status Description
400 Bad Request IP address or request parameters are passed in an incorrect format.
401 Unauthorized API Key is missing, invalid, or inactive.
403 Forbidden API Key does not have permissions to access the requested data (e.g. requesting VPN data on a Basic plan).
429 Too Many Requests You have exceeded the monthly request limit according to your plan.
500 Internal Server Error Internal server error. Please contact support if this persists.