開発者向けリファレンス

サブドメイン ファインダー

サブドメイン ファインダー APIのドキュメントで、リクエストパラメーター、レスポンスフィールド、コード例、DomScan連携のエラー処理を確認できます。

サブドメイン ファインダー

公開ホスト名の証拠を可能な範囲で返します。sources=ct パラメーターは互換パイプラインを選択します。このパイプラインは最初に crt.sh を試し、必要に応じて HackerTarget、ThreatMiner、Wayback Machine、CertSpotter の順に切り替えます。DomScan は名前のブルートフォースや対象サイトのクロールを行わないため、結果は完全な資産一覧ではありません。キャッシュ専用の未検出は HTTP 202、すべてのソースが失敗した場合は HTTP 503 を返します。どちらのレスポンスでもクレジットは返還されます。

GET /v1/subdomains

クエリパラメータ

パラメータタイプ説明
domain 必須 string サブドメインを検出するルート ドメイン(例:"github.com")
prefer_cache オプション boolean token キャッシュ済みの結果だけを返します。新しいキャッシュも古いキャッシュもない場合、API は 202 を返し、バックグラウンド更新をキューに入れ、リクエスト分のクレジットを返還します。使用できる値: true、false、1、0、yes、no。デフォルト: false。
sources オプション string 互換性を保つための選択値です。受け付けるのは ct のみです。これはパッシブ検出パイプラインを開始しますが、各結果には証拠を提供したプロバイダーとして crtshhackertargetthreatminerwaybackcertspotter のいずれかが記録されます。古いキャッシュ結果では ct と記録される場合があります。
verify オプション boolean token レスポンスに選ばれた名前だけを DNS で確認します。検証によって名前が追加で見つかることはありません。使用できる値: truefalse10yesno。デフォルト: false
include_wildcards オプション boolean token ワイルドカード証明書の証拠を別の wildcards 配列で返します。ワイルドカードは具体的なホスト名の結果には混在しません。使用できる値: truefalse10yesno。デフォルト: false
limit オプション integer 返す具体的なホスト名エントリの最大数です。1 から 2000 までの整数を指定します。デフォルト: 500。

ユースケース

  • 攻撃面マッピングとセキュリティ監査
  • 忘れられた可能性があるホスト名やシャドー IT のホスト名を確認
  • 買収前の技術デューディリジェンス
  • インフラストラクチャの競合分析
  • バグ報奨金調査

レスポンスフィールド

フィールド説明
subdomains[].name返されたホスト名。ソースに含まれている場合は apex も表示されます。
subdomains[].source証拠を提供したプロバイダー。値は crtsh、hackertarget、threatminer、wayback、certspotter、または古いキャッシュの ct です。
subdomains[].first_seencrt.sh と CertSpotter の証拠では、そのホスト名について見つかった有効な証明書のうち最も早い not-before 値です。ほかのパッシブなフォールバックソースには比較可能な証明書時刻がないため null を返します。
subdomains[].verifiedverify が有効で、返されたホスト名の DNS 解決に成功した場合だけ true です。それ以外は false です。
subdomains[].dns_records返されたホスト名を任意で検証した際の A レコードと CNAME レコードです。存在しない場合は null です。このフィールドによって結果に名前が追加されることはありません。
summary.total_foundレスポンスの上限を適用する前に見つかった具体的なホスト名エントリの総数です。ソースに含まれている場合は apex も数えます。
summary.verified_count任意の DNS 検証で解決できた、返却対象のホスト名の数です。

HTTP ステータスコード

HTTP ステータスコード説明
200 成功リクエスト成功
202 受理済みキャッシュ専用のサブドメイン要求でキャッシュ未命中となり、バックグラウンド更新を受理しました。クレジットは消費されません。Retry-After の時間後に再試行してください。
400 不正なリクエスト無効なパラメータ
402 支払いが必要このリクエストを実行するためのクレジットが不足しています。
503 サービス利用不可上流サービスが利用できないか、一時的にレート制限しています。
504 ゲートウェイタイムアウト上流の問い合わせがタイムアウトしました。

リクエスト例

curl -H "X-API-Key: your-api-key" "https://domscan.net/v1/subdomains?domain=example.com&sources=ct&include_wildcards=yes&limit=100"

