Skip to content

链接OG信息解析

抓取网页的 Open Graph (OG) 元数据,返回结构化链接预览信息,适用于社交媒体分享、内容聚合、链接卡片生成等场景。

请求地址

地址协议方法QPS 限制线路
api.niany.cn/v2/ogHTTPSAny暂无海外

请求参数

参数值参数类型参数说明
urlstring请求网址

请求示例

https://api.niany.cn/v2/og?url=https://github.com

返回参数(基本)

返回参数返回类型返回说明
codeinteger状态码 (200表示成功)
messagestring接口消息
dataobject核心数据
debugobject调试信息

返回参数(data)

返回参数返回类型返回说明
titlestring网站标题
imagestring网站icon图标
descriptionstring网站描述
点我查看返回json数据示例
json
{
  "code": 200,
  "message": "所有数据均来自官方,确保稳定与实时",
  "data": {
    "title": "GitHub · Build and ship software on a single, collaborative platform",
    "image": "https://github.githubassets.com/assets/home24-5939032587c9.jpg",
    "description": "Join the world's most widely adopted, AI-powered developer platform where millions of developers, businesses, and the largest open source community build software that advances humanity."
  },
  "__debug__": {
    "api_name": "NianYi-api",
    "api_version": "2.13.4",
    "api_docs": "https://api.niany.cn/",
    "author": "NianYi_Wiki",
    "updated": "2025/03/22 13:27:50",
    "updated_at": 1742621270000
  }
}

© 2024 Nian Yi. 保留所有权利。