Favicon API & URL Guide

コピーして使えるファビコンURLテンプレート(無料サービスベース)。

概要

Mzu favicondlはコピー可能なファビコンURLテンプレートとファビコン抽出UIを提供します。デフォルトではCloudflare Workerを使用してアイコンを検出し、ダウンロード用に画像をプロキシします。

高速

高速プレビューのための最適化

無料

登録不要

安定

高可用性を設計

認証

本プロジェクトは無料のファビコンサービスURLテンプレートを使用しており、認証やAPIキーは不要です。

注意: APIキーは不要ですが、過度なリクエストを避け、合理的にご利用ください。

エンドポイント

GET FaviconDL Extract API

Find and download a usable favicon for a domain or URL

ベースURL:

https://favicondl.com/api/extract

完全な例:

https://favicondl.com/api/extract?url=example.com&size=128

パラメーター

パラメーター名 型 必須 デフォルト値 説明
url string はい - The target domain or URL, e.g. example.com
size number いいえ 128 The preferred icon size in pixels, clamped to 16-512
format string いいえ redirect Use json for metadata; omit it for a downloadable image redirect

パラメーター詳細:

url

Supports domains and full website URLs:

  • • example.com
  • • www.example.com
  • • https://example.com/docs
  • • sub.example.com
size

Preferred icon size, from 16 to 512 pixels:

  • • 16 - 16x16
  • • 32 - 32x32
  • • 128 - 128x128
  • • 512 - 512x512 when supported

レスポンス

成功レスポンス(JSON形式)

JSONレスポンス
{
  "ok": true,
  "domain": "example.com",
  "size": 128,
  "iconUrl": "https://example.com/favicon.svg",
  "proxyUrl": "https://favicondl.com/api/proxy?url=...",
  "source": "html"
}

エラーレスポンス

エラーレスポンス
{
  "success": false,
  "error": "Domain not found",
  "message": "Unable to find favicon for the specified domain",
  "code": 404,
  "timestamp": "2026-01-15T10:30:00Z"
}

注意: format=redirect使用時、APIはJSONレスポンスを返さず、ファビコンURLに直接リダイレクトします。

使用例

JavaScript (Fetch)

JavaScript
async function getFavicon(url, size = 128) {
  const endpoint = new URL('https://favicondl.com/api/extract');
  endpoint.searchParams.set('url', url);
  endpoint.searchParams.set('size', String(size));
  const response = await fetch(endpoint);
  if (!response.ok) throw new Error(`Favicon request failed: ${response.status}`);
  return await response.blob();
}

const icon = await getFavicon('example.com', 128);
const imageUrl = URL.createObjectURL(icon);
document.querySelector('#favicon-preview').src = imageUrl;

Python (Requests)

Python
import requests

def get_favicon(url: str, size: int = 128) -> bytes:
    response = requests.get(
        "https://favicondl.com/api/extract",
        params={"url": url, "size": size},
        timeout=15,
    )
    response.raise_for_status()
    return response.content

icon_bytes = get_favicon("example.com", 128)
with open("example-favicon", "wb") as output:
    output.write(icon_bytes)

PHP (cURL)

PHP

HTML直接参照

HTML
<!-- 在HTML中直接引用favicon -->
<img src="https://favicondl.com/api/extract?url=example.com&size=32" alt="example.com favicon" width="32" height="32">

<!-- 使用大尺寸图标 -->
<img src="https://favicondl.com/api/extract?url=example.com&size=128" alt="example.com favicon" width="128" height="128">

<!-- 作为网站favicon -->
<link rel="icon" type="image/png" href="https://favicondl.com/api/extract?url=example.com&size=32">

エラー

エラー発生時、APIは対応するHTTPステータスコードとエラーメッセージを返します。

HTTPステータスコード エラーコード 説明 解決策
400 invalid_domain ドメイン形式が無効 ドメイン形式を確認し、有効なドメインであることを確認してください
404 domain_not_found ドメインが見つかりません ドメインが正しく、ウェブサイトにアクセス可能であることを確認してください
404 favicon_not_found ファビコンが見つかりません ウェブサイトがファビコンを設定していない可能性があります
429 rate_limit_exceeded レート制限超過 リクエスト頻度を減らし、後で再試行してください
500 internal_error 内部サーバーエラー サービスが一時的に利用できません。後で再試行してください

レート制限

無料

登録不要、すべての機能を完全無料で利用可能

リクエスト制限

  • • 1分あたり最大100リクエスト
  • • 1時間あたり最大1000リクエスト
  • • 1日あたり最大10000リクエスト

商用利用

商用ユーザーには、より高い使用量と優先サポートについてお問い合わせいただくことをお勧めします

コピーしました!