Skip to main content

Traceroute

pro
GET/v1/network/traceroute

Performs real ICMP traceroute from up to 18 geographically distributed cloud regions via the Globalping network. Returns hop-by-hop path data with router IPs, hostnames, per-hop RTT, median end-to-end latency, and average hop count from AWS, GCP, or Azure datacenters. Identify routing asymmetries, peering points, and network bottlenecks across regions.

What It Does

Creates ICMP traceroute measurements via the Globalping network from cloud provider regions (AWS, GCP, Azure). Returns real hop-by-hop path data including router IP addresses, reverse DNS hostnames, per-hop round-trip times, and destination reachability status. Computes median end-to-end latency and average hop count across zones. Note: Internet routing is asymmetric (RFC 792) — forward and reverse paths often differ, and ICMP rate limiting at intermediate hops may show timeouts that don't indicate actual packet loss.

Why It's Useful

Traceroute reveals the actual network path between cloud regions and your service, exposing routing inefficiencies, peering bottlenecks, and geographic detours invisible to simple latency testing. Essential for debugging regional performance issues, verifying CDN edge routing, identifying ISP congestion points, and understanding how traffic traverses autonomous systems. Compare paths from multiple regions simultaneously to detect routing asymmetries.

Use Cases

Network Engineer

Regional Routing Analysis

Analyze routing paths from all major regions to identify suboptimal routes, unexpected geographic detours (e.g., Asia traffic routing through US), or missing peering. Compare AS paths to detect hot-potato routing issues.

Pinpoint regional routing inefficiencies and negotiate peering improvements with data.

DevOps Engineer

CDN & Anycast Path Verification

Verify that your CDN or anycast deployment correctly routes traffic from each region to the nearest edge location. Detect cases where routing bypasses nearby PoPs.

Confirm CDN edge locality across all geographic regions with traceroute evidence.

SRE

Latency Root Cause Analysis

When users in a specific region report high latency, trace the route from that region to identify the exact hop where latency spikes — whether it's a congested peering point, an ISP backbone, or a last-mile issue.

Isolate network-level bottlenecks to the specific hop, ISP, or peering exchange causing the problem.

Parameters

NameTypeRequiredDescription
hoststringRequiredTarget hostname or IP address to tracerouteExample: example.com
providerstringOptionalCloud provider for region filtering: "aws", "gcp", or "azure". Defaults to "gcp".Example: aws
regionstringOptionalCloud provider region code. When combined with provider, traceroutes from the nearest probe zone for that region.Example: us-east-1
zonesstringOptionalComma-separated probe zone IDs (e.g., us-east,eu-west,ap-northeast). Use /ping/locations to see available zones.Example: us-east,eu-west
geographystringOptionalFilter by geography: North America, South America, Europe, Asia Pacific, Oceania, Middle East, AfricaExample: Europe

Response Fields

FieldTypeDescription
hoststringThe target host that was traced
trace_methodstringTrace method: "icmp"
resultsarrayPer-zone traceroute results with hop-by-hop data, latency, and probe network info
results[].hopsarrayHop-by-hop data: hop_number, hostname, ip_address, timings (RTT array), avg_rtt, is_destination
results[].total_hopsnumberTotal number of hops in the trace
results[].total_latency_msnumberEnd-to-end latency (last hop RTT)
results[].reached_destinationbooleanWhether the trace reached the target destination
results[].resolved_addressstringResolved IP address of the target
results[].probe_networkstringNetwork name of the probe (e.g., "Amazon.com", "Google")
results[].probe_asnnumberASN of the probe network
zones_testednumberNumber of probe zones tested
successfulnumberNumber of zones that reached the destination
failednumberNumber of zones that failed to reach the destination
avg_latency_msnumberMean end-to-end latency across all successful zones
median_latency_msnumberMedian (p50) end-to-end latency across zones
avg_hopsnumberAverage hop count across successful traces
min_latencyobjectZone with lowest end-to-end latency (zone, city, latency_ms)
max_latencyobjectZone with highest end-to-end latency (zone, city, latency_ms)
available_zonesobjectAvailable probe zones grouped by geography
available_providersobjectCount of regions per cloud provider (aws, gcp, azure)

Code Examples

cURL
curl "https://api.edgedns.dev/v1/network/traceroute" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d "host=example.com"
JavaScript
const response = await fetch(
  'https://api.edgedns.dev/v1/network/traceroute?host=example.com',
  {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  }
);

const data = await response.json();
console.log(data);
Python
import requests

response = requests.get(
    'https://api.edgedns.dev/v1/network/traceroute',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    params={
    'host': 'example.com'
    }
)

data = response.json()
print(data)

Read the full Traceroute guide

Why it matters, real-world use cases, parameters, response fields, and how to call it from Claude, ChatGPT, or Gemini via MCP.

Read the guide →

Related Endpoints

External References

Learn more about the standards and protocols behind this endpoint.

Try This Endpoint

Test the Traceroute endpoint live in the playground.