APIリファレンス

非同期 API バッチ APIリファレンス

対応する多数の API リクエストをキューに追加し、クライアント接続を開いたままにせず結果を取得できます。 このリファレンスで、最適なエンドポイントを選び、返される内容を正確に確認できます。

操作

GET /v1/batches/:job_id APIリファレンスを見る
GET /v1/batches/:job_id/results APIリファレンスを見る
DELETE /v1/batches/:job_id APIリファレンスを見る
GET /v1/jobs/:job_id APIリファレンスを見る
GET /v1/jobs/:job_id/results APIリファレンスを見る
POST /v1/jobs/:job_id/cancel APIリファレンスを見る
POST /v1/estimate APIリファレンスを見る
POST /v1/feedback APIリファレンスを見る

POST /v1/batches

操作: createApiBatch クレジットと認証: 無料 認証が必要
POST /v1/batches クレジット: 0

ボディパラメータ

パラメータ タイプ 必須
notify_webhook unknown オプション
requests object[] 必須
webhook object オプション

レスポンスフィールド

フィールド タイプ
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

リクエスト例

curl -X POST "https://domscan.net/v1/batches" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $DOMSCAN_API_KEY" \
  -d '{
  "requests": [
    {
      "path": "/v1/status",
      "query": {
        "domain": "example.com"
      },
      "reference": "customer-42"
    },
    {
      "path": "/v1/dns",
      "query": {
        "domain": "example.org",
        "type": "MX"
      }
    }
  ],
  "webhook": {
    "url": "https://example.com/hooks/domscan",
    "secret": "replace-with-a-private-secret"
  }
}'
const response = await fetch("https://domscan.net/v1/batches", {
  method: "POST",
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    "requests": [
      {
        "path": "/v1/status",
        "query": {
          "domain": "example.com"
        },
        "reference": "customer-42"
      },
      {
        "path": "/v1/dns",
        "query": {
          "domain": "example.org",
          "type": "MX"
        }
      }
    ],
    "webhook": {
      "url": "https://example.com/hooks/domscan",
      "secret": "replace-with-a-private-secret"
    }
  }),
});
const data = await response.json();
console.log(data);
import os
import requests

response = requests.post(
    "https://domscan.net/v1/batches",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
    json={
        "requests": [
            {
                "path": "/v1/status",
                "query": {
                    "domain": "example.com",
                },
                "reference": "customer-42",
            },
            {
                "path": "/v1/dns",
                "query": {
                    "domain": "example.org",
                    "type": "MX",
                },
            },
        ],
        "webhook": {
            "url": "https://example.com/hooks/domscan",
            "secret": "replace-with-a-private-secret",
        },
    },
)
print(response.json())
package main

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

func main() {
	body := strings.NewReader(`{
	  "requests": [
	    {
	      "path": "/v1/status",
	      "query": {
	        "domain": "example.com"
	      },
	      "reference": "customer-42"
	    },
	    {
	      "path": "/v1/dns",
	      "query": {
	        "domain": "example.org",
	        "type": "MX"
	      }
	    }
	  ],
	  "webhook": {
	    "url": "https://example.com/hooks/domscan",
	    "secret": "replace-with-a-private-secret"
	  }
	}`)
	req, err := http.NewRequest(http.MethodPost, "https://domscan.net/v1/batches", 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))
}
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/batches")
request = Net::HTTP::Post.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")
request["Content-Type"] = "application/json"
request.body = JSON.generate({
  "requests" => [
    {
      "path" => "/v1/status",
      "query" => {
        "domain" => "example.com"
      },
      "reference" => "customer-42"
    },
    {
      "path" => "/v1/dns",
      "query" => {
        "domain" => "example.org",
        "type" => "MX"
      }
    }
  ],
  "webhook" => {
    "url" => "https://example.com/hooks/domscan",
    "secret" => "replace-with-a-private-secret"
  }
})

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

レスポンス例

