API Service

gh-tree

Recursive file trees and file contents from any public GitHub repository. Simple, fast, cached.

Endpoint Pattern

GET / api/ :user / :repo
GET / api/ :user / :repo / contents ? path=...
tree output file contents metadata stats

Try Tree: iamkaf/gh-tree Try Contents

curl
curl "/api/iamkaf/gh-tree"
javascript
fetch("/api/iamkaf/gh-tree")
  .then(res => res.json())
  .then(data => console.log(data));
python
import requests

response = requests.get("/api/iamkaf/gh-tree/contents?path=functions/api/types.ts")
data = response.json()
print(data)
Copied!