Skip to content

Latest commit

 

History

History
226 lines (154 loc) · 17.8 KB

searching-for-repositories.md

File metadata and controls

226 lines (154 loc) · 17.8 KB
title intro redirect_from versions topics shortTitle
Searching for repositories
You can search for repositories on {% data variables.product.product_name %} and narrow the results using these repository search qualifiers in any combination.
/articles/searching-repositories
/articles/searching-for-repositories
/github/searching-for-information-on-github/searching-for-repositories
/github/searching-for-information-on-github/searching-on-github/searching-for-repositories
fpt ghes ghec
*
*
*
GitHub search
Search for repositories

You can search for repositories globally across all of {% data variables.product.prodname_dotcom %}, or search for repositories within a particular organization. For more information, see "AUTOTITLE."

To include forks in the search results, you will need to add fork:true or fork:only to your query. For more information, see "AUTOTITLE."

{% data reusables.search.syntax_tips %}

Search by repository name, description, or contents of the README file

With the in qualifier you can restrict your search to the repository name, repository description, repository topics, contents of the README file, or any combination of these. When you omit this qualifier, only the repository name, description, and topics are searched.

Qualifier Example
in:name jquery in:name matches repositories with "jquery" in the repository name.
in:description jquery in:name,description matches repositories with "jquery" in the repository name or description.
in:topics jquery in:topics matches repositories labeled with "jquery" as a topic.
in:readme jquery in:readme matches repositories mentioning "jquery" in the repository's README file.
repo:owner/name repo:octocat/hello-world matches a specific repository name.

Search based on the contents of a repository

You can find a repository by searching for content in the repository's README file using the in:readme qualifier. For more information, see "AUTOTITLE."

Besides using in:readme, it's not possible to find repositories by searching for specific content within the repository. To search for a specific file or content within a repository, you can use the file finder or code-specific search qualifiers. For more information, see "AUTOTITLE" and "[AUTOTITLE]{% ifversion code-search-upgrade %}(/search-github/github-code-search/understanding-github-code-search-syntax){% else %}(/search-github/searching-on-github/searching-code){% endif %}."

Qualifier Example
in:readme octocat in:readme matches repositories mentioning "octocat" in the repository's README file.

Search within a user's or organization's repositories

To search in all repositories owned by a certain user or organization, you can use the user or org qualifier.

Qualifier Example
user:USERNAME user:defunkt forks:>100 matches repositories from @defunkt that have more than 100 forks.
org:ORGNAME org:github matches repositories from GitHub.

Search by repository size

The size qualifier finds repositories that match a certain size (in kilobytes), using greater than, less than, and range qualifiers. For more information, see "AUTOTITLE."

Qualifier Example
size:n size:1000 matches repositories that are 1 MB exactly.
size:>n size:>=30000 matches repositories that are at least 30 MB.
size:<n size:<50 matches repositories that are smaller than 50 KB.
size:n..n size:50..120 matches repositories that are between 50 KB and 120 KB.

Search by number of followers

You can filter repositories based on the number of users who follow the repositories, using the followers qualifier with greater than, less than, and range qualifiers. For more information, see "AUTOTITLE."

Qualifier Example
followers:>=n node followers:>=10000 matches repositories with 10,000 or more followers mentioning the word "node".
followers:n..n styleguide linter followers:1..10 matches repositories with between 1 and 10 followers, mentioning the word "styleguide linter."

Search by number of forks

The forks qualifier specifies the number of forks a repository should have, using greater than, less than, and range qualifiers. For more information, see "AUTOTITLE."

Qualifier Example
forks:n forks:5 matches repositories with only five forks.
forks:>n forks:>=205 matches repositories with at least 205 forks.
forks:<n forks:<90 matches repositories with fewer than 90 forks.
forks:n..n forks:10..20 matches repositories with 10 to 20 forks.

Search by number of stars

You can search repositories based on the number of stars the repositories have, using greater than, less than, and range qualifiers. For more information, see "AUTOTITLE" and "AUTOTITLE."

Qualifier Example
stars:n stars:500 matches repositories with exactly 500 stars.
stars:n..n size:<n stars:10..20 size:<1000 matches repositories 10 to 20 stars, that are smaller than 1000 KB.
stars:>=n fork:true language:LANGUAGE stars:>=500 fork:true language:php matches repositories with the at least 500 stars, including forked ones, that are written in PHP.

Search by when a repository was created or last updated

You can filter repositories based on time of creation or time of last update. For repository creation, you can use the created qualifier; to find out when a repository was last updated, you'll want to use the pushed qualifier. The pushed qualifier will return a list of repositories, sorted by the most recent commit made on any branch in the repository.

