Skip to content
Start here

Get IP Overview

client.intel.ips.get(IPGetParams { account_id, ipv4, ipv6 } params, RequestOptionsoptions?): IPGetResponse | null
GET/accounts/{account_id}/intel/ip

Gets the geolocation, ASN, infrastructure type of the ASN, and any security threat categories of an IP address. Must provide ip query parameters. For example, /intel/ip?ipv4=1.1.1.1 or /intel/ip?ipv6=2001:db8::1.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Intel WriteIntel Read
ParametersExpand Collapse
params: IPGetParams { account_id, ipv4, ipv6 }
account_id: string

Path param: Identifier.

maxLength32
ipv4?: string

Query param

ipv6?: string

Query param

ReturnsExpand Collapse
IPGetResponse = Array<IP { belongs_to_ref, ip, risk_types } > | null
belongs_to_ref?: BelongsToRef { id, country, description, 2 more }

Specifies a reference to the autonomous systems (AS) that the IP address belongs to.

id?: string
country?: string
description?: string
type?: "hosting_provider" | "isp" | "organization"

Infrastructure type of this ASN.

One of the following:
"hosting_provider"
"isp"
"organization"
value?: string
ip?: string
formatipv4
risk_types?: Array<RiskType>
id?: number
name?: string
super_category_id?: number

Get IP Overview

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

const ips = await client.intel.ips.get({ account_id: '023e105f4ecef8ad9ca31a8372d0c353' });

console.log(ips);
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "belongs_to_ref": {
        "id": "autonomous-system--2fa28d71-3549-5a38-af05-770b79ad6ea8",
        "country": "US",
        "description": "CLOUDFLARENET",
        "type": "hosting_provider",
        "value": "value"
      },
      "ip": "192.0.2.0",
      "risk_types": [
        {
          "id": 131,
          "name": "Phishing",
          "super_category_id": 21
        }
      ]
    }
  ],
  "success": true,
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "belongs_to_ref": {
        "id": "autonomous-system--2fa28d71-3549-5a38-af05-770b79ad6ea8",
        "country": "US",
        "description": "CLOUDFLARENET",
        "type": "hosting_provider",
        "value": "value"
      },
      "ip": "192.0.2.0",
      "risk_types": [
        {
          "id": 131,
          "name": "Phishing",
          "super_category_id": 21
        }
      ]
    }
  ],
  "success": true,
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000
  }
}