---
title: Traceroutes
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/python)

[Diagnostics](https://developers.cloudflare.com/api/python/resources/diagnostics)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Traceroutes

##### [Traceroute](https://developers.cloudflare.com/api/python/resources/diagnostics/subresources/traceroutes/methods/create)

diagnostics.traceroutes.create(TracerouteCreateParams\*\*kwargs) -> SyncSinglePage\[[Traceroute](<https://developers.cloudflare.com/api/python/resources/diagnostics#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)>)]

POST/accounts/{account\_id}/diagnostics/traceroute

##### ModelsExpand Collapse

<details>

<summary>

class Traceroute: …

</summary>

<details>

<summary>

colos: Optional\[List\[Colo]]

</summary>

<details>

<summary>

colo: Optional\[ColoColo]

</summary>

city: Optional\[str]

Source colo city.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20colo%20%3E%20(property)%20city">Link to this property</a>

name: Optional\[str]

Source colo name.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20colo%20%3E%20(property)%20name">Link to this property</a>

</details>

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20colo">Link to this property</a>

<details>

<summary>

error: Optional\[Literal\["", "Could not gather traceroute data: Code 1", "Could not gather traceroute data: Code 2", 2 more]]

Errors resulting from collecting traceroute from colo to target.

</summary>

One of the following:

""

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20error%20%3E%20(member)%200">Link to this property</a>

"Could not gather traceroute data: Code 1"

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20error%20%3E%20(member)%201">Link to this property</a>

"Could not gather traceroute data: Code 2"

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20error%20%3E%20(member)%202">Link to this property</a>

"Could not gather traceroute data: Code 3"

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20error%20%3E%20(member)%203">Link to this property</a>

"Could not gather traceroute data: Code 4"

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20error%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20error">Link to this property</a>

<details>

<summary>

hops: Optional\[List\[ColoHop]]

</summary>

<details>

<summary>

nodes: Optional\[List\[ColoHopNode]]

An array of node objects.

</summary>

asn: Optional\[str]

AS number associated with the node object.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20nodes%20%3E%20(items)%20%3E%20(property)%20asn">Link to this property</a>

ip: Optional\[str]

IP address of the node.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20nodes%20%3E%20(items)%20%3E%20(property)%20ip">Link to this property</a>

labels: Optional\[List\[str]]

Field appears if there is an additional annotation printed when the probe returns. Field also appears when running a GRE+ICMP traceroute to denote which traceroute a node comes from.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20nodes%20%3E%20(items)%20%3E%20(property)%20labels">Link to this property</a>

max\_rtt\_ms: Optional\[float]

Maximum RTT in ms.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20nodes%20%3E%20(items)%20%3E%20(property)%20max_rtt_ms">Link to this property</a>

mean\_rtt\_ms: Optional\[float]

Mean RTT in ms.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20nodes%20%3E%20(items)%20%3E%20(property)%20mean_rtt_ms">Link to this property</a>

min\_rtt\_ms: Optional\[float]

Minimum RTT in ms.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20nodes%20%3E%20(items)%20%3E%20(property)%20min_rtt_ms">Link to this property</a>

name: Optional\[str]

Host name of the address, this may be the same as the IP address.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20nodes%20%3E%20(items)%20%3E%20(property)%20name">Link to this property</a>

packet\_count: Optional\[int]

Number of packets with a response from this node.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20nodes%20%3E%20(items)%20%3E%20(property)%20packet_count">Link to this property</a>

std\_dev\_rtt\_ms: Optional\[float]

Standard deviation of the RTTs in ms.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20nodes%20%3E%20(items)%20%3E%20(property)%20std_dev_rtt_ms">Link to this property</a>

</details>

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20nodes">Link to this property</a>

packets\_lost: Optional\[int]

Number of packets where no response was received.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20packets_lost">Link to this property</a>

packets\_sent: Optional\[int]

Number of packets sent with specified TTL.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20packets_sent">Link to this property</a>

packets\_ttl: Optional\[int]

The time to live (TTL).

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20packets_ttl">Link to this property</a>

</details>

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops">Link to this property</a>

target\_summary: Optional\[object]

Aggregated statistics from all hops about the target.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20target_summary">Link to this property</a>

traceroute\_time\_ms: Optional\[int]

Total time of traceroute in ms.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20traceroute_time_ms">Link to this property</a>

</details>

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos">Link to this property</a>

target: Optional\[str]

The target hostname, IPv6, or IPv6 address.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20target">Link to this property</a>

</details>

[Link to this property](<#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)>)