메인 콘텐츠로 건너뛰기
GET
/
geolocate
호출자 위치 가져오기
curl --request GET \
  --url https://api.example.com/geolocate
{
  "ip": "<string>",
  "location": {
    "file_index": 123,
    "range_start_int": 123,
    "range_end_int": 123,
    "range_start_ip": "<string>",
    "range_end_ip": "<string>",
    "country_code": "<string>",
    "country_name": "<string>"
  },
  "allowed": false
}

쿼리 매개변수

ip
string | null

위치 정보를 조회할 IP 주소입니다. 지정하지 않으면 클라이언트 IP 주소가 기본값으로 사용됩니다. 위치 조회에 사용할 IP 주소입니다. 기본값은 클라이언트의 IP 주소입니다.

예시:

"1.2.3.4"

응답

성공적인 응답

ip
string
필수

최종적으로 확인된 IP 주소로, 디버깅에 유용합니다

location
Geolocation · object

IP 주소의 위치 정보. 확인할 수 없는 경우 None

allowed
boolean
기본값:false

해당 IP 주소를 추론(inference)에 사용할 수 있는지 여부