Use our powerful search tools to find what you're looking for among the many repositories, users, and lines of code on GitHub.

In this article:

You can search globally across all of GitHub, or scope your search to a particular repository or organization.

  • To search globally across all of GitHub, type what you're looking for into the search field at the top of any page, and choose "All GitHub" in the search drop-down menu.
  • To search within a particular repository or organization, navigate to the repository or organization page, type what you're looking for into the search field at the top of the page, and press Enter.


  • You must be signed in to search for code across all public repositories.
  • GitHub Pages sites are not searchable on GitHub. However you can search the source content if it exists in the default branch of a repository, using code search. For more information, see "Searching code." For more information about GitHub Pages, see "What is GitHub Pages?"

After running a search on GitHub, you can sort the results, or further refine them by clicking one of the languages in the sidebar. For more information, see "Sorting search results."

GitHub search uses an ElasticSearch cluster to index projects every time a change is pushed to GitHub. Issues and pull requests are indexed when they are created or modified.

Types of searches on GitHub

You can search the following types of information across all public GitHub repositories, and all private GitHub repositories you have access to:

Searching using a visual interface

Alternatively, you can search GitHub using the search page or advanced search page.

The advanced search page provides a visual interface for constructing search queries. You can filter your searches by a variety of factors, such as the number of stars or number of forks a repository has. As you fill in the advanced search fields, your query will automatically be constructed in the top search bar.

Advanced Search

Searching across GitHub Enterprise and simultaneously

If you use GitHub Enterprise and you're a member of a organization on the GitHub Business Cloud plan, your GitHub Enterprise site administrator can enable GitHub Connect so that you can search across both environments at the same time. For more information, see "Enabling Unified Search between GitHub Enterprise and"

You can only search across both environments from GitHub Enterprise. To scope your search by environment, you can use a filter option on the advanced search page or you can use the environment: search prefix. To only search for content on GitHub Enterprise, use the search syntax environment:local. To only search for content on, use environment:github.

Your GitHub Enterprise site administrator can enable Unified Search for all public repositories, all private repositories, or only certain private repositories in the connected organization on the GitHub Business Cloud plan.

If your site administrator enables Unified Search in private repositories, you can only search in the private repositories that the administrator enabled Unified Search for and that you have access to in the connected organization. Your GitHub Enterprise administrators and organization owners on cannot search private repositories owned by your account. To search the applicable private repositories, you must enable private repository search for your personal accounts on and GitHub Enterprise. For more information, see "Enabling private repository search in your GitHub Enterprise account."

Further reading