Developer
GitHub repo file-tree summary API
Pulls a repo's full recursive git tree and summarizes it: file/directory counts, total bytes, an extension histogram (top 20), files-per-top-level-directory, and the largest files. Turns a giant flat tree into a bounded structural map. Answers 'what's the layout of owner/repo', 'what file types dominate', 'which are the largest files', 'how big is this repo'.
Price$0.01per request
MethodPOST
Route/v1/dev/github-file-tree
StatusLive
MIME typeapplication/json
Rate limit60/minute
Cache43200s public
devgithubfile-treestructurerepositorylayoutextensionsinventory
API URL
Integration docshttps://x402.hexl.dev/v1/dev/github-file-treeExample request
{
"repo": "expressjs/express",
"maxFiles": 5
}Example response
{
"repo": "expressjs/express",
"branch": "master",
"truncated": false,
"fileCount": 213,
"dirCount": 68,
"totalBytes": 706609,
"extensions": [
{
"ext": ".js",
"count": 141
},
{
"ext": ".ejs",
"count": 20
},
{
"ext": ".txt",
"count": 11
},
{
"ext": ".html",
"count": 8
},
{
"ext": ".tmpl",
"count": 7
}
],
"topLevel": [
{
"dir": "test",
"files": 112
},
{
"dir": "examples",
"files": 80
},
{
"dir": "lib",
"files": 6
},
{
"dir": ".github",
"files": 5
},
{
"dir": ".editorconfig",
"files": 1
}
],
"largestFiles": [
{
"path": "History.md",
"sizeBytes": 124521
},
{
"path": "test/app.router.js",
"sizeBytes": 29831
},
{
"path": "test/express.urlencoded.js",
"sizeBytes": 26741
}
]
}Input schema
{
"type": "object",
"required": [
"repo"
],
"properties": {
"repo": {
"type": "string",
"description": "'owner/name' or github.com URL."
},
"branch": {
"type": "string",
"description": "Branch/ref (defaults to the repo's default branch)."
},
"maxFiles": {
"type": "integer",
"minimum": 1,
"maximum": 50,
"default": 15,
"description": "How many largest files to list."
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}