Both take a date as a parameter. {% data reusables.time_date.date_format %} {% data reusables.time_date.time_format %}

{% data reusables.search.date_gt_lt %}

Qualifier Example
created:<YYYY-MM-DD webos created:<2011-01-01 matches repositories with the word "webos" that were created before 2011.
pushed:>YYYY-MM-DD css pushed:>2013-02-01 matches repositories with the word "css" that were pushed to after January 2013.
pushed:>=YYYY-MM-DD fork:only case pushed:>=2013-03-06 fork:only matches repositories with the word "case" that were pushed to on or after March 6th, 2013, and that are forks.

Search by language

You can search repositories based on the language of the code in the repositories.

Qualifier Example
language:LANGUAGE rails language:javascript matches repositories with the word "rails" that are written in JavaScript.

Search by topic

You can find all of the repositories that are classified with a particular topic. For more information, see "AUTOTITLE."

Qualifier Example
topic:TOPIC topic:jekyll matches repositories that have been classified with the topic "Jekyll."

Search by number of topics

You can search repositories by the number of topics that have been applied to the repositories, using the topics qualifier along with greater than, less than, and range qualifiers. For more information, see "AUTOTITLE" and "AUTOTITLE."

Qualifier Example
topics:n topics:5 matches repositories that have five topics.
topics:>n topics:>3 matches repositories that have more than three topics.

Search by license

You can search repositories by the type of license in the repositories. You must use a license keyword to filter repositories by a particular license or license family. For more information, see "AUTOTITLE."

Qualifier Example
license:LICENSE_KEYWORD license:apache-2.0 matches repositories that are licensed under Apache License 2.0.

Search by repository visibility

You can filter your search based on the visibility of the repositories. For more information, see "AUTOTITLE."

Qualifier Example
is:public is:public org:github matches public repositories owned by {% data variables.product.company_short %}.
{% ifversion ghes or ghec %}
is:internal is:internal test matches internal repositories that you can access and contain the word "test".
{% endif %}
is:private is:private pages matches private repositories that you can access and contain the word "pages."

{% ifversion repository-properties %}

Search based on repository custom property

You can filter repositories based on custom properties using the props. prefixed qualifiers. For more information, see "AUTOTITLE."

For these qualifiers to work, the search must be limited to a single organization. Otherwise, props. qualifiers are ignored.

Qualifier Example
props.PROPERTY:VALUE org:github props.environment:production matches repositories from the github organization that have the custom property environment set to production.

{% endif %}

{% ifversion fpt or ghec %}

Search based on whether a repository is a mirror

You can search repositories based on whether the repositories are mirrors and hosted elsewhere. For more information, see "AUTOTITLE."

Qualifier Example
mirror:true mirror:true GNOME matches repositories that are mirrors and contain the word "GNOME."
mirror:false mirror:false GNOME matches repositories that are not mirrors and contain the word "GNOME."

{% endif %}

Search based on whether a repository is a template

You can search repositories based on whether the repositories are templates. For more information, see "AUTOTITLE".

Qualifier Example
template:true template:true GNOME matches repositories that are templates and contain the word "GNOME".
template:false template:false GNOME matches repositories that are not templates and contain the word "GNOME".

Search based on whether a repository is archived

You can search repositories based on whether or not the repositories are archived. For more information, see "AUTOTITLE."

Qualifier Example
archived:true archived:true GNOME matches repositories that are archived and contain the word "GNOME."
archived:false archived:false GNOME matches repositories that are not archived and contain the word "GNOME."

{% ifversion fpt or ghec %}

Search based on number of issues with good first issue or help wanted labels

You can search for repositories that have a minimum number of issues labeled help-wanted or good-first-issue with the qualifiers help-wanted-issues:>n and good-first-issues:>n. For more information, see "AUTOTITLE."

Qualifier Example
good-first-issues:>n good-first-issues:>2 javascript matches repositories with more than two issues labeled good-first-issue and that contain the word "javascript."
help-wanted-issues:>n help-wanted-issues:>4 react matches repositories with more than four issues labeled help-wanted and that contain the word "React."

Search based on ability to sponsor

You can search for repositories whose owners can be sponsored on {% data variables.product.prodname_sponsors %} with the is:sponsorable qualifier. For more information, see "AUTOTITLE."

You can search for repositories that have a funding file using the has:funding-file qualifier. For more information, see "AUTOTITLE."

Qualifier Example
is:sponsorable is:sponsorable matches repositories whose owners have a {% data variables.product.prodname_sponsors %} profile.
has:funding-file has:funding-file matches repositories that have a FUNDING.yml file.

{% endif %}

Further reading