GET /api/v1/query/code-finder/function
Finds function nodes by name. Supports exact and fuzzy matching.Function name to search for.
Enable fuzzy matching to find functions with similar names.
Filter to a specific repository owner.
Filter to a specific repository name.
Response
The query name.
Whether fuzzy matching was enabled.
Matching function nodes with name, path, line_number, and source_code.
Number of matches returned.
GET /api/v1/query/code-finder/class
Finds class nodes by name. Supports exact and fuzzy matching.Class name to search for.
Enable fuzzy matching.
Filter to a specific repository owner.
Filter to a specific repository name.
Response
The query name.
Whether fuzzy matching was enabled.
Matching class nodes.
Number of matches returned.
GET /api/v1/query/code-finder/variable
Finds variable nodes whose name contains the given substring.Variable name or substring to search for.
Filter to a specific repository owner.
Filter to a specific repository name.
GET /api/v1/query/code-finder/content
Finds functions, classes, and variables whose source code contains a given pattern. Useful when you remember a code pattern but not the symbol name.Pattern to match against the
source_code property of graph nodes.Filter to a specific repository owner.
Filter to a specific repository name.
GET /api/v1/query/code-finder/module
Finds module nodes by name. Module nodes represent files or packages as stored in the graph.Module name to search for.
GET /api/v1/query/code-finder/imports
Finds import statement nodes by import name or alias.Import name or alias to search for (e.g.
fastapi, APIRouter, np).Filter to a specific repository owner.
Filter to a specific repository name.
GET /api/v1/query/code-finder/peek
Returns a window of lines from a file stored in the graph, centered on an anchor line. Use this endpoint to view context around a result fromcode-finder/line or any endpoint that returns a path and line_number.
File path as stored in the graph. This is the absolute or repo-relative path recorded during ingestion.
Anchor line number (1-indexed). Defaults to
1 if omitted. The anchor line is flagged with is_anchor: true in the response.Number of lines to include above the anchor. Maximum 200.
Number of lines to include below the anchor. Maximum 200.
Filter to a specific repository owner.
Filter to a specific repository name.
Response
Array of line objects in the requested window.
Example
GET /api/v1/query/code-finder/complexity
Returns the cyclomatic complexity score and risk level for a specific function.Name of the function to analyze.
Optional file path filter. Use this when multiple functions share the same name across different files.
Filter to a specific repository owner.
Filter to a specific repository name.
Response
The queried function name.
The path filter applied, or
null.Complexity result including the numeric score and a risk level label.
Error responses
| Status | Cause |
|---|---|
404 | No function with that name (and optional path) was found in the graph. |
GET /api/v1/query/code-finder/complexity/top
Returns the top N most complex functions across the graph, ranked by cyclomatic complexity score in descending order. Use this to identify the highest-risk functions in a codebase.Number of functions to return.
Filter to a specific repository owner.
Filter to a specific repository name.
Response
The requested limit.
Functions ranked by complexity score, highest first. Each object includes name, path, line_number, complexity score, and risk level.
Number of results returned.