CertH API リファレンス — エンドポイント・パラメータ・例
CertH API 完全リファレンス: スキャン・履歴・ランキング・監視・アラートのエンドポイント、認証・制限・エラーコード・curl 例。
POST
/api/scan
ドメイン・トレンド・アラートを監視: 不要
任意ドメインの即時スキャン: 等級・点数・因子・証明書情報を返却。スロットリング付きで保存。
curl -X POST https://certh.csr.plus/api/scan -H "Content-Type: application/json" -d '{"domain":"stripe.com"}'
GET
/api/public/domains/:domain/history
ドメイン・トレンド・アラートを監視: API キー任意
ランキング対象ドメインのスコア履歴: 無料 45 日、API キーでさらに解放(Pro 90 / Agency 365)。
curl "https://certh.csr.plus/api/public/domains/notion.so/history?days=90" -H "x-api-key: ch_xxx"
GET
/api/leaderboard
ドメイン・トレンド・アラートを監視: 不要
世界の TLS ヘルスランキング。page/pageSize/sort/grade/q パラメータ対応。
curl "https://certh.csr.plus/api/leaderboard?page=1&pageSize=50&sort=score&grade=A%2B"
GET
/api/domain/:domain
ドメイン・トレンド・アラートを監視: 不要
ドメインの最新スキャン状態(latest_snapshot 1 行)。
curl https://certh.csr.plus/api/domain/stripe.com
GET
/api/plans
ドメイン・トレンド・アラートを監視: 不要
プラン一覧(free / Pro / Agency の機能境界)。
curl https://certh.csr.plus/api/plans
GET
/api/me
ドメイン・トレンド・アラートを監視: Session Cookie (OAuth) 或 ?api_key=
現在のユーザー情報・プラン・API キー。
curl -b cookie.txt https://certh.csr.plus/api/me
GET/POST/DELETE
/api/domains
ドメイン・トレンド・アラートを監視: JWT
監視ドメイン管理(追加・一覧・削除。追加時に即スキャンして保存)。
curl -X POST https://certh.csr.plus/api/domains -H "Authorization: Bearer <jwt>" -H "Content-Type: application/json" -d '{"domain":"example.com"}'
GET
/api/domains/:domain/history|events
ドメイン・トレンド・アラートを監視: JWT
自分のドメインのプライベート履歴スナップショットと変更イベント(アラート・ローテーション等)。
curl "https://certh.csr.plus/api/domains/example.com/history?days=90" -H "Authorization: Bearer <jwt>"
POST
/api/ingest
ドメイン・トレンド・アラートを監視: API Key
自前サーバーのスキャン結果を報告(上位プラン)し、監視パイプラインに統合。
curl -X POST https://certh.csr.plus/api/ingest -H "x-api-key: ch_xxx" -H "Content-Type: application/json" -d '{"domain":"example.com","result":{...}}'
GET
/api/discover
ドメイン・トレンド・アラートを監視: JWT
CT ログによる新規サブドメイン/証明書の発見。
curl https://certh.csr.plus/api/discover -H "Authorization: Bearer <jwt>"
GET/POST/DELETE
/api/alert-rules
ドメイン・トレンド・アラートを監視: JWT
アラートルール管理(等級低下・有効期限・ローテーション等の通知)。
curl -X POST https://certh.csr.plus/api/alert-rules -H "Authorization: Bearer <jwt>" -H "Content-Type: application/json" -d '{"domain":"example.com","type":"GRADE_CHANGE","target":"you@x.com"}'
レート制限とデータ方針
- 公開クエリは保存されます: 新規ドメインは IP ごと 1 日 20 件まで、同一ドメインは 1 時間に 1 件。
- 保持: ランキング(system)データは 365 日以上保持、無料 API は 45 日に制限。
- バッジ: エッジキャッシュ 1 時間(max-age=3600)。URL にクエリを付けると強制更新。
- エラーコード: 400 不正なパラメータ / 401 未認証 / 403 権限なしまたは上限 / 404 データなし / 422 スキャン失敗 / 429 レート超過。
よくある質問
無料ユーザーはどのくらいの履歴を取得できますか?
無料ユーザーは登録なしで 45 日分の履歴を取得可能。Pro は API キーで 90 日、Agency は 365 日を解放。
API キーはどこで取得できますか?
ダッシュボードにログインすると ch_ 接頭辞のキーが自動生成され、x-api-key ヘッダーまたは ?api_key パラメータで送信。
クエリはデータベースに保存されますか?
公開クエリはスロットリング付きで保存: 初回スキャンでレコード作成、以降は履歴に追加(同一ドメイン 1 時間に 1 回まで)。