v1
latestOpenAPI 3.1.02026-08-066132.7 KBGet code from a remote public git repository — either a specific function/class by name, a line range, or a full file. PREFERRED WORKFLOW: When search results or findings have already identified a specific function, method, or class, use symbol_name to extract just that declaration. This avoids fetching entire files and keeps context focused. Only fetch full files when you need a broad understanding of a file you haven't seen before. For supported languages (Go, Python, TypeScript, JavaScript, Java, C, C++, C#, Kotlin, Swift, Rust) the response includes a symbols list of declarations with line ranges. This is not a first-call tool — use code_analyze or code_search first to identify targets, then extract precisely what you need.
post/api/v1/code_get_file
Query parameters
clientstring required
Client identifier for your application (e.g. 'my-app-v1'). Required for all REST API requests.
Request body
Response
Successful response
object required