> For the complete documentation index see https://domscan.net/llms.txt. Markdown versions of every docs page are available by appending .md to the page URL.

Source: https://domscan.net/ko/docs/batch

# 비동기 API 배치

클라이언트 연결을 계속 열어 두지 않고도 지원되는 여러 API 요청을 대기열에 넣고 결과를 수집할 수 있습니다.

POST /v1/batches

#### 배치 처리 방식

- 각 배치에는 지원되는 공개 GET 요청을 최대 100개까지 넣을 수 있습니다.

- 각 항목에는 해당 엔드포인트의 일반 요금이 적용되며 최종 실패 항목은 개별적으로 환불됩니다.

- 계정의 모든 멤버가 24시간 동안 작업 상태와 결과를 확인할 수 있습니다.

- 선택 사항인 HTTPS 웹훅을 사용하면 처리가 최종 상태에 도달했을 때 시스템에 알릴 수 있습니다.

#### 예제 요청

```bash
curl -X POST "https://domscan.net/v1/batches" \
  -H "X-API-Key: $DOMSCAN_API_KEY" \
  -H "Idempotency-Key: customer-import-42" \
  -H "Content-Type: application/json" \
  -d '{
    "requests": [
      {"path": "/v1/status", "query": {"domain": "example.com"}},
      {"path": "/v1/dns", "query": {"domain": "example.org", "type": "MX"}}
    ]
  }'
```

#### 응답 필드

| 필드 | 유형 |
| --- | --- |
| `job` | object |
| `job.id` | string |
| `job.status` | string |
| `job.total` | integer |
| `job.counts` | object |
| `job.counts.pending` | integer |
| `job.counts.processing` | integer |
| `job.counts.succeeded` | integer |
| `job.counts.failed` | integer |
| `job.counts.cancelled` | integer |
| `job.billing` | object |
| `job.billing.credits_charged` | integer |
| `job.billing.credits_refunded` | integer |
| `job.billing.credits_net` | integer |
| `job.webhook` | object |
| `job.webhook.configured` | boolean |
| `job.webhook.status` | string |
| `job.webhook.attempts` | integer |
| `job.status_url` | string |
| `job.results_url` | string |
| `job.results_csv_url` | string |
| `job.poll_after_ms` | integer \| null |
| `job.created_at` | string |
| `job.started_at` | string \| null |
| `job.completed_at` | string \| null |
| `job.cancelled_at` | string \| null |
| `job.updated_at` | string |
| `job.processing_deadline_at` | string |
| `job.results_expires_at` | string |

#### 예제 응답

```json
{
  "job": {
    "id": "example-id",
    "status": "queued",
    "total": 1,
    "counts": {
      "pending": 1,
      "processing": 1,
      "succeeded": 1,
      "failed": 1,
      "cancelled": 1
    },
    "billing": {
      "credits_charged": 1,
      "credits_refunded": 1,
      "credits_net": 1
    },
    "webhook": {
      "configured": false,
      "status": "not_configured",
      "attempts": 1
    },
    "status_url": "https://example.com",
    "results_url": "https://example.com",
    "results_csv_url": "https://example.com",
    "created_at": "2026-08-27T12:00:00Z",
    "updated_at": "2026-08-27T12:00:00Z",
    "processing_deadline_at": "2026-08-27T12:00:00Z",
    "results_expires_at": "2026-08-27T12:00:00Z",
    "poll_after_ms": 1,
    "started_at": "2026-08-27T12:00:00Z",
    "completed_at": "2026-08-27T12:00:00Z",
    "cancelled_at": "2026-08-27T12:00:00Z"
  }
}
```

### 폴링 및 취소

상태 엔드포인트를 폴링하고 순서대로 결과를 가져오거나 아직 시작하지 않은 작업을 취소할 수 있습니다.

```http
GET /v1/batches/{job_id}
GET /v1/batches/{job_id}/results
GET /v1/batches/{job_id}/results?format=csv
DELETE /v1/batches/{job_id}
```

### 서명된 완료 웹훅

웹훅 서명은 타임스탬프, 마침표, 수정되지 않은 요청 본문을 차례로 연결한 값에 HMAC-SHA256을 적용해 생성합니다. 전달을 수락하기 전에 타임스탬프를 확인하세요.

```http
X-DomScan-Event: batch.completed
X-DomScan-Timestamp: 1785231000
X-DomScan-Signature: sha256=...
```

### 통합 작업 API

API 배치, 도메인 탐색, 기술 스캔, 스크레이프 작업 등 모든 비동기 작업을 한곳에서 조회하고, 페이지를 넘기고, 취소할 수 있습니다. 작업은 기존처럼 각자의 엔드포인트에서 생성하며, 해당 엔드포인트는 그대로 동작합니다. 모든 /v1/jobs 작업은 무료입니다.

```http
GET  /v1/jobs?limit=25&kind=tech_scan
GET  /v1/jobs/{job_id}
GET  /v1/jobs/{job_id}/results?limit=25&cursor=...
POST /v1/jobs/{job_id}/cancel
```

#### 작업 형식

모든 작업은 동일한 필드를 가집니다. id, kind, status, 타임스탬프, progress(total, done, succeeded, failed, cancelled), credits(charged, refunded), 그리고 작업 자체와 결과로 가는 링크, 아직 취소할 수 있는 동안에는 취소 동작 링크가 포함됩니다. native_status에는 작업을 생성한 엔드포인트가 보고한 상태가 그대로 유지됩니다.

