> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Repos

Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).

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](https://docs.github.com/rest/reference/search#text-match-metadata).

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

`q=tetris+language:assembly&sort=stars&order=desc`

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.

<Note>
  External Documentation

  To learn more, visit the [GitHub documentation](https://docs.github.com/rest/reference/search#search-repositories).
</Note>

## Basic Parameters

<div className="integrations-table">
  | Parameter        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
  | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Query            | The 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](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. |
  | Return All Pages | Automatically fetch all resources, page by page.                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
</div>

## Advanced Parameters

<div className="integrations-table">
  | Parameter | Description                                                                                                                                                                                                                   |
  | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Order     | Determines 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`.                                       |
  | Page      | Page number of the results to fetch.                                                                                                                                                                                          |
  | Per Page  | The number of results per page (max 100).                                                                                                                                                                                     |
  | Sort      | Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results). |
</div>

## Example Output

```json theme={"dark"}
{
	"value": {
		"incomplete_results": false,
		"items": [
			{
				"archive_url": "https://api.github.com/repos/dtrupenn/Tetris/{archive_format}{/ref}",
				"archived": true,
				"assignees_url": "https://api.github.com/repos/dtrupenn/Tetris/assignees{/user}",
				"blobs_url": "https://api.github.com/repos/dtrupenn/Tetris/git/blobs{/sha}",
				"branches_url": "https://api.github.com/repos/dtrupenn/Tetris/branches{/branch}",
				"clone_url": "https://github.com/dtrupenn/Tetris.git",
				"collaborators_url": "https://api.github.com/repos/dtrupenn/Tetris/collaborators{/collaborator}",
				"comments_url": "https://api.github.com/repos/dtrupenn/Tetris/comments{/number}",
				"commits_url": "https://api.github.com/repos/dtrupenn/Tetris/commits{/sha}",
				"compare_url": "https://api.github.com/repos/dtrupenn/Tetris/compare/{base}...{head}",
				"contents_url": "https://api.github.com/repos/dtrupenn/Tetris/contents/{+path}",
				"contributors_url": "https://api.github.com/repos/dtrupenn/Tetris/contributors",
				"created_at": "2012-01-01T00:31:50Z",
				"default_branch": "master",
				"deployments_url": "https://api.github.com/repos/dtrupenn/Tetris/deployments",
				"description": "A C implementation of Tetris using Pennsim through LC4",
				"disabled": true,
				"downloads_url": "https://api.github.com/repos/dtrupenn/Tetris/downloads",
				"events_url": "https://api.github.com/repos/dtrupenn/Tetris/events",
				"fork": false,
				"forks": 1,
				"forks_count": 0,
				"forks_url": "https://api.github.com/repos/dtrupenn/Tetris/forks",
				"full_name": "dtrupenn/Tetris",
				"git_commits_url": "https://api.github.com/repos/dtrupenn/Tetris/git/commits{/sha}",
				"git_refs_url": "https://api.github.com/repos/dtrupenn/Tetris/git/refs{/sha}",
				"git_tags_url": "https://api.github.com/repos/dtrupenn/Tetris/git/tags{/sha}",
				"git_url": "git:github.com/dtrupenn/Tetris.git",
				"has_downloads": true,
				"has_issues": true,
				"has_pages": true,
				"has_projects": true,
				"has_wiki": true,
				"homepage": "https://github.com",
				"hooks_url": "https://api.github.com/repos/dtrupenn/Tetris/hooks",
				"html_url": "https://github.com/dtrupenn/Tetris",
				"id": 3081286,
				"issue_comment_url": "https://api.github.com/repos/dtrupenn/Tetris/issues/comments{/number}",
				"issue_events_url": "https://api.github.com/repos/dtrupenn/Tetris/issues/events{/number}",
				"issues_url": "https://api.github.com/repos/dtrupenn/Tetris/issues{/number}",
				"keys_url": "https://api.github.com/repos/dtrupenn/Tetris/keys{/key_id}",
				"labels_url": "https://api.github.com/repos/dtrupenn/Tetris/labels{/name}",
				"language": "Assembly",
				"languages_url": "https://api.github.com/repos/dtrupenn/Tetris/languages",
				"license": {
					"html_url": "https://api.github.com/licenses/mit",
					"key": "mit",
					"name": "MIT License",
					"node_id": "MDc6TGljZW5zZW1pdA==",
					"spdx_id": "MIT",
					"url": "https://api.github.com/licenses/mit"
				},
				"master_branch": "master",
				"merges_url": "https://api.github.com/repos/dtrupenn/Tetris/merges",
				"milestones_url": "https://api.github.com/repos/dtrupenn/Tetris/milestones{/number}",
				"mirror_url": "git:git.example.com/dtrupenn/Tetris",
				"name": "Tetris",
				"node_id": "MDEwOlJlcG9zaXRvcnkzMDgxMjg2",
				"notifications_url": "https://api.github.com/repos/dtrupenn/Tetris/notifications{?since,all,participating}",
				"open_issues": 1,
				"open_issues_count": 0,
				"owner": {
					"avatar_url": "https://secure.gravatar.com/avatar/e7956084e75f239de85d3a31bc172ace?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
					"events_url": "https://api.github.com/users/octocat/events{/privacy}",
					"followers_url": "https://api.github.com/users/octocat/followers",
					"following_url": "https://api.github.com/users/octocat/following{/other_user}",
					"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
					"gravatar_id": "",
					"html_url": "https://github.com/octocat",
					"id": 872147,
					"login": "dtrupenn",
					"node_id": "MDQ6VXNlcjg3MjE0Nw==",
					"organizations_url": "https://api.github.com/users/octocat/orgs",
					"received_events_url": "https://api.github.com/users/dtrupenn/received_events",
					"repos_url": "https://api.github.com/users/octocat/repos",
					"site_admin": true,
					"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
					"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
					"type": "User",
					"url": "https://api.github.com/users/dtrupenn"
				},
				"private": false,
				"pulls_url": "https://api.github.com/repos/dtrupenn/Tetris/pulls{/number}",
				"pushed_at": "2012-01-01T00:37:02Z",
				"releases_url": "https://api.github.com/repos/dtrupenn/Tetris/releases{/id}",
				"score": 1,
				"size": 524,
				"ssh_url": "git@github.com:dtrupenn/Tetris.git",
				"stargazers_count": 1,
				"stargazers_url": "https://api.github.com/repos/dtrupenn/Tetris/stargazers",
				"statuses_url": "https://api.github.com/repos/dtrupenn/Tetris/statuses/{sha}",
				"subscribers_url": "https://api.github.com/repos/dtrupenn/Tetris/subscribers",
				"subscription_url": "https://api.github.com/repos/dtrupenn/Tetris/subscription",
				"svn_url": "https://svn.github.com/dtrupenn/Tetris",
				"tags_url": "https://api.github.com/repos/dtrupenn/Tetris/tags",
				"teams_url": "https://api.github.com/repos/dtrupenn/Tetris/teams",
				"trees_url": "https://api.github.com/repos/dtrupenn/Tetris/git/trees{/sha}",
				"updated_at": "2013-01-05T17:58:47Z",
				"url": "https://api.github.com/repos/dtrupenn/Tetris",
				"visibility": "private",
				"watchers": 1,
				"watchers_count": 1
			}
		],
		"total_count": 40
	}
}
```

## Workflow Library Example

[Search Repos with Github and Send Results Via Email](https://library.blinkops.com/workflows/search-repos-with-github-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/search-repos-with-github-and-send-results-via-email/canvas" />
</div>
