Skip to content

Return the incoming request's IP address.

GET
/ip

Responses

The incoming request's IP address
JSON
{
"origin": "string"
}

Samples

cURL
curl -X GET https://httpbin.rs/ip
JavaScript
fetch("https://httpbin.rs/ip")
  .then(response => response.json())
  .then(data => console.log(data));
PHP
file_get_contents("https://httpbin.rs/ip");
Python
import requests
response = requests.get("https://httpbin.rs/ip")
print(response.json())
Powered by VitePress OpenAPI