Skip to main content
The full-text query endpoints let you search across the knowledge graph using exact identifiers, partial keywords, or source code snippets. BugViper uses a three-tier search strategy: a fulltext index on symbol names, docstrings, and source code; a name CONTAINS fallback; and line-by-line file content search. Symbol results rank higher than file-content line matches. All search endpoints accept optional repo_owner and repo_name parameters to scope results to a specific repository.

GET /api/v1/query/search

Unified search across all node types (functions, classes, variables) and raw file content.
query
string
required
Search term — any identifier, code snippet, or keyword. Maximum 500 characters.
limit
number
default:"30"
Maximum number of results to return.
repo_owner
string
Filter results to a specific repository owner (e.g. acme-corp). Must be combined with repo_name.
repo_name
string
Filter results to a specific repository name (e.g. my-api). Must be combined with repo_owner.

Response

results
object[]
Ranked list of matching code nodes or file lines.
total
number
Number of results returned (after applying limit).
query
string
The original query string, echoed back.

Examples

curl "https://your-bugviper-instance/api/v1/query/search?query=ingest_github_repository&repo_owner=acme-corp&repo_name=my-api" \
  -H "Authorization: Bearer YOUR_FIREBASE_ID_TOKEN"

GET /api/v1/query/method-usages

Finds every location in the graph where a specific method is called or referenced.
method_name
string
required
Name of the method to find usages for.
repo_owner
string
Filter to a specific repository owner.
repo_name
string
Filter to a specific repository name.

Example

curl "https://your-bugviper-instance/api/v1/query/method-usages?method_name=get_graph_stats" \
  -H "Authorization: Bearer YOUR_FIREBASE_ID_TOKEN"

GET /api/v1/query/find_callers

Returns all functions and methods in the graph that call a specific symbol.
symbol_name
string
required
Name of the symbol to find callers for.
repo_owner
string
Filter to a specific repository owner.
repo_name
string
Filter to a specific repository name.

Example

curl "https://your-bugviper-instance/api/v1/query/find_callers?symbol_name=semantic_search&repo_owner=acme-corp&repo_name=my-api" \
  -H "Authorization: Bearer YOUR_FIREBASE_ID_TOKEN"

GET /api/v1/query/class_hierarchy

Returns the full inheritance tree for a class — both parent classes (ancestors) and child classes (subclasses).
class_name
string
required
Name of the class to analyze.
repo_owner
string
Filter to a specific repository owner.
repo_name
string
Filter to a specific repository name.

Example

curl "https://your-bugviper-instance/api/v1/query/class_hierarchy?class_name=CodeSearchService" \
  -H "Authorization: Bearer YOUR_FIREBASE_ID_TOKEN"

GET /api/v1/query/change_impact

Analyzes the blast radius of modifying a specific symbol. BugViper collects all usages and callers from the graph and classifies the overall impact level.
symbol_name
string
required
Name of the symbol to analyze.
repo_owner
string
Filter to a specific repository owner.
repo_name
string
Filter to a specific repository name.

Response

symbol
string
The symbol name that was analyzed.
usages
object
All locations where the symbol is used (from method-usages).
callers
object[]
List of functions that directly call this symbol.
definitions
object[]
Definition sites for the symbol in the graph.
impact_level
string
"high" (more than 5 callers), "medium" (1–5 callers), or "low" (no callers found).

Example

curl "https://your-bugviper-instance/api/v1/query/change_impact?symbol_name=embed_texts&repo_owner=acme-corp&repo_name=my-api" \
  -H "Authorization: Bearer YOUR_FIREBASE_ID_TOKEN"

GET /api/v1/query/stats

Returns overall statistics for the entire Neo4j knowledge graph — total node counts by type, relationship counts, and repository count.
Authorization
string
required
Firebase ID token. Format: Bearer <token>.

Example

curl https://your-bugviper-instance/api/v1/query/stats \
  -H "Authorization: Bearer YOUR_FIREBASE_ID_TOKEN"