LogoHub矢量图资源库
开放接口

开放 API

品牌元数据、矢量源码与栅格图均可直接读取。接口全部为只读公共资源,无需注册、无需密钥。

端点协议HTTPS · GET
https://logohub.afengblog.com/api

统一返回 application/json; charset=utf-8,按来源 IP 限流 20 请求/秒

接口一览

GET https://logohub.afengblog.com/api/search?q=&category=&sort=&limit=&offset=关键词检索,支持中文名、英文名、拼音全拼与拼音首字母;q 必填,单次最多返回 20 条,sort 取 latest / name
GET https://logohub.afengblog.com/api/logos/:slug单个品牌元数据,包含内联 SVG 源码与资源 URL
GET https://logohub.afengblog.com/api/logos?q=&category=&sort=&limit=&offset=列表与筛选,默认不含 SVG 源码;limit 上限 20,sort 取 latest / name
GET https://logohub.afengblog.com/api/stats收录总量、各分类计数与最近入库时间
GET https://logohub.afengblog.com/api/health服务与数据库健康状态,数据库未就绪时返回 503

资源 URL

每条 logo JSON 附带 urls 字段,直接在响应内给出下列完整地址,无需自行拼接域名。

pagehttps://logohub.afengblog.com/logo/{slug} 品牌详情页
svghttps://logohub.afengblog.com/logos/{svgFile} 原始矢量文件,静态直出
pnghttps://logohub.afengblog.com/logos/{slug}.png 1024×1024 透明 PNG
jpghttps://logohub.afengblog.com/logos/{slug}.jpg 1024×1024 白底 JPEG
webphttps://logohub.afengblog.com/logos/{slug}.webp 1024×1024 透明 WebP

栅格图按 slug 即时生成,固定等比装入 1024×1024。PNG 与 WebP 保留透明通道,JPEG 为白底,响应头带 Cache-Control: public, max-age=31536000,可安全长期缓存。

限流

  • https://logohub.afengblog.com/api/*、https://logohub.afengblog.com/mcp 与栅格图按来源 IP 限制 20 请求/秒。
  • 超限返回 429 与 Retry-After,响应头携带 X-RateLimit-Limit 与 X-RateLimit-Remaining。
  • HTML 页面与静态矢量文件不限流。

示例

拼音检索
curl "https://logohub.afengblog.com/api/search?q=zhifubao&limit=5"
单品牌详情
curl "https://logohub.afengblog.com/api/logos/alipay"
分类列表
curl "https://logohub.afengblog.com/api/logos?category=school&limit=5"
下载 1024px PNG
curl -o alipay.png "https://logohub.afengblog.com/logos/alipay.png"
使用范围

全部品牌标志与商标的知识产权归原权利人所有。内容依据《中华人民共和国著作权法》第二十四条仅供个人学习、学术交流、技术研发与设计鉴赏,禁止未经授权的商业使用。侵权下架申请

操作已完成