API 문서

내아이피.kr의 무료 API를 사용하여 IP 정보를 프로그래밍 방식으로 조회하세요.

Rate Limit: IP당 분당 60회 요청 가능. 초과 시 HTTP 429 응답과 함께 Retry-After: 60 헤더가 반환됩니다. 응답에는 X-RateLimit-Limit, X-RateLimit-Remaining 헤더가 포함됩니다.
GET /Api/MyIp

요청자의 공인 IP 주소, 위치 정보, User-Agent 정보를 반환합니다.

응답 예시
{
  "ip": "203.0.113.1",
  "geo": {
    "country": "South Korea",
    "countryCode": "KR",
    "city": "Seoul",
    "regionName": "Seoul",
    "isp": "Korea Telecom",
    "org": "Korea Telecom",
    "as": "AS4766",
    "lat": 37.5665,
    "lon": 126.978,
    "timezone": "Asia/Seoul",
    "isProxy": false
  },
  "userAgent": {
    "browser": "Chrome",
    "browserVersion": "131.0.0.0",
    "os": "Windows 10/11",
    "deviceType": "Desktop"
  }
}
사용 예제
curl https://xn--220b31d95hq1c.kr/Api/MyIp
fetch('https://xn--220b31d95hq1c.kr/Api/MyIp')
  .then(res => res.json())
  .then(data => console.log(data.ip));
import requests
r = requests.get('https://xn--220b31d95hq1c.kr/Api/MyIp')
print(r.json()['ip'])
GET /Api/IpLookup?ip={ip}

지정한 IP 주소의 위치 정보를 조회합니다.

파라미터
파라미터타입필수설명
ipstring조회할 IP 주소 (IPv4 또는 IPv6)
응답 예시
{
  "success": true,
  "data": {
    "query": "8.8.8.8",
    "country": "United States",
    "countryCode": "US",
    "regionName": "Virginia",
    "city": "Ashburn",
    "isp": "Google LLC",
    "lat": 39.0438,
    "lon": -77.4874,
    "isProxy": false,
    "isHosting": true
  }
}
사용 예제
curl "https://xn--220b31d95hq1c.kr/Api/IpLookup?ip=8.8.8.8"
GET /Api/PortCheck?port={port}

요청자 IP의 지정 포트 열림 상태를 확인합니다. (자기 자신의 IP만 대상)

파라미터
파라미터타입필수설명
portint확인할 포트 번호 (1~65535, 위험 포트 차단)
응답 예시
{
  "success": true,
  "data": {
    "port": 80,
    "status": "Closed",
    "responseTime": 15
  }
}

Status: Open / Closed / Filtered / Blocked / RateLimit

GET /Api/DnsLookup

요청자 IP의 Reverse DNS 결과를 반환합니다.

응답 예시
{
  "success": true,
  "data": {
    "ip": "203.0.113.1",
    "reverseDns": "host-203-0-113-1.example.com"
  }
}
외부 위젯

아래 코드를 웹페이지에 삽입하면 방문자의 IP 주소를 표시할 수 있습니다.

<div id="myip-widget"></div>
<script src="https://xn--220b31d95hq1c.kr/js/widget.js"></script>