API DOCUMENTATION

Get the current IP
with one request.

Check the public IP of the current request from a browser, server or monitoring tool.

Base endpoints

Use these GET endpoints without authentication. JSON and XML responses allow CORS for direct client-side requests.

PLAIN TEXThttps://myip.aicodelab.co.kr/api/ip/Try it ↗
JSONhttps://myip.aicodelab.co.kr/api/json/Try it ↗
XMLhttps://myip.aicodelab.co.kr/api/xml/Try it ↗

JSON response example

{
    "result": true,
    "ip": "203.0.113.10",
    "version": "IPv4",
    "country_code": null,
    "country_name": {}
}

When the server provides a Cloudflare country header or GeoIP module, country_code and country_name may also be populated.

Call from a browser

fetch('https://myip.aicodelab.co.kr/api/json/')
  .then(response => response.json())
  .then(data => console.log(data.ip));