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": {},
    "generated_at": "2026-10-01T00:00:00+00:00"
}

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));

API response fields and lookup scope

The response describes the connection making the API call. A server-side call returns the calling server IP. No login or API key is required.

result
Indicates successful request processing.
ip
The current request IP observed by the server.
version
IPv4 or IPv6, based on the address format.
country_code
A two-letter country code when server-provided country data exists; otherwise null.
country_name
Names under ko, en and ja when country data exists; otherwise an empty object.
generated_at
The UTC generation time of the JSON response, in ISO 8601 format.

These fields describe JSON responses. XML omits generated_at and returns empty elements when country data is unavailable. Location lookup is a separate /api/geo/ request; the regular JSON endpoint does not perform an external GeoIP lookup. When the server sees only a private address, it returns HTTP 503 with result: false and ip: null. Use the homepage browser lookup on the same LAN. Use GET requests and avoid excessive polling.

What to check next