可直接复制使用的 favicon URL 模板(基于免费服务)。
Mzu favicondl 提供可直接复制的 favicon URL 模板与图标提取页面。默认启用 Cloudflare Worker 来发现更真实的图标来源,并通过图片代理支持下载。
平均响应时间小于100ms
完全免费,无需注册
99.9% 可用性保障
本项目使用免费的 Favicon 服务 URL 模板,不需要任何认证或 API Key。
注意: 虽然我们不需要API Key,但请合理使用服务,避免过度请求。
FaviconDL Extract API
查找并下载指定域名或网址的可用 favicon
https://favicondl.com/api/extract
https://favicondl.com/api/extract?url=example.com&size=128
| 参数名 | 类型 | 必需 | 默认值 | 描述 |
|---|---|---|---|---|
url |
string | 是 | - | 目标域名或网址,如:example.com |
size |
number | 否 | 128 | 期望的图标尺寸,范围会限制在 16 到 512 像素 |
format |
string | 否 | redirect | 使用 json 获取元数据;省略时直接跳转到可下载图片 |
支持域名和完整网址:
期望的图标尺寸,范围为 16 到 512 像素:
16 - 16x1632 - 32x32128 - 128x128512 - 512x512 when supported{
"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会直接重定向到图标URL,不返回JSON响应。
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;
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)
<!-- 在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 | 网站没有favicon图标 | 该网站可能没有设置favicon图标 |
| 429 | rate_limit_exceeded | 请求频率过高 | 降低请求频率,稍后重试 |
| 500 | internal_error | 服务器内部错误 | 服务暂时不可用,请稍后重试 |
无需注册,完全免费使用所有功能
商业用户建议联系我们获取更高的使用配额和优先支持