← Back to Home

IP Address

/ip
Returns the origin IP address of the incoming request. Shows your public IP address as seen by the server.

Examples

curl
curl https://tcpdata.com/ip
JavaScript (fetch)
fetch('https://tcpdata.com/ip')
  .then(res => res.json())
  .then(data => console.log('Your IP:', data.origin));
Python (requests)
import requests

response = requests.get('https://tcpdata.com/ip')
print(response.json())