Skip to content
Start here

Get Passive DNS by IP

client.intel.dns.list(DNSListParams { account_id, ipv4, page, 2 more } params, RequestOptionsoptions?): V4PagePagination<DNS { count, page, per_page, reverse_records } >
GET/accounts/{account_id}/intel/dns

Gets a list of all the domains that have resolved to a specific IP address.

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: DNSListParams { account_id, ipv4, page, 2 more }
account_id: string

Path param: Identifier.

maxLength32
ipv4?: string

Query param

page?: number

Query param: Requested page within paginated list of results.

per_page?: number

Query param: Maximum number of results requested.

start_end_params?: StartEndParams

Query param

end?: string

Defaults to the current date.

formatdate
start?: string

Defaults to 30 days before the end parameter value.

formatdate
ReturnsExpand Collapse
DNS { count, page, per_page, reverse_records }
count?: number

Total results returned based on your search parameters.

page?: number

Current page within paginated list of results.

per_page?: number

Number of results per page of results.

reverse_records?: Array<ReverseRecord>

Reverse DNS look-ups observed during the time period.

first_seen?: string

First seen date of the DNS record during the time period.

formatdate
hostname?: string

Hostname that the IP was observed resolving to.

last_seen?: string

Last seen date of the DNS record during the time period.

formatdate

Get Passive DNS by IP

import Cloudflare from 'cloudflare';

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

// Automatically fetches more pages as needed.
for await (const dns of client.intel.dns.list({ account_id: '023e105f4ecef8ad9ca31a8372d0c353' })) {
  console.log(dns.count);
}
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "reverse_records": [
      {
        "first_seen": "2021-04-01",
        "hostname": "hostname",
        "last_seen": "2021-04-30"
      }
    ]
  },
  "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"
      }
    }
  ],
  "success": true,
  "result": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "reverse_records": [
      {
        "first_seen": "2021-04-01",
        "hostname": "hostname",
        "last_seen": "2021-04-30"
      }
    ]
  },
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000
  }
}