curl -H "X-API-Key: your-api-key" "https://domscan.net/v1/subdomains?domain=example.com&sources=ct&verify=yes&limit=50"

curl -H "X-API-Key: your-api-key" "https://domscan.net/v1/subdomains?domain=example.com&prefer_cache=1"
import requests

domscan = requests.Session()
domscan.headers.update({"X-API-Key": "your-api-key"})

response = domscan.get(
    "https://domscan.net/v1/subdomains",
    params={
        "domain": "example.com",
        "sources": "ct",
        "verify": "yes",
        "include_wildcards": "yes",
        "limit": 100
    }
)
data = response.json()

print(f"Returned {data['summary']['returned']} hostname entries")
print(f"Verified: {data['summary']['verified_count']}")

live_subs = [s for s in data['subdomains'] if s['verified']]
for sub in live_subs[:10]:
    print(f"  {sub['name']}")
const domscanFetch = (url, options = {}) =>
  fetch(url, {
    ...options,
    headers: { ...options.headers, "X-API-Key": "your-api-key" },
  });

const response = await domscanFetch(
  'https://domscan.net/v1/subdomains?' + new URLSearchParams({
    domain: 'example.com',
    sources: 'ct',
    verify: 'yes',
    include_wildcards: 'yes',
    limit: '100'
  })
);
const data = await response.json();

console.log(`Returned ${data.summary.returned} hostname entries`);
console.log(`Verified: ${data.summary.verified_count}`);

data.subdomains
  .filter(s => s.verified)
  .forEach(s => console.log(`  ${s.name}`));

レスポンス例

{
  "domain": "example.com",
  "subdomains": [
    {
      "name": "api.example.com",
      "source": "crtsh",
      "first_seen": "2025-01-15T00:00:00Z",
      "verified": true,
      "dns_records": {
        "A": ["192.0.2.10"],
        "CNAME": null
      }
    }
  ],
  "wildcards": [
    {
      "pattern": "*.example.com",
      "source": "crtsh",
      "first_seen": "2024-11-20T00:00:00Z"
    }
  ],
  "summary": {
    "total_found": 1,
    "returned": 1,
    "verified_count": 1,
    "unverified_count": 0,
    "sources_used": ["crtsh"],
    "apex_included": false,
    "wildcard_suppressed_count": 1,
    "wildcard_returned_count": 1
  },
  "intelligence_summary": {
    "data_sources": ["crtsh"],
    "source_count": 1,
    "cache_status": "live",
    "returned_count": 1,
    "total_found": 1,
    "truncated": false,
    "limit": 100,
    "verification_requested": true,
    "include_wildcards": true,
    "verified_count": 1,
    "verified_ratio": 1,
    "live_dns_record_count": 1,
    "apex_included": false,
    "wildcard_suppressed_count": 1,
    "wildcard_returned_count": 1,
    "first_seen_oldest": "2025-01-15T00:00:00Z",
    "first_seen_newest": "2025-01-15T00:00:00Z",
    "warning_count": 0
  },
  "meta": {
    "query_time_ms": 184,
    "cached": false
  }
}

202 受理済み

{
  "status": "pending",
  "code": "CACHE_MISS_REFRESH_QUEUED",
  "message": "Try again in a moment",
  "domain": "example.com",
  "retry_after": 30,
  "credits_charged": 0,
  "billing_status": "not_charged",
  "request_id": "m8abc12-x9y8"
}
POST /v1/subdomains/bulk

ボディパラメータ

パラメータ タイプ 必須
domains string[] 必須
verify boolean オプション
include_wildcards boolean オプション
limit integer オプション

レスポンスフィールド

フィールド タイプ
results[] unknown[]
meta object
meta.total integer
meta.succeeded integer
meta.failed integer
meta.max_items integer
meta.credits_per_item integer
meta.duration_ms integer

リクエスト例

curl -X POST "https://domscan.net/v1/subdomains/bulk" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $DOMSCAN_API_KEY" \
  -d '{
  "domains": [
    "example.com",
    "cloudflare.com"
  ],
  "verify": false,
  "limit": 500
}'

レスポンス例

{
  "results": [
    null
  ],
  "meta": {
    "total": 1,
    "succeeded": 1,
    "failed": 1,
    "max_items": 10,
    "credits_per_item": 1,
    "duration_ms": 1
  }
}