{
  "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 成功
  • 202 受理済み
  • 400 不正なリクエスト
  • 401 未認証
  • 402 支払いが必要
  • 409 HTTP 409
  • 429 リクエスト過多

GET /v1/batches

操作: listApiBatches クレジットと認証: 無料 認証が必要
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

リクエスト例

curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/batches?limit=25"
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);
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())
package main

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

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

	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))
}
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")

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

レスポンス例

{
  "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

操作: getApiBatch クレジットと認証: 無料 認証が必要
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

リクエスト例

curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/batches/string"
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);
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())
package main

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

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

	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))
}
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")

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

レスポンス例

{
  "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

操作: getApiBatchResults クレジットと認証: 無料 認証が必要
GET /v1/batches/:job_id/results クレジット: 0

クエリパラメータ

パラメータ タイプ 必須
job_id string 必須
after integer
デフォルト -1
オプション
limit integer
デフォルト 100
オプション
format string
許可された値 jsoncsv
デフォルト 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

リクエスト例

curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/batches/example/results?after=-1&limit=25&format=json"
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);
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())
package main

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

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

	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))
}
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")

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

レスポンス例

{
  "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

操作: cancelApiBatch クレジットと認証: 無料 認証が必要
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

リクエスト例

curl -X DELETE "https://domscan.net/v1/batches/string" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $DOMSCAN_API_KEY" \
  -d '{}'
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);
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())
package main

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

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

	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))
}
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({})

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

レスポンス例

{
  "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

操作: listJobs クレジットと認証: 無料 認証が必要
GET /v1/jobs クレジット: 0

クエリパラメータ

パラメータ タイプ 必須
limit integer
デフォルト 25
オプション
cursor string オプション
kind string
許可された値 batchtech_scanscrapedomain_discoverycrawl
オプション

レスポンスフィールド

フィールド タイプ
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

リクエスト例

curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/jobs?limit=25&cursor=example&kind=batch"
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);
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())
package main

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

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

	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))
}
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")

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

レスポンス例

{
  "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

操作: getJob クレジットと認証: 無料 認証が必要
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

リクエスト例

curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/jobs/string"
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);
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())
package main

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

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

	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))
}
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")

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

レスポンス例

{
  "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

操作: getJobResults クレジットと認証: 無料 認証が必要
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

リクエスト例

curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/jobs/string/results?limit=25&cursor=example"
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);
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())
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"))

	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))
}
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")

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

レスポンス例

{
  "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

操作: cancelJob クレジットと認証: 無料 認証が必要
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

リクエスト例

curl -X POST "https://domscan.net/v1/jobs/string/cancel" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $DOMSCAN_API_KEY" \
  -d '{}'
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);
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())
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))
}
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))

レスポンス例

{
  "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 リクエスト過多

POST /v1/estimate

操作: estimateRequestCost クレジットと認証: 無料 認証が必要
POST /v1/estimate クレジット: 0

ボディパラメータ

パラメータ タイプ 必須
method string
許可された値 GETPOSTPUTPATCHDELETE
必須
path string 必須
query object オプション
body unknown オプション

レスポンスフィールド

フィールド タイプ
credits integer
breakdown[] object[]
breakdown[] object
breakdown[].component string
breakdown[].quantity integer
breakdown[].unit_credits number
breakdown[].credits integer
notes[] string[]
maximum boolean
rejected boolean
billing_model string
endpoint object
endpoint.method string
endpoint.path string
dry_run boolean

リクエスト例

curl -X POST "https://domscan.net/v1/estimate" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $DOMSCAN_API_KEY" \
  -d '{
  "method": "POST",
  "path": "/v1/value/bulk",
  "body": {
    "domains": [
      "example.com",
      "example.org",
      "example.net"
    ]
  }
}'
const response = await fetch("https://domscan.net/v1/estimate", {
  method: "POST",
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    "method": "POST",
    "path": "/v1/value/bulk",
    "body": {
      "domains": [
        "example.com",
        "example.org",
        "example.net"
      ]
    }
  }),
});
const data = await response.json();
console.log(data);
import os
import requests