```json
{
  "job": {
    "id": "tsj_4f2a9c1e7b3d4a5f8e6c2b1a0d9f8e7c",
    "kind": "tech_scan",
    "status": "running",
    "native_status": "running",
    "created_at": "2026-10-10T12:00:00Z",
    "updated_at": "2026-10-10T12:00:20Z",
    "started_at": "2026-10-10T12:00:05Z",
    "completed_at": null,
    "results_expires_at": "2026-10-12T12:00:00Z",
    "progress": { "total": 2, "done": 1, "succeeded": 1, "failed": 0, "cancelled": 0 },
    "credits": { "charged": 6, "refunded": 0 },
    "notify_webhook": { "endpoint_id": null, "status": "waiting", "event_type": null, "deliveries": 0 },
    "links": {
      "self": "https://domscan.net/v1/jobs/tsj_4f2a9c1e7b3d4a5f8e6c2b1a0d9f8e7c",
      "results": "https://domscan.net/v1/jobs/tsj_4f2a9c1e7b3d4a5f8e6c2b1a0d9f8e7c/results",
      "cancel": "https://domscan.net/v1/jobs/tsj_4f2a9c1e7b3d4a5f8e6c2b1a0d9f8e7c/cancel"
    }
  }
}
```

#### 상태

queued와 running은 작업이 진행 중임을 뜻합니다. 취소 중인 작업은 취소가 확정될 때까지 running으로 표시됩니다. completed는 모든 항목이 최종 상태에 도달했음을, failed는 성공한 항목이 하나도 없이 작업이 끝났음을, cancelled는 작업이 취소되었음을 의미합니다. 실패한 항목은 progress.failed에 집계되며 결과에 나열됩니다.

`batch`, `domain_discovery`, `tech_scan`, `scrape` &middot; `queued`, `running`, `completed`, `failed`, `cancelled`

#### 페이지네이션

작업 목록 조회와 결과 조회 모두 limit(1에서 100, 기본값 25)과 cursor를 받습니다. 이전 페이지의 next_cursor를 cursor로 전달하세요. 마지막 페이지에서는 null입니다. 커서는 서명되어 있으며 계정과 작업에 연결되어 있으므로, 수정되었거나 다른 사용자의 커서는 400을 반환합니다.

#### 취소

API 배치, 도메인 탐색 또는 기술 스캔 작업을 취소하면 시작되지 않은 항목이 중단되고 해당 크레딧이 환불됩니다. 이미 실행 중인 항목은 끝까지 진행될 수 있습니다. 이미 취소된 작업을 다시 취소하면 200을 반환합니다. 스크레이프 작업은 취소할 수 없으며, 이미 완료된 작업은 JOB_NOT_CANCELLABLE과 함께 409를 반환합니다.

#### 완료 웹훅

작업 생성 요청에 notify_webhook: true를 추가하면 작업이 끝날 때 서명된 job.completed, job.failed 또는 job.cancelled 이벤트를 한 번 받습니다. 이 이벤트는 해당 이벤트 또는 모든 이벤트를 구독하는 활성 상태의 서명된 웹훅 엔드포인트 전체로 전송됩니다. true 대신 엔드포인트 ID를 전달하면 해당 엔드포인트로만 전송됩니다. 전송에는 모니터링 알림과 동일한 서명, 재시도, 전송 로그가 사용되며 무료입니다.

```bash
curl -X POST "https://domscan.net/v1/tech/jobs" \
  -H "X-API-Key: $DOMSCAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"targets": ["example.com"], "notify_webhook": true}'

X-DomScan-Event: job.completed
X-DomScan-Event-Id: evt_job_tsj_4f2a9c1e7b3d4a5f8e6c2b1a0d9f8e7c
```

POST /v1/domain-discovery/jobs 크레딧: 1/item

#### 본문 매개변수

| 매개변수 | 유형 | 필수 |
| --- | --- | --- |
| notify_webhook | unknown | 선택 사항 |
| tlds | string[] | 필수 |
| limit | integer | 선택 사항 |
| cursor | string | 선택 사항 |
| min_length | integer 기본값 `3` | 선택 사항 |
| max_length | integer 기본값 `16` | 선택 사항 |
| singular_only | boolean 기본값 `false` | 선택 사항 |

#### 응답 필드

| 필드 | 유형 |
| --- | --- |
| `job` | object |
| `job.id` | string |
| `job.status` | string |
| `job.total` | integer |
| `job.counts` | object |
| `job.counts.pending` | integer |
| `job.counts.processing` | integer |
| `job.counts.succeeded` | integer |
| `job.counts.failed` | integer |
| `job.counts.cancelled` | integer |
| `job.billing` | object |
| `job.billing.credits_charged` | integer |
| `job.billing.credits_refunded` | integer |
| `job.billing.credits_net` | integer |
| `job.webhook` | object |
| `job.webhook.configured` | boolean |
| `job.webhook.status` | string |
| `job.webhook.attempts` | integer |
| `job.status_url` | string |
| `job.results_url` | string |
| `job.results_csv_url` | string |
| `job.poll_after_ms` | integer \| null |
| `job.created_at` | string |
| `job.started_at` | string \| null |
| `job.completed_at` | string \| null |
| `job.cancelled_at` | string \| null |
| `job.updated_at` | string |
| `job.processing_deadline_at` | string |
| `job.results_expires_at` | string |
| `discovery` | object |
| `discovery.corpus` | string |
| `discovery.corpus_version` | string |
| `discovery.total_matching_words` | integer |
| `discovery.page_offset` | integer |
| `discovery.page_words` | integer |
| `discovery.domain_checks` | integer |
| `discovery.tlds[]` | string[] |
| `discovery.filters` | object |
| `discovery.filters.min_length` | integer |
| `discovery.filters.max_length` | integer |
| `discovery.filters.singular_only` | boolean |
| `discovery.credits_per_domain` | integer |
| `discovery.next_cursor` | string \| null |

