Skip to main content

Search Repos

Find repositories via various criteria. This method returns up to 100 results per page.

When searching for repositories, you can get text match metadata for the name and description fields when you pass the text-match media type. For more details about how to receive highlighted search results, see Text match metadata.

For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this:


This query searches for repositories with the word tetris in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results.

External Documentation

To learn more, visit the GitHub documentation.

Basic Parameters

QueryThe query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see Constructing a search query. See "Searching for repositories" for a detailed list of qualifiers.
Return All PagesAutomatically fetch all resources, page by page.

Advanced Parameters

OrderDetermines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
PagePage number of the results to fetch.
Per PageThe number of results per page (max 100).
SortSorts the results of your query by number of stars, forks, or help-wanted-issues or how recently the items were updated. Default: best match.

Example Output

"value": {
"incomplete_results": false,
"items": [
"archive_url": "{archive_format}{/ref}",
"archived": true,
"assignees_url": "{/user}",
"blobs_url": "{/sha}",
"branches_url": "{/branch}",
"clone_url": "",
"collaborators_url": "{/collaborator}",
"comments_url": "{/number}",
"commits_url": "{/sha}",
"compare_url": "{base}...{head}",
"contents_url": "{+path}",
"contributors_url": "",
"created_at": "2012-01-01T00:31:50Z",
"default_branch": "master",
"deployments_url": "",
"description": "A C implementation of Tetris using Pennsim through LC4",
"disabled": true,
"downloads_url": "",
"events_url": "",
"fork": false,
"forks": 1,
"forks_count": 0,
"forks_url": "",
"full_name": "dtrupenn/Tetris",
"git_commits_url": "{/sha}",
"git_refs_url": "{/sha}",
"git_tags_url": "{/sha}",
"git_url": "",
"has_downloads": true,
"has_issues": true,
"has_pages": true,
"has_projects": true,
"has_wiki": true,
"homepage": "",
"hooks_url": "",
"html_url": "",
"id": 3081286,
"issue_comment_url": "{/number}",
"issue_events_url": "{/number}",
"issues_url": "{/number}",
"keys_url": "{/key_id}",
"labels_url": "{/name}",
"language": "Assembly",
"languages_url": "",
"license": {
"html_url": "",
"key": "mit",
"name": "MIT License",
"node_id": "MDc6TGljZW5zZW1pdA==",
"spdx_id": "MIT",
"url": ""
"master_branch": "master",
"merges_url": "",
"milestones_url": "{/number}",
"mirror_url": "",
"name": "Tetris",
"node_id": "MDEwOlJlcG9zaXRvcnkzMDgxMjg2",
"notifications_url": "{?since,all,participating}",
"open_issues": 1,
"open_issues_count": 0,
"owner": {
"avatar_url": "",
"events_url": "{/privacy}",
"followers_url": "",
"following_url": "{/other_user}",
"gists_url": "{/gist_id}",
"gravatar_id": "",
"html_url": "",
"id": 872147,
"login": "dtrupenn",
"node_id": "MDQ6VXNlcjg3MjE0Nw==",
"organizations_url": "",
"received_events_url": "",
"repos_url": "",
"site_admin": true,
"starred_url": "{/owner}{/repo}",
"subscriptions_url": "",
"type": "User",
"url": ""
"private": false,
"pulls_url": "{/number}",
"pushed_at": "2012-01-01T00:37:02Z",
"releases_url": "{/id}",
"score": 1,
"size": 524,
"ssh_url": "",
"stargazers_count": 1,
"stargazers_url": "",
"statuses_url": "{sha}",
"subscribers_url": "",
"subscription_url": "",
"svn_url": "",
"tags_url": "",
"teams_url": "",
"trees_url": "{/sha}",
"updated_at": "2013-01-05T17:58:47Z",
"url": "",
"visibility": "private",
"watchers": 1,
"watchers_count": 1
"total_count": 40

Automation Library Example

Search Repos with Github and Send Results Via Email

Automation LibraryPreview this Automation on desktop