Authenticated API
DNS
Cloudflare / Google / Quad9 / AdGuard / OpenDNS の DoH endpoint を並列に叩き、DNS 伝播状況と TTL を返却します。
Endpoint
GET /api/v1/dns?host=example.com&type=A
認証
ログイン済みブラウザセッション、または Authorization: Bearer <ioh_live_...> ヘッダの API キーが必要です。
パラメタ
| 名前 | 型 | 必須 | 説明 |
|---|---|---|---|
| host | string | 必須 | 対象ホスト |
| type | enum | 任意 | A / AAAA / MX / NS / TXT / CAA / SOA / CNAME。省略時は A |
curl サンプル
curl "https://infra.yuzlrin.jp/api/v1/dns?host=example.com&type=A" \
-H "Authorization: Bearer ioh_live_xxxxxxxxxxxxxxxxxxxxxxxx"レスポンス例
{
"host": "example.com",
"type": "A",
"queries": [
{ "resolver": "Cloudflare", "type": "A", "records": ["93.184.216.34"],
"rcode": 0, "rcodeLabel": "NOERROR", "durationMs": 42 },
{ "resolver": "Google", "type": "A", "records": ["93.184.216.34"],
"rcode": 0, "rcodeLabel": "NOERROR", "durationMs": 35 }
],
"consistent": true,
"uniqueValues": ["93.184.216.34"],
"successfulResolvers": 5,
"failedResolvers": 0,
"status": "ok",
"summary": "すべての resolver で値が一致しています",
"totalDurationMs": 86
}共通エラー
| Status | code | 意味 |
|---|---|---|
| 400 | missing_parameter / invalid_host / invalid_url / invalid_parameter / ssrf_blocked | 入力不正または SSRF 保護による拒否。ssrf_blocked は reason を含む場合があります。 |
| 401 | auth_required / invalid_api_key / api_key_required | ログインまたは API キーが必要です。Site Health Check は API キー専用です。 |
| 413 / 415 | payload_too_large / unsupported_media_type | POST JSON のサイズ超過または Content-Type 不一致。 |
| 429 | rate_limited | レスポンス本文に resetInSec、ヘッダに Retry-After を含みます。 |
| 500 | internal_error | 内部エラー。エラー応答は Cache-Control: no-store です。 |
{
"error": "Invalid URL",
"code": "invalid_url"
}
{
"error": "Rate limited",
"code": "rate_limited",
"resetInSec": 3600
}制限事項
- ログインセッション 300 回 / 日。API キー Free プラン 1000 回 / 日 + 30000 回 / 月。
- SSRF 保護 — private IP / metadata ホストへのリクエストは拒否。
- 通信量・対象負荷を配慮した利用をお願いします。