#### 예제 요청

```bash
curl -X POST "https://domscan.net/v1/domain-discovery/jobs" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $DOMSCAN_API_KEY" \
  -d '{
  "tlds": [
    "io",
    "ai"
  ],
  "limit": 50,
  "min_length": 4,
  "max_length": 8,
  "singular_only": true
}'
```

```javascript
const response = await fetch("https://domscan.net/v1/domain-discovery/jobs", {
  method: "POST",
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    "tlds": [
      "io",
      "ai"
    ],
    "limit": 50,
    "min_length": 4,
    "max_length": 8,
    "singular_only": true
  }),
});
const data = await response.json();
console.log(data);
```

```python
import os
import requests

response = requests.post(
    "https://domscan.net/v1/domain-discovery/jobs",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
    json={
        "tlds": [
            "io",
            "ai",
        ],
        "limit": 50,
        "min_length": 4,
        "max_length": 8,
        "singular_only": True,
    },
)
print(response.json())
```

```go
package main

func main() {
	body := strings.NewReader(`{
	  "tlds": [
	    "io",
	    "ai"
	  ],
	  "limit": 50,
	  "min_length": 4,
	  "max_length": 8,
	  "singular_only": true
	}`)
	req, err := http.NewRequest(http.MethodPost, "https://domscan.net/v1/domain-discovery/jobs", body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))
	req.Header.Set("Content-Type", "application/json")

```ruby
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/domain-discovery/jobs")
request = Net::HTTP::Post.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")
request["Content-Type"] = "application/json"
request.body = JSON.generate({
  "tlds" => [
    "io",
    "ai"
  ],
  "limit" => 50,
  "min_length" => 4,
  "max_length" => 8,
  "singular_only" => true
})

#### 예제 응답

```json
{
  "job": {
    "id": "example-id",
    "status": "queued",
    "total": 1,
    "counts": {
      "pending": 1,
      "processing": 1,
      "succeeded": 1,
      "failed": 1,
      "cancelled": 1
    },
    "billing": {
      "credits_charged": 1,
      "credits_refunded": 1,
      "credits_net": 1
    },
    "webhook": {
      "configured": false,
      "status": "not_configured",
      "attempts": 1
    },
    "status_url": "https://example.com",
    "results_url": "https://example.com",
    "results_csv_url": "https://example.com",
    "created_at": "2026-08-27T12:00:00Z",
    "updated_at": "2026-08-27T12:00:00Z",
    "processing_deadline_at": "2026-08-27T12:00:00Z",
    "results_expires_at": "2026-08-27T12:00:00Z",
    "poll_after_ms": 1,
    "started_at": "2026-08-27T12:00:00Z",
    "completed_at": "2026-08-27T12:00:00Z",
    "cancelled_at": "2026-08-27T12:00:00Z"
  },
  "discovery": {
    "corpus": "iannuttall/unclaimed",
    "corpus_version": "example",
    "total_matching_words": 1,
    "page_offset": 1,
    "page_words": 1,
    "domain_checks": 1,
    "tlds": [
      "com",
      "net",
      "org"
    ],
    "filters": {
      "min_length": 1,
      "max_length": 1,
      "singular_only": false
    },
    "credits_per_domain": 1,
    "next_cursor": "example"
  }
}
```

#### HTTP 상태 코드

- `200` 성공
- `202` 수락됨
- `400` 잘못된 요청
- `401` 인증되지 않음
- `402` 결제 필요
- `409` HTTP 409
- `429` 요청 과다

GET /v1/batches 크레딧: 0

#### 쿼리 매개변수

| 매개변수 | 유형 | 필수 |
| --- | --- | --- |
| limit | integer 기본값 `25` | 선택 사항 |

#### 응답 필드

| 필드 | 유형 |
| --- | --- |
| `jobs[]` | object[] |
| `jobs[]` | object |
| `jobs[].id` | string |
| `jobs[].status` | string |
| `jobs[].total` | integer |
| `jobs[].counts` | object |
| `jobs[].counts.pending` | integer |
| `jobs[].counts.processing` | integer |
| `jobs[].counts.succeeded` | integer |
| `jobs[].counts.failed` | integer |
| `jobs[].counts.cancelled` | integer |
| `jobs[].billing` | object |
| `jobs[].billing.credits_charged` | integer |
| `jobs[].billing.credits_refunded` | integer |
| `jobs[].billing.credits_net` | integer |
| `jobs[].webhook` | object |
| `jobs[].webhook.configured` | boolean |
| `jobs[].webhook.status` | string |
| `jobs[].webhook.attempts` | integer |
| `jobs[].status_url` | string |
| `jobs[].results_url` | string |
| `jobs[].results_csv_url` | string |
| `jobs[].poll_after_ms` | integer \| null |
| `jobs[].created_at` | string |
| `jobs[].started_at` | string \| null |
| `jobs[].completed_at` | string \| null |
| `jobs[].cancelled_at` | string \| null |
| `jobs[].updated_at` | string |
| `jobs[].processing_deadline_at` | string |
| `jobs[].results_expires_at` | string |
| `retention_hours` | integer |

