ping6.net

API Documentation

Access our RESTful API to integrate IPv6 network diagnostic tools into your applications. All endpoints return JSON responses and support both IPv4 and IPv6.

Base URL
Bash
https://ping6.net/api/v1
HTTPS Only

All API requests must use HTTPS for secure communication.

CORS Enabled

Cross-origin requests are supported from any domain.

Authentication

Most endpoints are available without authentication. For higher rate limits and access to premium features, use an API key.

Anonymous

No authentication required. Subject to lower rate limits.

API Key

Include your API key in the X-API-Key header for higher rate limits.

Bash
curl -X GET "https://ping6.net/api/v1/ping/google.com" \
-H "X-API-Key: your-api-key-here"

Rate Limits

API requests are rate-limited to ensure fair usage and service availability.

TierRequestsNotes
Anonymous100 / minuteIP-based limiting. Shared across all anonymous users from the same IP.
API Key1,000 / minutePer API key. Contact us for higher limits.

Rate Limit Headers

X-RateLimit-LimitMaximum requests allowed per window
X-RateLimit-RemainingRemaining requests in current window
X-RateLimit-ResetUnix timestamp when the rate limit resets

Error Handling

The API uses conventional HTTP response codes to indicate success or failure.

CodeStatusDescription
400Bad RequestInvalid request parameters or malformed request body.
401UnauthorizedInvalid or missing API key for protected endpoints.
404Not FoundThe requested resource or endpoint does not exist.
429Too Many RequestsRate limit exceeded. Wait before making more requests.
500Internal Server ErrorServer error. Please try again later or contact support.
JSON
{
"error": {
"code": "INVALID_ADDRESS",
"message": "The provided address is not a valid IPv6 address",
"details": {
"address": "invalid-address"
}
}
}

API Endpoints

GET/myip
Get My IP Address
Returns the public IP address of the client making the request. Automatically detects whether the connection is IPv4 or IPv6.

Example Response

JSON
{
"ip": "2001:db8:85a3::8a2e:370:7334",
"version": 6,
"isIPv6": true
}

Code Examples

cURL
curl -X GET "https://ping6.net/api/v1/myip" \
-H "Accept: application/json"
GET/validate
Validate IPv6 Address
Validates an IPv6 address and returns detailed information about its format, type, and canonical representations.

Parameters

NameTypeInDescription
address*
stringqueryThe IPv6 address to validate

Example Response

JSON
{
"valid": true,
"type": "Documentation",
"compressed": "2001:db8::1",
"expanded": "2001:0db8:0000:0000:0000:0000:0000:0001"
}

Code Examples

cURL
curl -X GET "https://ping6.net/api/v1/validate?address=2001:db8::1" \
-H "Accept: application/json"
GET/dns/{hostname}
DNS Lookup
Query DNS records for a hostname using configurable DNS resolvers. Supports all common record types with special focus on AAAA records for IPv6.

Parameters

NameTypeInDescription
hostname*
stringpathThe hostname to query
type
enum: AAAA | A | MX | TXT | NS | CNAME | SOA | PTRqueryDNS record type to query(default: AAAA)
resolver
enum: cloudflare | google | quad9queryDNS resolver to use for the query(default: cloudflare)

Example Response

JSON
{
"hostname": "google.com",
"records": [
{
"type": "AAAA",
"value": "2607:f8b0:4004:800::200e",
"ttl": 300
}
],
"resolver": "cloudflare",
"queryTime": 23
}

Code Examples

cURL
curl -X GET "https://ping6.net/api/v1/dns/google.com?type=AAAA&resolver=cloudflare" \
-H "Accept: application/json"
GET/ping/{target}Beta
Ping Target
Send ICMP echo requests to an IPv6 address or hostname and receive latency statistics. Requires API key authentication.

Parameters

NameTypeInDescription
target*
stringpathIPv6 address or hostname to ping
count
stringqueryNumber of ping packets to send (1-10)(default: 4)

Example Response

JSON
{
"target": "2001:4860:4860::8888",
"ip": "2001:4860:4860::8888",
"results": [
{
"seq": 1,
"ttl": 117,
"rtt": 12.4
},
{
"seq": 2,
"ttl": 117,
"rtt": 11.8
},
{
"seq": 3,
"ttl": 117,
"rtt": 12.1
},
{
"seq": 4,
"ttl": 117,
"rtt": 11.9
}
],
"stats": {
"transmitted": 4,
"received": 4,
"loss": 0,
"min": 11.8,
"avg": 12.05,
"max": 12.4
}
}

Code Examples

cURL
curl -X GET "https://ping6.net/api/v1/ping/2001:4860:4860::8888?count=4" \
-H "Accept: application/json" \
-H "X-API-Key: your-api-key"
GET/traceroute/{target}Beta
Traceroute
Trace the network path to a destination, showing each hop along the route with latency information. Requires API key authentication.

Parameters

NameTypeInDescription
target*
stringpathIPv6 address or hostname to trace
maxHops
stringqueryMaximum number of hops to trace (1-64)(default: 30)

Example Response

JSON
{
"target": "google.com",
"ip": "2607:f8b0:4004:800::200e",
"hops": [
{
"hop": 1,
"ip": "2001:db8::1",
"hostname": "router.local",
"rtt": 1.2
},
{
"hop": 2,
"ip": "2001:db8:1::1",
"hostname": "isp-gateway.net",
"rtt": 5.4
},
{
"hop": 3,
"ip": "2607:f8b0:4004:800::200e",
"hostname": "google.com",
"rtt": 12.8
}
]
}

Code Examples

cURL
curl -X GET "https://ping6.net/api/v1/traceroute/google.com?maxHops=30" \
-H "Accept: application/json" \
-H "X-API-Key: your-api-key"