v1

latestOpenAPI 3.1.02026-08-066132.7 KB

List files and directories in any public git repo. Supports fuzzy file search (query parameter), language/path filtering, and depth control. Use to explore project layout, find files by name, or browse specific directories. Results capped at 1000 files; response includes total_files, files_shown, and truncated fields. Use language or path_filter to narrow large repos. Dependency/build directories excluded by default.

post/api/v1/code_file_tree

Query parameters

clientstring required

Client identifier for your application (e.g. 'my-app-v1'). Required for all REST API requests.

Request body

include_all_dirsboolean

Include dependency/build/cache directories that are excluded by default (vendor, node_modules, third_party, target, build, dist, Pods, generated, etc.). Set to true if you need to see generated/vendored code in the tree.

include_statsboolean

If true, include line count and file size for each file.

languagestring

Filter to only show files of this language (e.g. "Go", "Java").

max_depthinteger

Maximum directory depth to return. If omitted, returns full tree.

max_resultsinteger

Max fuzzy matches to return (default 20, max 100). Only used with query.

path_filterstring

Filter to restrict tree to matching paths. Supports both glob patterns (e.g. 'pkg/', 'src//*.go') and token-style filters (e.g. 'pkg/api .go'). Glob patterns are auto-converted to token filters. Mutually exclusive with query.

querystring

Fuzzy search query for finding files by approximate name. Returns ranked matches instead of tree. Examples: 'main.go', 'auth handler'. Mutually exclusive with path_filter.

repositorystring required

Git URL of a public remote repository

Response

Successful response

object required