#### 예제 요청

```bash
curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/batches?limit=25"
```

```javascript
const response = await fetch("https://domscan.net/v1/batches?limit=25", {
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY },
});
const data = await response.json();
console.log(data);
```

```python
import os
import requests

response = requests.get(
    "https://domscan.net/v1/batches?limit=25",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
)
print(response.json())
```

```go
package main

func main() {
	req, err := http.NewRequest(http.MethodGet, "https://domscan.net/v1/batches?limit=25", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))

```ruby
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/batches?limit=25")
request = Net::HTTP::Get.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")

#### 예제 응답

```json
{
  "jobs": [
    {
      "id": "example-id",
      "status": "queued",
      "total": 1,
      "counts": {
        "pending": 1,
        "processing": 1,
        "succeeded": 1,
        "failed": 1,
        "cancelled": 1
      },
      "billing": {
        "credits_charged": 1,
        "credits_refunded": 1,
        "credits_net": 1
      },
      "webhook": {
        "configured": false,
        "status": "not_configured",
        "attempts": 1
      },
      "status_url": "https://example.com",
      "results_url": "https://example.com",
      "results_csv_url": "https://example.com",
      "created_at": "2026-08-27T12:00:00Z",
      "updated_at": "2026-08-27T12:00:00Z",
      "processing_deadline_at": "2026-08-27T12:00:00Z",
      "results_expires_at": "2026-08-27T12:00:00Z",
      "poll_after_ms": 1,
      "started_at": "2026-08-27T12:00:00Z",
      "completed_at": "2026-08-27T12:00:00Z",
      "cancelled_at": "2026-08-27T12:00:00Z"
    }
  ],
  "retention_hours": 24
}
```

#### HTTP 상태 코드

- `200` 성공
- `400` 잘못된 요청
- `401` 인증되지 않음
- `429` 요청 과다

GET /v1/batches/:job_id 크레딧: 0

#### 쿼리 매개변수

| 매개변수 | 유형 | 필수 |
| --- | --- | --- |
| job_id | string | 필수 |

#### 응답 필드

| 필드 | 유형 |
| --- | --- |
| `job` | object |
| `job.id` | string |
| `job.status` | string |
| `job.total` | integer |
| `job.counts` | object |
| `job.counts.pending` | integer |
| `job.counts.processing` | integer |
| `job.counts.succeeded` | integer |
| `job.counts.failed` | integer |
| `job.counts.cancelled` | integer |
| `job.billing` | object |
| `job.billing.credits_charged` | integer |
| `job.billing.credits_refunded` | integer |
| `job.billing.credits_net` | integer |
| `job.webhook` | object |
| `job.webhook.configured` | boolean |
| `job.webhook.status` | string |
| `job.webhook.attempts` | integer |
| `job.status_url` | string |
| `job.results_url` | string |
| `job.results_csv_url` | string |
| `job.poll_after_ms` | integer \| null |
| `job.created_at` | string |
| `job.started_at` | string \| null |
| `job.completed_at` | string \| null |
| `job.cancelled_at` | string \| null |
| `job.updated_at` | string |
| `job.processing_deadline_at` | string |
| `job.results_expires_at` | string |

#### 예제 요청

```bash
curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/batches/string"
```

```javascript
const response = await fetch("https://domscan.net/v1/batches/string", {
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY },
});
const data = await response.json();
console.log(data);
```

```python
import os
import requests

response = requests.get(
    "https://domscan.net/v1/batches/string",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
)
print(response.json())
```

```go
package main

func main() {
	req, err := http.NewRequest(http.MethodGet, "https://domscan.net/v1/batches/string", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))

```ruby
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/batches/string")
request = Net::HTTP::Get.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")

#### 예제 응답

```json
{
  "job": {
    "id": "example-id",
    "status": "queued",
    "total": 1,
    "counts": {
      "pending": 1,
      "processing": 1,
      "succeeded": 1,
      "failed": 1,
      "cancelled": 1
    },
    "billing": {
      "credits_charged": 1,
      "credits_refunded": 1,
      "credits_net": 1
    },
    "webhook": {
      "configured": false,
      "status": "not_configured",
      "attempts": 1
    },
    "status_url": "https://example.com",
    "results_url": "https://example.com",
    "results_csv_url": "https://example.com",
    "created_at": "2026-08-27T12:00:00Z",
    "updated_at": "2026-08-27T12:00:00Z",
    "processing_deadline_at": "2026-08-27T12:00:00Z",
    "results_expires_at": "2026-08-27T12:00:00Z",
    "poll_after_ms": 1,
    "started_at": "2026-08-27T12:00:00Z",
    "completed_at": "2026-08-27T12:00:00Z",
    "cancelled_at": "2026-08-27T12:00:00Z"
  }
}
```

#### HTTP 상태 코드

- `200` 성공
- `401` 인증되지 않음
- `404` 찾을 수 없음
- `429` 요청 과다

GET /v1/batches/:job_id/results 크레딧: 0

#### 쿼리 매개변수

| 매개변수 | 유형 | 필수 |
| --- | --- | --- |
| job_id | string | 필수 |
| after | integer 기본값 `-1` | 선택 사항 |
| limit | integer 기본값 `100` | 선택 사항 |
| format | string 허용된 값 `json`, `csv` 기본값 `json` | 선택 사항 |

#### 응답 필드

