Check My IP in JSON

JSON is the lingua franca of web APIs. This sandbox returns only a JSON object with your public IP — no HTML parsing required.

U-Star IP REST API Guide
curl https://www.u-star.org/api/ip

Live API Response Test Sandbox

Click the button above to see the JSON response from the API.

3-Line Summary

  • 1Get your public IP as clean JSON from a REST API call.
  • 2Production-ready Fetch and Axios examples for front-end stacks.
  • 3Learn how response fields can extend to location and country code.

Why JSON IP Responses Are Convenient

Scraping HTML pages requires regex and tag stripping. A JSON API returns `{ "ip": "1.2.3.4" }` so `data.ip` is enough — cutting integration time dramatically.

Fetch / Axios Integration Examples

**Modern JavaScript Fetch API:** ```javascript async function getMyIp() { try { const response = await fetch('https://www.u-star.org/api/ip'); const data = await response.json(); console.log('Your public IP:', data.ip); } catch (error) { console.error('Failed to load IP:', error); } } getMyIp(); ``` Paste this in the browser DevTools (F12) console to query the live API and print your public IP.

GOOGLE ADSENSE

Frequently Asked Questions (FAQ)

The API skips fonts, CSS, images, and large JavaScript bundles — only a tiny JSON payload travels over the network, so responses feel near-instant.
`fetch('/api/ip').then(res => res.json()).then(data => console.log(data.ip))` prints your public IP in the browser console.