# IP 변경 이력 조회



도메인에 대한 IP 주소 변경 이력 정보를 조회합니다.



인증: Authorization: Bearer $APICK_API_KEY

본문 있는 REST 요청: multipart/form-data. GET 본문 및 MCP JSON-RPC 규격은 해당 명세를 따릅니다.

인증키는 서버에 보관하세요. 모든 예제는 정적 자료입니다.



## POST /rest/ip_history 응답 필드

- `data` (object): 조회 데이터

- `data.records` (array): 이력 목록

- `data.records[].ip` (string): IP 주소

- `data.records[].location` (string): 위치 정보

- `data.records[].owner` (string): ISP

- `data.records[].lastseen` (string): 업데이트 일자

- `data.success` (integer): 과금 여부0: 실패1: 성공3: 실패(timeout)

- `api` (object): API 호출 공통 데이터

- `api.success` (boolean): API 서버 정상 응답 여부

- `api.cost` (integer): API 호출 요금

- `api.pl_id` (integer): API 결제 로그 ID

- `api.ms` (integer): API 응답 시간

## API 요청: POST /rest/ip_history



### 입력

- `domain` (string, 필수): 검색할 도메인 (예: apick.app)



### 응답 명세

```json

{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "records": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "ip": {
                "type": "string",
                "description": "IP 주소"
              },
              "location": {
                "type": "string",
                "description": "위치 정보"
              },
              "owner": {
                "type": "string",
                "description": "ISP"
              },
              "lastseen": {
                "type": "string",
                "description": "업데이트 일자"
              }
            }
          },
          "description": "이력 목록"
        },
        "success": {
          "type": "integer",
          "description": "과금 여부0: 실패1: 성공3: 실패(timeout)"
        }
      },
      "description": "조회 데이터"
    },
    "api": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "API 서버 정상 응답 여부"
        },
        "cost": {
          "type": "integer",
          "description": "API 호출 요금"
        },
        "pl_id": {
          "type": "integer",
          "description": "API 결제 로그 ID"
        },
        "ms": {
          "type": "integer",
          "description": "API 응답 시간"
        }
      },
      "description": "API 호출 공통 데이터"
    }
  }
}

```

### 정적 응답 예시

```json

{
  "data": {
    "records": [
      {
        "ip": "121.140.146.38",
        "location": "Geumcheon-gu - South Korea",
        "owner": "Korea Telecom",
        "lastseen": "2023-12-31"
      },
      {
        "ip": "121.140.146.133",
        "location": "Geumcheon-gu - South Korea",
        "owner": "Korea Telecom",
        "lastseen": "2023-02-03"
      },
      {
        "ip": "121.140.146.24",
        "location": "Geumcheon-gu - South Korea",
        "owner": "Korea Telecom",
        "lastseen": "2021-04-29"
      },
      {
        "ip": "121.128.199.96",
        "location": "Jongno-gu - South Korea",
        "owner": "Korea Telecom",
        "lastseen": "2019-04-30"
      },
      {
        "ip": "27.119.97.215",
        "location": "Suwon - South Korea",
        "owner": "SK Broadband Co Ltd",
        "lastseen": "2018-01-03"
      }
    ],
    "success": 1
  },
  "api": {
    "success": true,
    "cost": 100,
    "pl_id": 1595642,
    "ms": 1081
  }
}

```

### curl

```curl

curl --fail-with-body --request POST 'https://apick.app/rest/ip_history' \
  --header "Authorization: Bearer $APICK_API_KEY" \
  --form-string 'domain=apick.app'

```

### Node.js (서버 ESM)

```javascript

const form = new FormData();
form.append("domain", "apick.app");
const response = await fetch("https://apick.app/rest/ip_history", {
  method: "POST",
  headers: { Authorization: "Bearer " + process.env.APICK_API_KEY },
  body: form,
  signal: AbortSignal.timeout(120_000),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const result = await response.json();
console.log(result);

```

### python

```python

import os
import requests
parts = [
    ("domain", (None, "apick.app")),
]
response = requests.request("POST", "https://apick.app/rest/ip_history",
    headers={"Authorization": "Bearer " + os.environ["APICK_API_KEY"]},
    files=parts,
    timeout=(10, 120))
response.raise_for_status()
result = response.json()
print(result)

```

### php

```php

<?php
$headers = ["Authorization: Bearer " . getenv("APICK_API_KEY")];
$form = [
    'domain' => 'apick.app',
];
$curl = curl_init('https://apick.app/rest/ip_history');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_POSTFIELDS => $form,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CONNECTTIMEOUT => 10, CURLOPT_TIMEOUT => 120,
]);
$body = curl_exec($curl);
if ($body === false) { throw new RuntimeException(curl_error($curl)); }
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($status >= 400) { throw new RuntimeException($body); }
$result = json_decode($body, true, 512, JSON_THROW_ON_ERROR);
print_r($result);

```

## 코드·오류

## 상세 기능·요금

Method URL POST https://apick.app/rest/ip_history API 호출 요청 요청하기 Key Value domain 응답

## 상세 요청

Header 이름 필수 설명 Authorization O Bearer 인증키

## 상세 응답

Body 이름 타입 설명 data Object 조회 데이터 records Array 이력 목록 {} Object IP 정보 ip String IP 주소 location String 위치 정보 owner String ISP lastseen String 업데이트 일자 success Integer 과금 여부0: 실패1: 성공3: 실패(timeout) api Object API 호출 공통 데이터 success Boolean API 서버 정상 응답 여부 cost Integer API 호출 요금 ms Integer API 응답 시간 pl_id Integer API 결제 로그 ID

## 상세 예제

요청 예시 form-data 전체 예제 보기 응답 예시 { "data": { "records": [ { "ip": "121.140.146.38", "location": "Geumcheon-gu - South Korea", "owner": "Korea Telecom", "lastseen": "2023-12-31" }, { "ip": "121.140.146.133", "location": "Geumcheon-gu - South Korea", "owner": "Korea Telecom", "lastseen": "2023-02-03" }, { "ip": "121.140.146.24", "location": "Geumcheon-gu - South Korea", "owner": "Korea Telecom", "lastseen": "2021-04-29" }, { "ip": "121.128.199.96", "location": "Jongno-gu - South Korea", "owner": "Korea Telecom", "lastseen": "2019-04-30" }, { "ip": "27.119.97.215", "location": "Suwon - South Korea", "owner": "SK Broadband Co Ltd", "lastseen": "2018-01-03" } ], "success": 1 }, "api": { "success": true, "cost": 100, "pl_id": 1595642, "ms": 1081 } }