| 필드 | 유형 |
| --- | --- |
| `job` | object |
| `job.id` | string |
| `job.status` | string |
| `job.total` | integer |
| `job.counts` | object |
| `job.counts.pending` | integer |
| `job.counts.processing` | integer |
| `job.counts.succeeded` | integer |
| `job.counts.failed` | integer |
| `job.counts.cancelled` | integer |
| `job.billing` | object |
| `job.billing.credits_charged` | integer |
| `job.billing.credits_refunded` | integer |
| `job.billing.credits_net` | integer |
| `job.webhook` | object |
| `job.webhook.configured` | boolean |
| `job.webhook.status` | string |
| `job.webhook.attempts` | integer |
| `job.status_url` | string |
| `job.results_url` | string |
| `job.results_csv_url` | string |
| `job.poll_after_ms` | integer \| null |
| `job.created_at` | string |
| `job.started_at` | string \| null |
| `job.completed_at` | string \| null |
| `job.cancelled_at` | string \| null |
| `job.updated_at` | string |
| `job.processing_deadline_at` | string |
| `job.results_expires_at` | string |
| `results[]` | object[] |
| `results[]` | object |
| `results[].position` | integer |
| `results[].reference` | string \| null |
| `results[].request` | object |
| `results[].request.method` | string |
| `results[].request.path` | string |
| `results[].request.query` | object |
| `results[].status` | string |
| `results[].attempts` | integer |
| `results[].http_status` | integer \| null |
| `results[].result` | object \| null |
| `results[].error` | object \| null |
| `results[].billing` | object |
| `results[].started_at` | string \| null |
| `results[].completed_at` | string \| null |
| `next_after` | integer \| null |

#### 예제 요청

```bash
curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/batches/example/results?after=-1&limit=25&format=json"
```

```javascript
const response = await fetch("https://domscan.net/v1/batches/example/results?after=-1&limit=25&format=json", {
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY },
});
const data = await response.json();
console.log(data);
```

```python
import os
import requests

response = requests.get(
    "https://domscan.net/v1/batches/example/results?after=-1&limit=25&format=json",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
)
print(response.json())
```

```go
package main

func main() {
	req, err := http.NewRequest(http.MethodGet, "https://domscan.net/v1/batches/example/results?after=-1&limit=25&format=json", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))

```ruby
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/batches/example/results?after=-1&limit=25&format=json")
request = Net::HTTP::Get.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")

#### 예제 응답

```json
{
  "job": {
    "id": "example-id",
    "status": "queued",
    "total": 1,
    "counts": {
      "pending": 1,
      "processing": 1,
      "succeeded": 1,
      "failed": 1,
      "cancelled": 1
    },
    "billing": {
      "credits_charged": 1,
      "credits_refunded": 1,
      "credits_net": 1
    },
    "webhook": {
      "configured": false,
      "status": "not_configured",
      "attempts": 1
    },
    "status_url": "https://example.com",
    "results_url": "https://example.com",
    "results_csv_url": "https://example.com",
    "created_at": "2026-08-27T12:00:00Z",
    "updated_at": "2026-08-27T12:00:00Z",
    "processing_deadline_at": "2026-08-27T12:00:00Z",
    "results_expires_at": "2026-08-27T12:00:00Z",
    "poll_after_ms": 1,
    "started_at": "2026-08-27T12:00:00Z",
    "completed_at": "2026-08-27T12:00:00Z",
    "cancelled_at": "2026-08-27T12:00:00Z"
  },
  "results": [
    {
      "position": 1,
      "request": {
        "method": "GET",
        "path": "example",
        "query": {}
      },
      "status": "pending",
      "attempts": 1,
      "http_status": 1,
      "result": {},
      "error": {},
      "billing": {},
      "reference": "example",
      "started_at": "2026-08-27T12:00:00Z",
      "completed_at": "2026-08-27T12:00:00Z"
    }
  ],
  "next_after": 1
}
```

#### HTTP 상태 코드

- `200` 성공
- `400` 잘못된 요청
- `401` 인증되지 않음
- `404` 찾을 수 없음
- `429` 요청 과다

DELETE /v1/batches/:job_id 크레딧: 0

#### 쿼리 매개변수

| 매개변수 | 유형 | 필수 |
| --- | --- | --- |
| job_id | string | 필수 |

#### 응답 필드

| 필드 | 유형 |
| --- | --- |
| `job` | object |
| `job.id` | string |
| `job.status` | string |
| `job.total` | integer |
| `job.counts` | object |
| `job.counts.pending` | integer |
| `job.counts.processing` | integer |
| `job.counts.succeeded` | integer |
| `job.counts.failed` | integer |
| `job.counts.cancelled` | integer |
| `job.billing` | object |
| `job.billing.credits_charged` | integer |
| `job.billing.credits_refunded` | integer |
| `job.billing.credits_net` | integer |
| `job.webhook` | object |
| `job.webhook.configured` | boolean |
| `job.webhook.status` | string |
| `job.webhook.attempts` | integer |
| `job.status_url` | string |
| `job.results_url` | string |
| `job.results_csv_url` | string |
| `job.poll_after_ms` | integer \| null |
| `job.created_at` | string |
| `job.started_at` | string \| null |
| `job.completed_at` | string \| null |
| `job.cancelled_at` | string \| null |
| `job.updated_at` | string |
| `job.processing_deadline_at` | string |
| `job.results_expires_at` | string |

#### 예제 요청

```bash
curl -X DELETE "https://domscan.net/v1/batches/string" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $DOMSCAN_API_KEY" \
  -d '{}'
```

