Skip to content

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.

Enter the text you want to find, leave Use regex unchecked, and select Search.

QueryLooks for
api.example.comThat exact text
TODOUppercase TODO
BEGIN PUBLIC KEYThat 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.

Enable Use regex and enter an RE2 pattern without surrounding slash delimiters.

PatternExample matches
api[_-]?keyapikey, api_key, api-key
https://api[.]example[.]comA particular URL
`(stagingproduction)[_-]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.

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.

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.

StatusMeaningNext step
SearchingThe request is still receiving resultsContinue reviewing or wait
Partial resultsThe request ended before a complete responseKeep useful hits and retry or refine
StoppedYou selected Stop searchReview the hits already received
First 100 matchesThe displayed match limit was reachedUse a more specific query
No matching codeThe completed request returned no matchesTry 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.

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.

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.

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.