Search code
Search finds literal text or regular-expression patterns in indexed open-source code. Results stream into the table while the search runs, so you can begin reviewing before it finishes.
Search for literal text
Section titled “Search for literal text”Enter the text you want to find, leave Use regex unchecked, and select Search.
| Query | Looks for |
|---|---|
api.example.com | That exact text |
TODO | Uppercase TODO |
BEGIN PUBLIC KEY | That phrase in file content |
Literal search is case-sensitive. Enter the text directly, without surrounding quotation marks unless you want to find those marks too.
The query box accepts up to 2,048 characters. A distinctive phrase usually produces a more useful result set than a common word.
Search with regular expressions
Section titled “Search with regular expressions”Enable Use regex and enter an RE2 pattern without surrounding slash delimiters.
| Pattern | Example matches |
|---|---|
api[_-]?key | apikey, api_key, api-key |
https://api[.]example[.]com | A particular URL |
| `(staging | production)[_-]url` |
Regex search is also case-sensitive by default. RE2 does not support lookaround or backreferences. If a pattern is rejected, simplify it and try again.
The main query searches file content. To restrict the search to a defined investigation scope, open Search collection from a Collection. The current search box does not provide GitHub-style repo: or path: modifiers; repository and file-type controls in the table filter matches already received.
Read the results
Section titled “Read the results”Each row identifies a repository and file. Optional columns include matching code, file type, byte size, and commit. Select the file path to open the preview drawer.
The preview comes from the indexed snapshot. The repository’s current version may differ. A snippet is an excerpt, not a full-file download.
Use Columns to choose optional columns or enable compact rows. Sorting changes the order of the received rows.
Filter received matches
Section titled “Filter received matches”The table supports text, repository, file-type, and saved-status filters. The text filter checks repository, file, and snippet text.
These controls operate on matches already delivered to the browser. They do not rerun the underlying search or expand the corpus. Use Clear filters when received matches appear to be missing.
Search completion and partial results
Section titled “Search completion and partial results”| Status | Meaning | Next step |
|---|---|---|
| Searching | The request is still receiving results | Continue reviewing or wait |
| Partial results | The request ended before a complete response | Keep useful hits and retry or refine |
| Stopped | You selected Stop search | Review the hits already received |
| First 100 matches | The displayed match limit was reached | Use a more specific query |
| No matching code | The completed request returned no matches | Try another term or pattern |
Stop search retains matches already received. Retry starts a new request; it does not resume the previous result stream.
A zero-result response describes the indexed snapshots searched. It does not prove that the text is absent from all of GitHub.
Save and export
Section titled “Save and export”Select Save beside a match, or Save to Results in its drawer. Saved matches are associated with the current workspace.
For export, select rows if you want a subset, then choose Export selected. Without a selection, Export uses the filtered received matches. Choose CSV or JSON.
Exports contain received matches only. JSON also records the query, regex setting, filters, incomplete-search status, and whether the result limit was reached. Exporting while a search is running produces an incomplete set.
Search allowance
Section titled “Search allowance”The Search page shows the account’s remaining daily searches. Running a query again, retrying, or reopening a saved query can use another search. Filtering received rows and exporting them do not start a search. See Account and plans for current limits.
Recent searches
Section titled “Recent searches”The empty Search view shows up to five recent queries, including their regex setting. Recent searches are stored in this browser for the current account and workspace; they are not synchronized saved searches. Selecting an entry runs the query again and can use another search from your allowance. Use Save search to keep a query in your workspace.