Skip to content

IP Analyzer

The /ip endpoint analyzes an IPv4 or IPv6 address and returns its type, class, binary representation, decimal value, and reverse DNS notation. If no address is provided, the client's own IP is analyzed.

Use Cases

Determine whether an IP is public or private, inspect the binary and decimal form of an address, generate the reverse DNS record for PTR lookups, or identify the address class for network planning.

Parameters

ParameterRequiredDescription
addressNoIPv4 or IPv6 address to analyze. Defaults to the client's IP.

Response Fields

FieldTypeDescription
ipstringThe analyzed IP address
version"IPv4" | "IPv6"IP protocol version
typestringAddress type: public, private, loopback, link-local, multicast, or broadcast
classstringIPv4 address class only: A, B, C, D, or E
rangestringCIDR range the address belongs to (IPv4 private/special ranges)
binarystringBinary representation of the address
decimalnumberDecimal representation (IPv4 only)
reversestringReverse DNS notation (.in-addr.arpa for IPv4, .ip6.arpa for IPv6)

Code Examples

curl -X GET \
  "https://api.sylvain.sh/v4/ip"

Try It

Error Handling

Error MessageDescription
Invalid IP address.The address parameter is not a valid IPv4 or IPv6 address