response = requests.post(
    "https://domscan.net/v1/estimate",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
    json={
        "method": "POST",
        "path": "/v1/value/bulk",
        "body": {
            "domains": [
                "example.com",
                "example.org",
                "example.net",
            ],
        },
    },
)
print(response.json())
package main

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

func main() {
	body := strings.NewReader(`{
	  "method": "POST",
	  "path": "/v1/value/bulk",
	  "body": {
	    "domains": [
	      "example.com",
	      "example.org",
	      "example.net"
	    ]
	  }
	}`)
	req, err := http.NewRequest(http.MethodPost, "https://domscan.net/v1/estimate", 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))
}
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/estimate")
request = Net::HTTP::Post.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")
request["Content-Type"] = "application/json"
request.body = JSON.generate({
  "method" => "POST",
  "path" => "/v1/value/bulk",
  "body" => {
    "domains" => [
      "example.com",
      "example.org",
      "example.net"
    ]
  }
})

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

レスポンス例

{
  "credits": 6,
  "breakdown": [
    {
      "component": "items",
      "quantity": 3,
      "unit_credits": 2,
      "credits": 6
    }
  ],
  "notes": [
    "Requests rejected with a 4xx status or failing with a 5xx status are refunded automatically."
  ],
  "maximum": false,
  "rejected": false,
  "endpoint": {
    "method": "POST",
    "path": "/v1/value/bulk"
  },
  "billing_model": "per_item"
}

HTTP ステータスコード

  • 200 成功
  • 400 不正なリクエスト
  • 401 未認証
  • 429 リクエスト過多

POST /v1/feedback

操作: sendFeedback クレジットと認証: 無料 認証が必要
POST /v1/feedback クレジット: 0

ボディパラメータ

パラメータ タイプ 必須
message string 必須
category string
許可された値 bugfeature_requestdata_qualitydocspraiseother
デフォルト other
オプション
tool string オプション

レスポンスフィールド

フィールド タイプ
received boolean
feedback_id string
category string

リクエスト例

curl -X POST "https://domscan.net/v1/feedback" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $DOMSCAN_API_KEY" \
  -d '{
  "message": "WHOIS for example.io returns no registrar, but the registry shows one.",
  "category": "data_quality",
  "tool": "/v1/whois"
}'
const response = await fetch("https://domscan.net/v1/feedback", {
  method: "POST",
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    "message": "WHOIS for example.io returns no registrar, but the registry shows one.",
    "category": "data_quality",
    "tool": "/v1/whois"
  }),
});
const data = await response.json();
console.log(data);
import os
import requests

response = requests.post(
    "https://domscan.net/v1/feedback",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
    json={
        "message": "WHOIS for example.io returns no registrar, but the registry shows one.",
        "category": "data_quality",
        "tool": "/v1/whois",
    },
)
print(response.json())
package main

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

func main() {
	body := strings.NewReader(`{
	  "message": "WHOIS for example.io returns no registrar, but the registry shows one.",
	  "category": "data_quality",
	  "tool": "/v1/whois"
	}`)
	req, err := http.NewRequest(http.MethodPost, "https://domscan.net/v1/feedback", 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))
}
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/feedback")
request = Net::HTTP::Post.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")
request["Content-Type"] = "application/json"
request.body = JSON.generate({
  "message" => "WHOIS for example.io returns no registrar, but the registry shows one.",
  "category" => "data_quality",
  "tool" => "/v1/whois"
})

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

レスポンス例

{
  "received": true,
  "feedback_id": "fbk_3f2c9a1b7d8e4f60a1b2c3d4e5f60718",
  "category": "data_quality"
}

HTTP ステータスコード

  • 200 成功
  • 400 不正なリクエスト
  • 401 未認証
  • 429 リクエスト過多

リファレンスリソース