searchUsers
Search users
Details
- Method:
GET - Path:
/search/users - Operation ID:
search/users
Parameters
{
"q": {
"description": "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/search/search#constructing-a-search-query). See \"[Searching users](https://docs.github.com/search-github/searching-on-github/searching-users)\" for a detailed list of qualifiers.",
"required": true,
"location": "query",
"type": "string"
},
"sort": {
"description": "Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results)",
"required": false,
"location": "query",
"type": "string",
"enum": [
"followers",
"repositories",
"joined"
]
},
"order": {
"description": "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`.",
"required": false,
"location": "query",
"type": "string",
"enum": [
"desc",
"asc"
]
},
"per_page": {
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"",
"required": false,
"location": "query",
"type": "integer"
},
"page": {
"description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"",
"required": false,
"location": "query",
"type": "integer"
}
}Response Schema
{
"type": "object",
"required": [
"total_count",
"incomplete_results",
"items"
],
"properties": {
"total_count": {
"type": "integer"
},
"incomplete_results": {
"type": "boolean"
},
"items": {
"type": "array",
"items": {
"title": "User Search Result Item",
"description": "User Search Result Item",
"type": "object",
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer",
"format": "int64"
},
"node_id": {
"type": "string"
},
"avatar_url": {
"type": "string",
"format": "uri"
},
"gravatar_id": {
"type": "string",
"nullable": true
},
"url": {
"type": "string",
"format": "uri"
},
"html_url": {
"type": "string",
"format": "uri"
},
"followers_url": {
"type": "string",
"format": "uri"
},
"subscriptions_url": {
"type": "string",
"format": "uri"
},
"organizations_url": {
"type": "string",
"format": "uri"
},
"repos_url": {
"type": "string",
"format": "uri"
},
"received_events_url": {
"type": "string",
"format": "uri"
},
"type": {
"type": "string"
},
"score": {
"type": "number"
},
"following_url": {
"type": "string"
},
"gists_url": {
"type": "string"
},
"starred_url": {
"type": "string"
},
"events_url": {
"type": "string"
},
"public_repos": {
"type": "integer"
},
"public_gists": {
"type": "integer"
},
"followers": {
"type": "integer"
},
"following": {
"type": "integer"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"name": {
"type": "string",
"nullable": true
},
"bio": {
"type": "string",
"nullable": true
},
"email": {
"type": "string",
"format": "email",
"nullable": true
},
"location": {
"type": "string",
"nullable": true
},
"site_admin": {
"type": "boolean"
},
"hireable": {
"type": "boolean",
"nullable": true
},
"text_matches": {
"title": "Search Result Text Matches",
"type": "array",
"items": {
"type": "object",
"properties": {
"object_url": {
"type": "string"
},
"object_type": {
"nullable": true,
"type": "string"
},
"property": {
"type": "string"
},
"fragment": {
"type": "string"
},
"matches": {
"type": "array",
"items": {
"type": "object",
"properties": {
"text": {
"type": "string"
},
"indices": {
"type": "array",
"items": {
"type": "integer"
}
}
}
}
}
}
}
},
"blog": {
"type": "string",
"nullable": true
},
"company": {
"type": "string",
"nullable": true
},
"suspended_at": {
"type": "string",
"format": "date-time",
"nullable": true
},
"user_view_type": {
"type": "string"
}
},
"required": [
"avatar_url",
"events_url",
"followers_url",
"following_url",
"gists_url",
"gravatar_id",
"html_url",
"id",
"node_id",
"login",
"organizations_url",
"received_events_url",
"repos_url",
"site_admin",
"starred_url",
"subscriptions_url",
"type",
"url",
"score"
]
}
}
}
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('github')
# Call this tool
result = await agent.call_tool('searchUsers', {
# Add required parameters here
})