```javascript
const response = await fetch("https://domscan.net/v1/batches/string", {
  method: "DELETE",
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({}),
});
const data = await response.json();
console.log(data);
```

```python
import os
import requests

response = requests.delete(
    "https://domscan.net/v1/batches/string",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
    json={},
)
print(response.json())
```

```go
package main

func main() {
	body := strings.NewReader(`{}`)
	req, err := http.NewRequest(http.MethodDelete, "https://domscan.net/v1/batches/string", body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))
	req.Header.Set("Content-Type", "application/json")

```ruby
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/batches/string")
request = Net::HTTP::Delete.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")
request["Content-Type"] = "application/json"
request.body = JSON.generate({})

#### 예제 응답

```json
{
  "job": {
    "id": "example-id",
    "status": "queued",
    "total": 1,
    "counts": {
      "pending": 1,
      "processing": 1,
      "succeeded": 1,
      "failed": 1,
      "cancelled": 1
    },
    "billing": {
      "credits_charged": 1,
      "credits_refunded": 1,
      "credits_net": 1
    },
    "webhook": {
      "configured": false,
      "status": "not_configured",
      "attempts": 1
    },
    "status_url": "https://example.com",
    "results_url": "https://example.com",
    "results_csv_url": "https://example.com",
    "created_at": "2026-08-27T12:00:00Z",
    "updated_at": "2026-08-27T12:00:00Z",
    "processing_deadline_at": "2026-08-27T12:00:00Z",
    "results_expires_at": "2026-08-27T12:00:00Z",
    "poll_after_ms": 1,
    "started_at": "2026-08-27T12:00:00Z",
    "completed_at": "2026-08-27T12:00:00Z",
    "cancelled_at": "2026-08-27T12:00:00Z"
  }
}
```

#### HTTP 상태 코드

- `202` 수락됨
- `401` 인증되지 않음
- `404` 찾을 수 없음
- `409` HTTP 409
- `429` 요청 과다

GET /v1/jobs 크레딧: 0

#### 쿼리 매개변수

| 매개변수 | 유형 | 필수 |
| --- | --- | --- |
| limit | integer 기본값 `25` | 선택 사항 |
| cursor | string | 선택 사항 |
| kind | string 허용된 값 `batch`, `tech_scan`, `scrape`, `domain_discovery`, `crawl` | 선택 사항 |

#### 응답 필드

| 필드 | 유형 |
| --- | --- |
| `jobs[]` | object[] |
| `jobs[]` | object |
| `jobs[].id` | string |
| `jobs[].kind` | string |
| `jobs[].status` | string |
| `jobs[].native_status` | string |
| `jobs[].created_at` | string \| null |
| `jobs[].updated_at` | string \| null |
| `jobs[].started_at` | string \| null |
| `jobs[].completed_at` | string \| null |
| `jobs[].results_expires_at` | string \| null |
| `jobs[].progress` | object |
| `jobs[].progress.total` | integer |
| `jobs[].progress.done` | integer |
| `jobs[].progress.succeeded` | integer |
| `jobs[].progress.failed` | integer |
| `jobs[].progress.cancelled` | integer |
| `jobs[].credits` | object |
| `jobs[].credits.charged` | integer |
| `jobs[].credits.refunded` | integer |
| `jobs[].notify_webhook` | object |
| `jobs[].notify_webhook.endpoint_id` | string \| null |
| `jobs[].notify_webhook.status` | string |
| `jobs[].notify_webhook.event_type` | string \| null |
| `jobs[].notify_webhook.deliveries` | integer |
| `jobs[].links` | object |
| `jobs[].links.self` | string |
| `jobs[].links.results` | string |
| `jobs[].links.cancel` | string \| null |
| `limit` | integer |
| `has_more` | boolean |
| `next_cursor` | string \| null |

#### 예제 요청

```bash
curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/jobs?limit=25&cursor=example&kind=batch"
```

```javascript
const response = await fetch("https://domscan.net/v1/jobs?limit=25&cursor=example&kind=batch", {
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY },
});
const data = await response.json();
console.log(data);
```

```python
import os
import requests

response = requests.get(
    "https://domscan.net/v1/jobs?limit=25&cursor=example&kind=batch",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
)
print(response.json())
```

```go
package main

func main() {
	req, err := http.NewRequest(http.MethodGet, "https://domscan.net/v1/jobs?limit=25&cursor=example&kind=batch", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))

```ruby
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/jobs?limit=25&cursor=example&kind=batch")
request = Net::HTTP::Get.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")

#### 예제 응답

```json
{
  "jobs": [
    {
      "id": "example-id",
      "kind": "batch",
      "status": "queued",
      "native_status": "queued",
      "created_at": "2026-08-27T12:00:00Z",
      "updated_at": "2026-08-27T12:00:00Z",
      "started_at": "2026-08-27T12:00:00Z",
      "completed_at": "2026-08-27T12:00:00Z",
      "results_expires_at": "2026-08-27T12:00:00Z",
      "progress": {
        "total": 1,
        "done": 1,
        "succeeded": 1,
        "failed": 1,
        "cancelled": 1
      },
      "credits": {
        "charged": 1,
        "refunded": 1
      },
      "notify_webhook": {
        "endpoint_id": "example",
        "status": "waiting",
        "event_type": "job.completed",
        "deliveries": 1
      },
      "links": {
        "self": "https://example.com",
        "results": "https://example.com",
        "cancel": "https://example.com"
      }
    }
  ],
  "limit": 1,
  "has_more": false,
  "next_cursor": "example"
}
```

