v2
Swagger 2.02026-08-01331211921.0 KBSearch for code in a team's repositories
This API will be deprecated on November 1, 2026.
Search for code in the repositories of the specified team.
Note that searches can match in the file's text (content_matches), the path (path_matches), or both.
You can use the same syntax for the search query as in the UI. E.g. to search for "foo" only within the repository "demo", use the query parameter search_query=foo+repo:demo.
Similar to other APIs, you can request more fields using a fields query parameter. E.g. to get some more information about the repository of matched files, use the query parameter search_query=foo&fields=%2Bvalues.file.commit.repository (the %2B is a URL-encoded +).
Try fields=%2Bvalues.*.*.*.* to get an idea what's possible.
Path parameters
The account to search in; either the username or the UUID in curly braces
Query parameters
The search query
Which page of the search results to retrieve
How many search results to retrieve per page
Response
Successful search