Insight API

Version: 1.0.0

Website: https://api.checkip.com/insight-api

Swagger-UI: https://api.checkip.com/doc/swagger.html

About

The Insight API provides REST API access for IP Insight data.

Quick Start

Get up and running without all the details.

Request:

curl -H "Token: {{token}}" "https://api.checkip.com/v1/insight/IP_ADDRESS"

Response:

ip              The IP address queried
as              Autonomous System Details
ip_label        The classification of infrastructure this IP is in
location        IP location data
risks           Risks and threats from this IP address
services        Services running on this IP(e.g. BrightData)

Authentication

As part of your setup process (or trial) you were provided a token directly or generated one using your account dashboard online at checkip.com. Authentication with the API service is performed by passing your token in an HTTP header named Token. For example, using the cURL utility, an authenticated request would look like:

curl -H "Token: {{token}}" "https://api.checkip.com/v1/insight/IP_ADDRESS"

Responses

The API will always return information about your query in a set of response headers:

x-Credit-Remaining: The number of queries you have remaining for your account
X-Current-Product: Your current product name

Note: you may also view your remaining query balance by using the status endpoint

The API will return a JSON object with code:

200: The request succeeded without error
400: Bad Input provided, IP must be a public IPv4 or IPv6 address
401: Unauthorized, your token is most likely invalid
403: Your account has insufficient queries to perform this action
404: The provided IP address is not found or unavailable
429: You have exceeded rate limit
500: Some error has occurred

Endpoints

GET /v1/insight/:IP

Retrieves an IP Insight Object by IPv4 or IPv6 Address. An IP Insight Object summarizes all available information about the queried IP Address. Some fields are optional and will be excluded if not available.

Query:

curl -H "Token: {{token}}" "https://api.checkip.com/v1/insight/IP_ADDRESS"

Example Response:

{
   "code":200,
   "data":{
      "ip":"27.131.249.86",
      "as":{
         "number":45700,
         "organization":"PT. NAP Info Lintas Nusa"
      },
      "ip_label":"cellular",
      "location":{
         "country_code":"ID",
         "country":"Indonesia",
         "state":"Jakarta",
         "city":"Jakarta"
      },
      "risks":[
         "Residential Proxy"
      ],
      "services":[
         "dataimpulse",
         "geonode",
         "oxylabs",
         "smartproxy"
      ]
   },
   "message":"success"
}

GET /v1/status

Retrieve the status of your API token, the number of queries remaining for your billing period, and your product name.

Query:

curl -H "Token: {{token}}" "https://api.checkip.com/v1/status"

Example Response:

{
  "code": 200,
  "data": {
    "product_name": "Trial",
    "credit_remaining": 10
  },
  "message": "success"
}