API 广场 / 软件 / GitHub 仓库信息
API

GitHub 仓库信息

查开源项目的 star、fork、语言与许可证

免费 正常 GET 软件
返回首页
https://api.github.com/repos/{owner}/{repo}
GET
https://api.github.com/repos/microsoft/vscode

接口说明

GitHub 官方 REST API,owner 是用户名或组织,repo 是仓库名。例如 microsoft/vscode。

返回 stargazers_count(star 数)、forks_count、open_issues_count、language(主语言)、description、license、created_at、pushed_at(最后提交时间)。

未认证请求每小时 60 次,超了会返回 403 并提示 rate limit。做项目展示墙、更新监控时建议服务端缓存 10 分钟,或者带上自己的 token 走 Authorization 头。私有仓库只能带 token 访问。

请求参数说明

参数名类型必填默认值说明
owner string 必填 microsoft 用户名或组织名
repo string 必填 vscode 仓库名

在线调试 (GET)

支持自定义参数,GET 拼在链接上,POST 放在请求体
请求链接预览 https://api.github.com/repos/{owner}/{repo}
此处将显示接口返回结果…

返回示例

{
  "full_name": "microsoft/vscode",
  "description": "Visual Studio Code",
  "stargazers_count": 168000,
  "forks_count": 30500,
  "language": "TypeScript",
  "license": { "spdx_id": "MIT" }
}
—