開発者向けリファレンス

リダイレクト チェーン APIドキュメント

リダイレクト チェーン APIドキュメント: URLリダイレクト チェーンをたどって、HTTPS アップグレード、ドメイン変更、最終ランディング ページを検出します。SEO分析、セキュリティ監査、URLルーティングの理解に役立ちます。301、302、303、307、308を含むすべての3xx リダイレクトを追跡します。

リダイレクト チェーン

URLリダイレクト チェーンをたどって、HTTPS アップグレード、ドメイン変更、最終ランディング ページを検出します。SEO分析、セキュリティ監査、URLルーティングの理解に役立ちます。301、302、303、307、308を含むすべての3xx リダイレクトを追跡します。

GET /v1/redirects

クエリパラメータ

パラメータタイプ説明
url 必須 string たどる開始URL(例:"http://example.com")
max_redirects オプション number たどるリダイレクトの最大数(デフォルト:10、最大:20)

レスポンスフィールド

フィールドタイプ説明
original_urlstring提供された開始URL
final_urlstringすべてのリダイレクト後の最終URL
redirect_countnumber従ったリダイレクトの総数
https_upgradebooleanHTTPが HTTPSにアップグレードされたかどうか
chainarrayURL、ステータス コード、位置を含む各リダイレクト

リクエスト例

curl "https://domscan.net/v1/redirects?url=http://github.com"
const response = await fetch(
  "https://domscan.net/v1/redirects?url=" + encodeURIComponent("http://github.com")
);
const data = await response.json();

console.log(`Final URL: ${data.final_url}`);
console.log(`Redirects: ${data.redirect_count}`);
console.log(`HTTPS upgrade: ${data.https_upgrade}`);

data.chain.forEach((hop, i) => {
  console.log(`${i + 1}. ${hop.status} ${hop.url} → ${hop.location}`);
});
import requests
from urllib.parse import quote

url = quote("http://github.com", safe='')
response = requests.get(f"https://domscan.net/v1/redirects?url={url}")
data = response.json()

print(f"Final URL: {data['final_url']}")
print(f"HTTPS upgrade: {data['https_upgrade']}")
for i, hop in enumerate(data['chain']):
    print(f"{i+1}. [{hop['status']}] {hop['url']}")

レスポンス例

{
  "original_url": "http://github.com",
  "final_url": "https://github.com/",
  "redirect_count": 1,
  "chain": [
    {
      "url": "http://github.com",
      "status": 301,
      "location": "https://github.com/",
      "response_time_ms": 45
    }
  ],
  "https_upgrade": true,
  "domain_change": false,
  "total_time_ms": 156
}

素晴らしい企業の人々に使用されています

VercelLLM PulseOLXCasa ModernaPipeCal.comBeehiivSnykTogglRemoteSprigDeel