
MetaThief 一个快速获取网址 meta 信息的工具
开源项目SEOMetadataAPIDeveloper
只需要输入一个链接,就能够快速获取网站的所有元信息,同时还支持通过 API 访问。
因为有时候需要将一些网址整理到导航站,每次从布局代码里找这些元信息并不方便,于是写了一个直接获取 meta 标签信息的工具。初次尝试独立开发,做的一个小工具。
功能介绍
只需要输入一个链接,就可以快速获取所有元信息,为了方便使用,也支持通过 API 访问。
- 支持基础元数据获取,支持获取 Open Graph
- 网站多图标获取,例如 favicon、icons
- 抓取站点 robots.txt 信息
支持的元标签:
- language
- charset
- viewport
- title
- description
- keywords
- favicon
- author
- generator
- theme
- canonical
- ogUrl
- ogTitle
- ogSiteName
- ogDescription
- ogImage
- ogImageAlt
- ogType
- twitterSite
- twitterCard
- twitterTitle
- twitterCreator
- twitterDescription
- twitterImage
- robots
- icons
API 使用
GET /api/meta?url=https://example.com
从指定的 URL 获取所有元数据信息。
查询参数:
- url(必需)- 获取元数据的 URL
- meta(可选)逗号分隔的特定元标签列表
示例:
-
获取所有元数据:
/api/meta?url=https://example.com
-
获取特定的元标签:
/api/meta?url=https://example.com&meta=title,description,favicon
响应格式:
{
"title": "Example Website",
"description": "Website description",
"favicon": "https://example.com/favicon.ico",
"icons": [
"https://example.com/favicon.ico",
"https://example.com/apple-touch-icon.png"
],
// ... other meta tags
}
错误响应格式:
{
"error": "Error message",
"message": "Detailed error description"
}