# Entities ## Get IP address details `client.radar.entities.get(EntityGetParamsquery, RequestOptionsoptions?): EntityGetResponse` **get** `/radar/entities/ip` Retrieves IP address information. ### Parameters - `query: EntityGetParams` - `ip: string` IP address. - `format?: "JSON" | "CSV"` Format in which results will be returned. - `"JSON"` - `"CSV"` ### Returns - `EntityGetResponse` - `ip: IP` - `asn: string` - `asnLocation: string` - `asnName: string` - `asnOrgName: string` - `ip: string` - `ipVersion: string` - `location: string` - `locationName: string` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const entity = await client.radar.entities.get({ ip: '8.8.8.8' }); console.log(entity.ip); ``` #### Response ```json { "result": { "ip": { "asn": "15169", "asnLocation": "US", "asnName": "GOOGLE", "asnOrgName": "Google LLC", "ip": "8.8.8.8", "ipVersion": "IPv4", "location": "GB", "locationName": "United Kingdom" } }, "success": true } ``` ## Domain Types ### Entity Get Response - `EntityGetResponse` - `ip: IP` - `asn: string` - `asnLocation: string` - `asnName: string` - `asnOrgName: string` - `ip: string` - `ipVersion: string` - `location: string` - `locationName: string` # ASNs ## List autonomous systems `client.radar.entities.asns.list(ASNListParamsquery?, RequestOptionsoptions?): ASNListResponse` **get** `/radar/entities/asns` Retrieves a list of autonomous systems. ### Parameters - `query: ASNListParams` - `asn?: string` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. - `format?: "JSON" | "CSV"` Format in which results will be returned. - `"JSON"` - `"CSV"` - `limit?: number` Limits the number of objects returned in the response. - `location?: string` Filters results by location. Specify an alpha-2 location code. - `offset?: number` Skips the specified number of objects before fetching the results. - `orderBy?: "ASN" | "POPULATION"` Specifies the metric to order the ASNs by. - `"ASN"` - `"POPULATION"` ### Returns - `ASNListResponse` - `asns: Array` - `asn: number` - `country: string` - `countryName: string` - `name: string` - `aka?: string` - `orgName?: string` - `website?: string` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const asns = await client.radar.entities.asns.list(); console.log(asns.asns); ``` #### Response ```json { "result": { "asns": [ { "asn": 714, "country": "GB", "countryName": "United Kingdom", "name": "Apple Inc.", "aka": "aka", "orgName": "orgName", "website": "https://www.apple.com/support/systemstatus/" } ] }, "success": true } ``` ## Get AS details by ASN `client.radar.entities.asns.get(numberasn, ASNGetParamsquery?, RequestOptionsoptions?): ASNGetResponse` **get** `/radar/entities/asns/{asn}` Retrieves the requested autonomous system information. (A confidence level below `5` indicates a low level of confidence in the traffic data - normally this happens because Cloudflare has a small amount of traffic from/to this AS). Population estimates come from APNIC (refer to https://labs.apnic.net/?p=526). ### Parameters - `asn: number` Single Autonomous System Number (ASN) as integer. - `query: ASNGetParams` - `format?: "JSON" | "CSV"` Format in which results will be returned. - `"JSON"` - `"CSV"` ### Returns - `ASNGetResponse` - `asn: ASN` - `asn: number` - `confidenceLevel: number` - `country: string` - `countryName: string` - `estimatedUsers: EstimatedUsers` - `locations: Array` - `locationAlpha2: string` - `locationName: string` - `estimatedUsers?: number` Estimated users per location. - `estimatedUsers?: number` Total estimated users. - `name: string` - `orgName: string` - `related: Array` - `asn: number` - `name: string` - `aka?: string` - `estimatedUsers?: number` Total estimated users. - `source: string` Regional Internet Registry. - `website: string` - `aka?: string` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const asn = await client.radar.entities.asns.get(174); console.log(asn.asn); ``` #### Response ```json { "result": { "asn": { "asn": 714, "confidenceLevel": 5, "country": "GB", "countryName": "United Kingdom", "estimatedUsers": { "locations": [ { "locationAlpha2": "US", "locationName": "United States", "estimatedUsers": 16710 } ], "estimatedUsers": 86099 }, "name": "Apple Inc.", "orgName": "orgName", "related": [ { "asn": 174, "name": "Cogent-174", "aka": "aka", "estimatedUsers": 65345 } ], "source": "RIPE", "website": "https://www.apple.com/support/systemstatus/", "aka": "aka" } }, "success": true } ``` ## Get AS-level relationships by ASN `client.radar.entities.asns.rel(numberasn, ASNRelParamsquery?, RequestOptionsoptions?): ASNRelResponse` **get** `/radar/entities/asns/{asn}/rel` Retrieves AS-level relationship for given networks. ### Parameters - `asn: number` Retrieves all ASNs with provider-customer or peering relationships with the given ASN. - `query: ASNRelParams` - `asn2?: number` Retrieves the AS relationship of ASN2 with respect to the given ASN. - `format?: "JSON" | "CSV"` Format in which results will be returned. - `"JSON"` - `"CSV"` ### Returns - `ASNRelResponse` - `meta: Meta` - `data_time: string` - `query_time: string` - `total_peers: number` - `rels: Array` - `asn1: number` - `asn1_country: string` - `asn1_name: string` - `asn2: number` - `asn2_country: string` - `asn2_name: string` - `rel: string` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.radar.entities.asns.rel(3); console.log(response.meta); ``` #### Response ```json { "result": { "meta": { "data_time": "data_time", "query_time": "query_time", "total_peers": 0 }, "rels": [ { "asn1": 0, "asn1_country": "asn1_country", "asn1_name": "asn1_name", "asn2": 0, "asn2_country": "asn2_country", "asn2_name": "asn2_name", "rel": "rel" } ] }, "success": true } ``` ## Get IRR AS-SETs that an AS is a member of `client.radar.entities.asns.asSet(numberasn, ASNAsSetParamsquery?, RequestOptionsoptions?): ASNAsSetResponse` **get** `/radar/entities/asns/{asn}/as_set` Retrieves Internet Routing Registry AS-SETs that an AS is a member of. ### Parameters - `asn: number` Retrieves all AS-SETs that the given AS is a member of. - `query: ASNAsSetParams` - `format?: "JSON" | "CSV"` Format in which results will be returned. - `"JSON"` - `"CSV"` ### Returns - `ASNAsSetResponse` - `as_sets: Array` - `as_members_count: number` The number of AS members in the AS-SET - `as_set_members_count: number` The number of AS-SET members in the AS-SET - `as_set_upstreams_count: number` The number of recursive upstream AS-SETs - `asn_cone_size: number` The number of unique ASNs in the AS-SETs recursive downstream - `irr_sources: Array` The IRR sources of the AS-SET - `name: string` The name of the AS-SET - `hierarchical_asn?: number` The AS number following hierarchical AS-SET name - `inferred_asn?: number` The inferred AS number of the AS-SET - `peeringdb_asn?: number` The AS number matching PeeringDB record - `paths: Array>` Paths from the AS-SET that include the given AS to its upstreams recursively ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.radar.entities.asns.asSet(3); console.log(response.as_sets); ``` #### Response ```json { "result": { "as_sets": [ { "as_members_count": 0, "as_set_members_count": 0, "as_set_upstreams_count": 0, "asn_cone_size": 0, "irr_sources": [ "string" ], "name": "name", "hierarchical_asn": 0, "inferred_asn": 0, "peeringdb_asn": 0 } ], "paths": [ [ "string" ] ] }, "success": true } ``` ## Get AS details by IP address `client.radar.entities.asns.ip(ASNIPParamsquery, RequestOptionsoptions?): ASNIPResponse` **get** `/radar/entities/asns/ip` Retrieves the requested autonomous system information based on IP address. Population estimates come from APNIC (refer to https://labs.apnic.net/?p=526). ### Parameters - `query: ASNIPParams` - `ip: string` IP address. - `format?: "JSON" | "CSV"` Format in which results will be returned. - `"JSON"` - `"CSV"` ### Returns - `ASNIPResponse` - `asn: ASN` - `asn: number` - `country: string` - `countryName: string` - `estimatedUsers: EstimatedUsers` - `locations: Array` - `locationAlpha2: string` - `locationName: string` - `estimatedUsers?: number` Estimated users per location. - `estimatedUsers?: number` Total estimated users. - `name: string` - `orgName: string` - `related: Array` - `asn: number` - `name: string` - `aka?: string` - `estimatedUsers?: number` Total estimated users. - `source: string` Regional Internet Registry. - `website: string` - `aka?: string` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.radar.entities.asns.ip({ ip: '8.8.8.8' }); console.log(response.asn); ``` #### Response ```json { "result": { "asn": { "asn": 714, "country": "GB", "countryName": "United Kingdom", "estimatedUsers": { "locations": [ { "locationAlpha2": "US", "locationName": "United States", "estimatedUsers": 16710 } ], "estimatedUsers": 86099 }, "name": "Apple Inc.", "orgName": "orgName", "related": [ { "asn": 0, "name": "name", "aka": "aka", "estimatedUsers": 65345 } ], "source": "RIPE", "website": "https://www.apple.com/support/systemstatus/", "aka": "aka" } }, "success": true } ``` ## Get AS rankings by botnet threat feed activity `client.radar.entities.asns.botnetThreatFeed(ASNBotnetThreatFeedParamsquery?, RequestOptionsoptions?): ASNBotnetThreatFeedResponse` **get** `/radar/entities/asns/botnet_threat_feed` Retrieves a ranked list of Autonomous Systems based on their presence in the Cloudflare Botnet Threat Feed. Rankings can be sorted by offense count or number of bad IPs. Optionally compare to a previous date to see rank changes. ### Parameters - `query: ASNBotnetThreatFeedParams` - `asn?: Array` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `compareDateRange?: string` Relative date range for rank change comparison (e.g., "1d", "7d", "30d"). - `date?: string` The date to retrieve (YYYY-MM-DD format). If not specified, returns the most recent available data. Note: This is the date the report was generated. The report is generated from information collected from the previous day (e.g., the 2026-02-23 entry contains data from 2026-02-22). - `format?: "JSON" | "CSV"` Format in which results will be returned. - `"JSON"` - `"CSV"` - `limit?: number` Limits the number of objects returned in the response. - `location?: string` Filters results by location. Specify an alpha-2 location code. - `metric?: "OFFENSE_COUNT" | "NUMBER_OF_OFFENDING_IPS"` Metric to rank ASNs by. - `"OFFENSE_COUNT"` - `"NUMBER_OF_OFFENDING_IPS"` - `offset?: number` Skips the specified number of objects before fetching the results. - `sortOrder?: "ASC" | "DESC"` Sort order. - `"ASC"` - `"DESC"` ### Returns - `ASNBotnetThreatFeedResponse` - `ases: Array` - `asn: number` - `country: string` - `name: string` - `rank: number` - `rankChange?: number` - `meta: Meta` - `date: string` - `total: number` - `compareDate?: string` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.radar.entities.asns.botnetThreatFeed(); console.log(response.ases); ``` #### Response ```json { "result": { "ases": [ { "asn": 4134, "country": "CN", "name": "CHINANET-BACKBONE", "rank": 1, "rankChange": -2 } ], "meta": { "date": "2026-02-04", "total": 50, "compareDate": "2026-01-28" } }, "success": true } ``` ## Domain Types ### ASN List Response - `ASNListResponse` - `asns: Array` - `asn: number` - `country: string` - `countryName: string` - `name: string` - `aka?: string` - `orgName?: string` - `website?: string` ### ASN Get Response - `ASNGetResponse` - `asn: ASN` - `asn: number` - `confidenceLevel: number` - `country: string` - `countryName: string` - `estimatedUsers: EstimatedUsers` - `locations: Array` - `locationAlpha2: string` - `locationName: string` - `estimatedUsers?: number` Estimated users per location. - `estimatedUsers?: number` Total estimated users. - `name: string` - `orgName: string` - `related: Array` - `asn: number` - `name: string` - `aka?: string` - `estimatedUsers?: number` Total estimated users. - `source: string` Regional Internet Registry. - `website: string` - `aka?: string` ### ASN Rel Response - `ASNRelResponse` - `meta: Meta` - `data_time: string` - `query_time: string` - `total_peers: number` - `rels: Array` - `asn1: number` - `asn1_country: string` - `asn1_name: string` - `asn2: number` - `asn2_country: string` - `asn2_name: string` - `rel: string` ### ASN As Set Response - `ASNAsSetResponse` - `as_sets: Array` - `as_members_count: number` The number of AS members in the AS-SET - `as_set_members_count: number` The number of AS-SET members in the AS-SET - `as_set_upstreams_count: number` The number of recursive upstream AS-SETs - `asn_cone_size: number` The number of unique ASNs in the AS-SETs recursive downstream - `irr_sources: Array` The IRR sources of the AS-SET - `name: string` The name of the AS-SET - `hierarchical_asn?: number` The AS number following hierarchical AS-SET name - `inferred_asn?: number` The inferred AS number of the AS-SET - `peeringdb_asn?: number` The AS number matching PeeringDB record - `paths: Array>` Paths from the AS-SET that include the given AS to its upstreams recursively ### ASN IP Response - `ASNIPResponse` - `asn: ASN` - `asn: number` - `country: string` - `countryName: string` - `estimatedUsers: EstimatedUsers` - `locations: Array` - `locationAlpha2: string` - `locationName: string` - `estimatedUsers?: number` Estimated users per location. - `estimatedUsers?: number` Total estimated users. - `name: string` - `orgName: string` - `related: Array` - `asn: number` - `name: string` - `aka?: string` - `estimatedUsers?: number` Total estimated users. - `source: string` Regional Internet Registry. - `website: string` - `aka?: string` ### ASN Botnet Threat Feed Response - `ASNBotnetThreatFeedResponse` - `ases: Array` - `asn: number` - `country: string` - `name: string` - `rank: number` - `rankChange?: number` - `meta: Meta` - `date: string` - `total: number` - `compareDate?: string` # Locations ## List locations `client.radar.entities.locations.list(LocationListParamsquery?, RequestOptionsoptions?): LocationListResponse` **get** `/radar/entities/locations` Retrieves a list of locations. ### Parameters - `query: LocationListParams` - `continent?: "AF" | "AS" | "EU" | 3 more` Filters results by continent code. - `"AF"` - `"AS"` - `"EU"` - `"NA"` - `"OC"` - `"SA"` - `format?: "JSON" | "CSV"` Format in which results will be returned. - `"JSON"` - `"CSV"` - `limit?: number` Limits the number of objects returned in the response. - `location?: string` Filters results by location. Specify a comma-separated list of alpha-2 location codes. - `offset?: number` Skips the specified number of objects before fetching the results. - `region?: string` Filters results by region. - `subregion?: string` Filters results by subregion. ### Returns - `LocationListResponse` - `locations: Array` - `alpha2: string` - `continent: string` - `latitude: string` A numeric string. - `longitude: string` A numeric string. - `name: string` - `region: string` - `subregion: string` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const locations = await client.radar.entities.locations.list(); console.log(locations.locations); ``` #### Response ```json { "result": { "locations": [ { "alpha2": "AF", "continent": "AS", "latitude": "10", "longitude": "10", "name": "Afghanistan", "region": "Middle East", "subregion": "Southern Asia" } ] }, "success": true } ``` ## Get location details `client.radar.entities.locations.get(stringlocation, LocationGetParamsquery?, RequestOptionsoptions?): LocationGetResponse` **get** `/radar/entities/locations/{location}` Retrieves the requested location information. (A confidence level below `5` indicates a low level of confidence in the traffic data - normally this happens because Cloudflare has a small amount of traffic from/to this location). ### Parameters - `location: string` Location alpha-2 code. - `query: LocationGetParams` - `format?: "JSON" | "CSV"` Format in which results will be returned. - `"JSON"` - `"CSV"` ### Returns - `LocationGetResponse` - `location: Location` - `alpha2: string` - `confidenceLevel: number` - `continent: string` - `latitude: string` A numeric string. - `longitude: string` A numeric string. - `name: string` - `region: string` - `subregion: string` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const location = await client.radar.entities.locations.get('US'); console.log(location.location); ``` #### Response ```json { "result": { "location": { "alpha2": "AF", "confidenceLevel": 5, "continent": "AS", "latitude": "10", "longitude": "10", "name": "Afghanistan", "region": "Middle East", "subregion": "Southern Asia" } }, "success": true } ``` ## Domain Types ### Location List Response - `LocationListResponse` - `locations: Array` - `alpha2: string` - `continent: string` - `latitude: string` A numeric string. - `longitude: string` A numeric string. - `name: string` - `region: string` - `subregion: string` ### Location Get Response - `LocationGetResponse` - `location: Location` - `alpha2: string` - `confidenceLevel: number` - `continent: string` - `latitude: string` A numeric string. - `longitude: string` A numeric string. - `name: string` - `region: string` - `subregion: string`