返回 | 接口 / 实用工具 / Github预览
GET 实用工具

Github预览

接口缓存72小时,可手动刷新

累计调用 7 今日调用 0

更新于 2026-10-16

调用地址

GET
https://itapi.top/api/GithubPreview

请求参数

参数名类型必填说明示例
url string 必填 git仓库链接/git个人主页链接 暂无
clear string 可选 当此参数存在,且不为空则刷新缓存(刷新缓存速度会慢很多) 暂无

响应示例

200 OK
(该接口直接返回二进制图片,Content-Type: image/png; charset=utf-8。用 <img src="https://itapi.top/api/GithubPreview?url=https%3A%2F%2Fitapi.top%2Fog.png"> 直接展示即可;示例不粘贴二进制内容)

在线测试

代码示例

cURL · GET
curl "https://itapi.top/api/GithubPreview?url=%E6%9A%82%E6%97%A0&clear=%E6%9A%82%E6%97%A0"
PHP
<?php
$res  = file_get_contents("https://itapi.top/api/GithubPreview?url=%E6%9A%82%E6%97%A0&clear=%E6%9A%82%E6%97%A0");
$json = json_decode($res, true);
print_r($json);
JavaScript
const res  = await fetch("https://itapi.top/api/GithubPreview?url=%E6%9A%82%E6%97%A0&clear=%E6%9A%82%E6%97%A0");
const json = await res.json();
console.log(json);
Python
import requests

r = requests.get("https://itapi.top/api/GithubPreview?url=%E6%9A%82%E6%97%A0&clear=%E6%9A%82%E6%97%A0", timeout=10)
print(r.json())
返回接口列表