Skip to main content

Search users

Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/[email protected]/rest/overview/resources-in-the-rest-api#pagination). When searching for users, you can get text match metadata for the issue **login**, **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/[email protected]/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/[email protected]/rest/reference/search#text-match-metadata). For example, if you're looking for a list of popular users, you might try this query: `q=tom+repos:%3E42+followers:%3E1000` This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers.

GET/search/users
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Query Parameters
q string
required

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 GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/[email protected]/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/articles/searching-users/)" for a detailed list of qualifiers.

sort string
optional

Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub Enterprise Server. Default: [best match](https://docs.github.com/[email protected]/rest/reference/search#ranking-search-results)

order string
optional

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`.

per_page integer
optional

Results per page (max 100)

page integer
optional

Page number of the results to fetch.

Responses

application/json object

Response

incomplete_results boolean
required
items array[User Search Result Item object]
required
items User Search Result Item object

User Search Result Item

avatar_url string<uri>
required
bio string
optionalnullable
blog string
optionalnullable
company string
optionalnullable
created_at string<date-time>
optional
email string<email>
optionalnullable
events_url string
required
followers integer
optional
followers_url string<uri>
required
following integer
optional
following_url string
required
gists_url string
required
gravatar_id string
requirednullable
hireable boolean
optionalnullable
html_url string<uri>
required
id integer
required
location string
optionalnullable
login string
required
name string
optionalnullable
node_id string
required
organizations_url string<uri>
required
public_gists integer
optional
public_repos integer
optional
received_events_url string<uri>
required
repos_url string<uri>
required
score number
required
site_admin boolean
required
starred_url string
required
subscriptions_url string<uri>
required
suspended_at string<date-time>
optionalnullable
text_matches Search Result Text Matches array[object]
optional
type string
required
updated_at string<date-time>
optional
url string<uri>
required
total_count integer
required

Not modified

application/json Validation Error object

Validation failed

documentation_url string
required
errors array[object]
optional
items object
code string
required
field string
optional
index integer
optional
message string
optional
resource string
optional
value
optional
message string
required
application/json object

Service unavailable

code string
optional
documentation_url string
optional
message string
optional