Ping API — /api/v1/ip/ping
Sends `count` ICMP echo requests and streams each round-trip time as an SSE event.
01 · OVERVIEW
What Ping does
Sends `count` ICMP echo requests and streams each round-trip time as an SSE event.
- Method GET
- Path /api/v1/ip/ping
- Stability STABLE
- Version v2026-05-15
- Summary ICMP ping a host and stream per-probe RTT (SSE).
02 · PARAMETERS
Request parameters
Pass these as query-string parameters (or, where indicated, in the request headers). Required params marked required.
- host (required) — string Hostname or IP.
- count — integer, default 10 Number of probes (max 30).
- timeout — integer, default 3000 Per-probe timeout in ms (max 10000).
- p6 — boolean, default false Use IPv6 (default IPv4).
03 · RESPONSE
Response schema
All successful responses follow the standard `{ success: true, data: {...} }` envelope. Notable fields on the data object for this endpoint:
- event: ping — SSE Per-probe result. `data: {seq, time, ttl, bytes}`.
- event: summary — SSE Final aggregate. `data: {sent, received, lossPct, minMs, avgMs, maxMs, jitterMs}`.
04 · EXAMPLE
Example response
Truncated but representative example for a real lookup:
{
"stream": [
"event: ping\ndata: {\"seq\": 1, \"time\": 12, \"ttl\": 117, \"bytes\": 64}\n\n",
"event: ping\ndata: {\"seq\": 2, \"time\": 11, \"ttl\": 117, \"bytes\": 64}\n\n",
"event: summary\ndata: {\"sent\": 4, \"received\": 4, \"lossPct\": 0, \"minMs\": 11, \"avgMs\": 12, \"maxMs\": 13, \"jitterMs\": 1}\n\n"
]
}05 · ERRORS
Error codes
Errors return HTTP status codes paired with stable machine-readable codes. Match on the code field rather than the human-readable message.
- 504 ALL_PROBES_LOST Every probe timed out — host likely down or ICMP blocked.
06 · BEST PRACTICES
Implementation tips
Patterns we recommend when integrating this endpoint:
- Use `count=4` for quick checks; bump to 10–20 for jitter analysis.
07 · FAQ
Frequently asked questions
- Why is RTT higher than `ping` from my laptop? Our probes originate from data-center networks, not your access ISP — paths differ.