#### HTTP 상태 코드

- `200` 성공
- `400` 잘못된 요청
- `401` 인증되지 않음
- `429` 요청 과다

GET /v1/jobs/:job_id 크레딧: 0

#### 쿼리 매개변수

| 매개변수 | 유형 | 필수 |
| --- | --- | --- |
| job_id | string | 필수 |

#### 응답 필드

| 필드 | 유형 |
| --- | --- |
| `job` | object |
| `job.id` | string |
| `job.kind` | string |
| `job.status` | string |
| `job.native_status` | string |
| `job.created_at` | string \| null |
| `job.updated_at` | string \| null |
| `job.started_at` | string \| null |
| `job.completed_at` | string \| null |
| `job.results_expires_at` | string \| null |
| `job.progress` | object |
| `job.progress.total` | integer |
| `job.progress.done` | integer |
| `job.progress.succeeded` | integer |
| `job.progress.failed` | integer |
| `job.progress.cancelled` | integer |
| `job.credits` | object |
| `job.credits.charged` | integer |
| `job.credits.refunded` | integer |
| `job.notify_webhook` | object |
| `job.notify_webhook.endpoint_id` | string \| null |
| `job.notify_webhook.status` | string |
| `job.notify_webhook.event_type` | string \| null |
| `job.notify_webhook.deliveries` | integer |
| `job.links` | object |
| `job.links.self` | string |
| `job.links.results` | string |
| `job.links.cancel` | string \| null |

#### 예제 요청

```bash
curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/jobs/string"
```

```javascript
const response = await fetch("https://domscan.net/v1/jobs/string", {
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY },
});
const data = await response.json();
console.log(data);
```

```python
import os
import requests

response = requests.get(
    "https://domscan.net/v1/jobs/string",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
)
print(response.json())
```

```go
package main

func main() {
	req, err := http.NewRequest(http.MethodGet, "https://domscan.net/v1/jobs/string", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))

```ruby
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/jobs/string")
request = Net::HTTP::Get.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")

#### 예제 응답

```json
{
  "job": {
    "id": "example-id",
    "kind": "batch",
    "status": "queued",
    "native_status": "queued",
    "created_at": "2026-08-27T12:00:00Z",
    "updated_at": "2026-08-27T12:00:00Z",
    "started_at": "2026-08-27T12:00:00Z",
    "completed_at": "2026-08-27T12:00:00Z",
    "results_expires_at": "2026-08-27T12:00:00Z",
    "progress": {
      "total": 1,
      "done": 1,
      "succeeded": 1,
      "failed": 1,
      "cancelled": 1
    },
    "credits": {
      "charged": 1,
      "refunded": 1
    },
    "notify_webhook": {
      "endpoint_id": "example",
      "status": "waiting",
      "event_type": "job.completed",
      "deliveries": 1
    },
    "links": {
      "self": "https://example.com",
      "results": "https://example.com",
      "cancel": "https://example.com"
    }
  }
}
```

#### HTTP 상태 코드

- `200` 성공
- `401` 인증되지 않음
- `404` 찾을 수 없음
- `429` 요청 과다

GET /v1/jobs/:job_id/results 크레딧: 0

#### 쿼리 매개변수

| 매개변수 | 유형 | 필수 |
| --- | --- | --- |
| job_id | string | 필수 |
| limit | integer 기본값 `25` | 선택 사항 |
| cursor | string | 선택 사항 |

#### 응답 필드

| 필드 | 유형 |
| --- | --- |
| `job` | object |
| `job.id` | string |
| `job.kind` | string |
| `job.status` | string |
| `job.native_status` | string |
| `job.created_at` | string \| null |
| `job.updated_at` | string \| null |
| `job.started_at` | string \| null |
| `job.completed_at` | string \| null |
| `job.results_expires_at` | string \| null |
| `job.progress` | object |
| `job.progress.total` | integer |
| `job.progress.done` | integer |
| `job.progress.succeeded` | integer |
| `job.progress.failed` | integer |
| `job.progress.cancelled` | integer |
| `job.credits` | object |
| `job.credits.charged` | integer |
| `job.credits.refunded` | integer |
| `job.notify_webhook` | object |
| `job.notify_webhook.endpoint_id` | string \| null |
| `job.notify_webhook.status` | string |
| `job.notify_webhook.event_type` | string \| null |
| `job.notify_webhook.deliveries` | integer |
| `job.links` | object |
| `job.links.self` | string |
| `job.links.results` | string |
| `job.links.cancel` | string \| null |
| `results[]` | object[] |
| `results[]` | object |
| `results[].index` | integer |
| `results[].status` | string |
| `results[].reference` | string \| null |
| `results[].input` | unknown |
| `results[].data` | object \| null |
| `results[].error` | object |
| `results[].error.code` | string |
| `results[].error.message` | string |
| `results[].error.retryable` | boolean |
| `results[].credits` | object |
| `results[].credits.charged` | integer |
| `results[].credits.refunded` | integer |
| `limit` | integer |
| `has_more` | boolean |
| `next_cursor` | string \| null |

#### 예제 요청

```bash
curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/jobs/string/results?limit=25&cursor=example"
```

```javascript
const response = await fetch("https://domscan.net/v1/jobs/string/results?limit=25&cursor=example", {
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY },
});
const data = await response.json();
console.log(data);
```

