/raw
Shell scripts, cron jobs and piping into other commands.
- Content-Type
- text/plain; charset=utf-8
Example response
203.0.113.42Free IP API
A free, no-key API for your public IP address. Call it from shell scripts, monitoring dashboards, CI pipelines or any app, and pick the format that fits.
$ curl https://tracethatip.com/json Open /json Live output for your connection. Switch format with the tabs above.
Endpoints
Send a GET request and get back the public IP address it came from. No API key or sign-up needed. Every endpoint is CORS-enabled and rate-limited for fair use.
Shell scripts, cron jobs and piping into other commands.
Example response
203.0.113.42Web apps, dashboards, REST integrations and CI pipelines.
Example response
{"ip":"203.0.113.42"}Enterprise tooling, SOAP services and legacy integrations.
Example response
<?xml version="1.0" encoding="UTF-8"?>
<response>
<ip>203.0.113.42</ip>
</response>DevOps tooling and configuration files.
Example response
ip: "203.0.113.42"Fair use. Requests are rate-limited so the service stays fast for everyone. If a script checks your IP on a schedule, once every few minutes is plenty. See the Terms of Service for details.
Integration
Copy-paste snippets for the tools you already use. The raw endpoint is ideal for piping into other commands; use /json when you want structured data.
# Plain text: just the address
curl -s https://tracethatip.com/raw
# JSON
curl -s https://tracethatip.com/json
# Store it in a variable (Bash)
MY_IP=$(curl -s https://tracethatip.com/raw) && echo "My IP: $MY_IP"The -s flag hides the progress meter so only your IP is printed, which makes it easy to use in firewall rules, DNS updates or deployment scripts.
Formats
Different applications and workflows need IP data in different shapes. Pick the one that fits, whether you're building a dashboard, writing a deployment script or wiring IP detection into a web app.
The most widely used format for web APIs and JavaScript apps. Lightweight, human-readable and natively supported by every modern language, it suits REST integrations, frontends and data pipelines.
/jsonA structured markup format common in enterprise environments, SOAP web services and legacy integrations, with strict schema validation and tools like XSLT for transformation.
/xmlA human-friendly format popular in DevOps tooling such as Kubernetes configs, Ansible playbooks and CI/CD pipelines. Its clean syntax makes it easy to drop IP data into config files.
/yamlThe simplest option: just the raw IP string with no wrapper. Perfect for shell scripts, command-line tools and automation where you pipe the result straight into another command.
/rawBuilt for developers
TraceThatIP is designed to slot into your existing workflow, whether you're building a SaaS app, managing infrastructure or doing security research.
The format endpoints return only your IP address, with no geolocation lookup and no HTML, so responses are tiny and quick.
JSON, XML, YAML and plain text outputs to fit any integration requirement.
Every endpoint sends Access-Control-Allow-Origin: *, so you can call it straight from browser JavaScript.
The site's own geolocation API is secured with encrypted tokens to prevent unauthorised automated access, while these endpoints stay open and rate-limited.
We respect your privacy: IP lookups are not logged for marketing. See our Privacy Policy
/raw, /json, /xml and /yaml endpoints are free, with no API key or sign-up required. Send a GET request and you get your public IP back./raw for shell scripts and cron jobs, /json for applications, dashboards and CI pipelines, /xml for XML-based tooling and /yaml for configuration files. They all return the same address.Access-Control-Allow-Origin: *, so a plain fetch() from any web page works without a proxy.192.168.1.20. The API sees the public IP your router (or VPN) uses on the internet, the same one shown on What's My IP.Keep exploring
Geolocation, ISP, ASN and timezone for any IP address, pinned on an interactive map.
Open toolYour public IP address, location and ISP the moment the page loads. Copy it in one click.
Open toolQuery live DNS records for any domain to verify mail, SPF, DKIM and nameserver setup.
Open tool