API
All endpoints return information for the requesting IP. No authentication required.
Rate limit
3 requests per 2 minutes per IP across all endpoints.
Returns full IP information as JSON.
Request
curl https://theip.xyz/api/json
Response
{
"ip": "8.8.8.8",
"version": 4,
"country": "United States",
"country_code": "US",
"organization": "Google LLC",
"asn": 15169,
"reverse_dns": "dns.google"
}
Returns the IP address as plain text. Useful for scripts.
Request
curl https://theip.xyz/api/text
Response
8.8.8.8
Returns full IP information as YAML.
Request
curl https://theip.xyz/api/yaml
Response
asn: 15169 country: United States country_code: US ip: 8.8.8.8 organization: Google LLC reverse_dns: dns.google version: 4
Errors
429
Rate limit exceeded — wait 2 minutes and retry.
400
Could not determine the requesting IP address.