```python
import os
import requests

response = requests.get(
    "https://domscan.net/v1/jobs/string/results?limit=25&cursor=example",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
)
print(response.json())
```

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, err := http.NewRequest(http.MethodGet, "https://domscan.net/v1/jobs/string/results?limit=25&cursor=example", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))

```ruby
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/jobs/string/results?limit=25&cursor=example")
request = Net::HTTP::Get.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")

#### 예제 응답

```json
{
  "job": {
    "id": "example-id",
    "kind": "batch",
    "status": "queued",
    "native_status": "queued",
    "created_at": "2026-08-27T12:00:00Z",
    "updated_at": "2026-08-27T12:00:00Z",
    "started_at": "2026-08-27T12:00:00Z",
    "completed_at": "2026-08-27T12:00:00Z",
    "results_expires_at": "2026-08-27T12:00:00Z",
    "progress": {
      "total": 1,
      "done": 1,
      "succeeded": 1,
      "failed": 1,
      "cancelled": 1
    },
    "credits": {
      "charged": 1,
      "refunded": 1
    },
    "notify_webhook": {
      "endpoint_id": "example",
      "status": "waiting",
      "event_type": "job.completed",
      "deliveries": 1
    },
    "links": {
      "self": "https://example.com",
      "results": "https://example.com",
      "cancel": "https://example.com"
    }
  },
  "results": [
    {
      "index": 1,
      "status": "pending",
      "reference": "example",
      "input": "example",
      "data": {},
      "error": {
        "code": "example",
        "message": "Request completed",
        "retryable": false
      },
      "credits": {
        "charged": 1,
        "refunded": 1
      }
    }
  ],
  "limit": 1,
  "has_more": false,
  "next_cursor": "example"
}
```

#### HTTP 상태 코드

- `200` 성공
- `400` 잘못된 요청
- `401` 인증되지 않음
- `404` 찾을 수 없음
- `410` HTTP 410
- `429` 요청 과다

POST /v1/jobs/:job_id/cancel 크레딧: 0

#### 쿼리 매개변수

| 매개변수 | 유형 | 필수 |
| --- | --- | --- |
| job_id | string | 필수 |

#### 응답 필드

| 필드 | 유형 |
| --- | --- |
| `job` | object |
| `job.id` | string |
| `job.kind` | string |
| `job.status` | string |
| `job.native_status` | string |
| `job.created_at` | string \| null |
| `job.updated_at` | string \| null |
| `job.started_at` | string \| null |
| `job.completed_at` | string \| null |
| `job.results_expires_at` | string \| null |
| `job.progress` | object |
| `job.progress.total` | integer |
| `job.progress.done` | integer |
| `job.progress.succeeded` | integer |
| `job.progress.failed` | integer |
| `job.progress.cancelled` | integer |
| `job.credits` | object |
| `job.credits.charged` | integer |
| `job.credits.refunded` | integer |
| `job.notify_webhook` | object |
| `job.notify_webhook.endpoint_id` | string \| null |
| `job.notify_webhook.status` | string |
| `job.notify_webhook.event_type` | string \| null |
| `job.notify_webhook.deliveries` | integer |
| `job.links` | object |
| `job.links.self` | string |
| `job.links.results` | string |
| `job.links.cancel` | string \| null |
| `cancellation` | string |

#### 예제 요청

```bash
curl -X POST "https://domscan.net/v1/jobs/string/cancel" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $DOMSCAN_API_KEY" \
  -d '{}'
```

```javascript
const response = await fetch("https://domscan.net/v1/jobs/string/cancel", {
  method: "POST",
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({}),
});
const data = await response.json();
console.log(data);
```

```python
import os
import requests

response = requests.post(
    "https://domscan.net/v1/jobs/string/cancel",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
    json={},
)
print(response.json())
```

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
	"strings"
)

func main() {
	body := strings.NewReader(`{}`)
	req, err := http.NewRequest(http.MethodPost, "https://domscan.net/v1/jobs/string/cancel", body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))
	req.Header.Set("Content-Type", "application/json")

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	data, err := io.ReadAll(resp.Body)
	if err != nil {
		panic(err)
	}
	fmt.Println(resp.Status, string(data))
}
```

```ruby
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/jobs/string/cancel")
request = Net::HTTP::Post.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")
request["Content-Type"] = "application/json"
request.body = JSON.generate({})

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
  http.request(request)
end
puts JSON.pretty_generate(JSON.parse(response.body))
```

#### 예제 응답

```json
{
  "job": {
    "id": "example-id",
    "kind": "batch",
    "status": "queued",
    "native_status": "queued",
    "created_at": "2026-08-27T12:00:00Z",
    "updated_at": "2026-08-27T12:00:00Z",
    "started_at": "2026-08-27T12:00:00Z",
    "completed_at": "2026-08-27T12:00:00Z",
    "results_expires_at": "2026-08-27T12:00:00Z",
    "progress": {
      "total": 1,
      "done": 1,
      "succeeded": 1,
      "failed": 1,
      "cancelled": 1
    },
    "credits": {
      "charged": 1,
      "refunded": 1
    },
    "notify_webhook": {
      "endpoint_id": "example",
      "status": "waiting",
      "event_type": "job.completed",
      "deliveries": 1
    },
    "links": {
      "self": "https://example.com",
      "results": "https://example.com",
      "cancel": "https://example.com"
    }
  },
  "cancellation": "accepted"
}
```

#### HTTP 상태 코드

- `200` 성공
- `202` 수락됨
- `401` 인증되지 않음
- `404` 찾을 수 없음
- `409` HTTP 409
- `429` 요청 과다
