Search
Download SpecLook for stuff on GitHub.
Search code
Searches for query terms inside of a file. This method returns up to 100 results per page.
When searching for code, you can get text match metadata for the file content and file path 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 find the definition of the addClass
function inside jQuery repository, your query would look something like this:
q=addClass+in:file+language:js+repo:jquery/jquery
This query searches for the keyword addClass
within a file's contents. The query limits the search to files where the language is JavaScript in the jquery/jquery
repository.
Considerations for code search
Due to the complexity of searching code, there are a few restrictions on how searches are performed:
- Only the default branch is considered. In most cases, this will be the
master
branch. - Only files smaller than 384 KB are searchable.
- You must always include at least one search term when searching source code. For example, searching for
language:go
is not valid, whileamazing language:go
is.
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 Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see Constructing a search query. See "Searching code" for a detailed list of qualifiers.
sort
string
Sorts the results of your query. Can only be indexed
, which indicates how recently a file has been indexed by the GitHub Enterprise Server search infrastructure. Default: best match
- Enum
-
- indexed
order
string
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
.
- Default
- "desc"
- Enum
-
- desc
- asc
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
Response
Response
{
"total_count": 7,
"incomplete_results": false,
"items": [
{
"name": "classes.js",
"path": "src/attributes/classes.js",
"sha": "d7212f9dee2dcc18f084d7df8f417b80846ded5a",
"url": "https://api.github.com/repositories/167174/contents/src/attributes/classes.js?ref=825ac3773694e0cd23ee74895fd5aeb535b27da4",
"git_url": "https://api.github.com/repositories/167174/git/blobs/d7212f9dee2dcc18f084d7df8f417b80846ded5a",
"html_url": "https://github.com/jquery/jquery/blob/825ac3773694e0cd23ee74895fd5aeb535b27da4/src/attributes/classes.js",
"repository": {
"id": 167174,
"node_id": "MDEwOlJlcG9zaXRvcnkxNjcxNzQ=",
"name": "jquery",
"full_name": "jquery/jquery",
"owner": {
"login": "jquery",
"id": 70142,
"node_id": "MDQ6VXNlcjcwMTQy",
"avatar_url": "https://0.gravatar.com/avatar/6906f317a4733f4379b06c32229ef02f?d=https%3A%2F%2Fidenticons.github.com%2Ff426f04f2f9813718fb806b30e0093de.png",
"gravatar_id": "",
"url": "https://api.github.com/users/jquery",
"html_url": "https://github.com/jquery",
"followers_url": "https://api.github.com/users/jquery/followers",
"following_url": "https://api.github.com/users/jquery/following{/other_user}",
"gists_url": "https://api.github.com/users/jquery/gists{/gist_id}",
"starred_url": "https://api.github.com/users/jquery/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jquery/subscriptions",
"organizations_url": "https://api.github.com/users/jquery/orgs",
"repos_url": "https://api.github.com/users/jquery/repos",
"events_url": "https://api.github.com/users/jquery/events{/privacy}",
"received_events_url": "https://api.github.com/users/jquery/received_events",
"type": "Organization",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/jquery/jquery",
"description": "jQuery JavaScript Library",
"fork": false,
"url": "https://api.github.com/repos/jquery/jquery",
"forks_url": "https://api.github.com/repos/jquery/jquery/forks",
"keys_url": "https://api.github.com/repos/jquery/jquery/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/jquery/jquery/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/jquery/jquery/teams",
"hooks_url": "https://api.github.com/repos/jquery/jquery/hooks",
"issue_events_url": "https://api.github.com/repos/jquery/jquery/issues/events{/number}",
"events_url": "https://api.github.com/repos/jquery/jquery/events",
"assignees_url": "https://api.github.com/repos/jquery/jquery/assignees{/user}",
"branches_url": "https://api.github.com/repos/jquery/jquery/branches{/branch}",
"tags_url": "https://api.github.com/repos/jquery/jquery/tags",
"blobs_url": "https://api.github.com/repos/jquery/jquery/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/jquery/jquery/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/jquery/jquery/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/jquery/jquery/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/jquery/jquery/statuses/{sha}",
"languages_url": "https://api.github.com/repos/jquery/jquery/languages",
"stargazers_url": "https://api.github.com/repos/jquery/jquery/stargazers",
"contributors_url": "https://api.github.com/repos/jquery/jquery/contributors",
"subscribers_url": "https://api.github.com/repos/jquery/jquery/subscribers",
"subscription_url": "https://api.github.com/repos/jquery/jquery/subscription",
"commits_url": "https://api.github.com/repos/jquery/jquery/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/jquery/jquery/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/jquery/jquery/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/jquery/jquery/issues/comments/{number}",
"contents_url": "https://api.github.com/repos/jquery/jquery/contents/{+path}",
"compare_url": "https://api.github.com/repos/jquery/jquery/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/jquery/jquery/merges",
"archive_url": "https://api.github.com/repos/jquery/jquery/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/jquery/jquery/downloads",
"issues_url": "https://api.github.com/repos/jquery/jquery/issues{/number}",
"pulls_url": "https://api.github.com/repos/jquery/jquery/pulls{/number}",
"milestones_url": "https://api.github.com/repos/jquery/jquery/milestones{/number}",
"notifications_url": "https://api.github.com/repos/jquery/jquery/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/jquery/jquery/labels{/name}",
"deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments",
"releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}"
},
"score": 1
}
]
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
code
string
message
string
documentation_url
string
message
string
documentation_url
string
url
string
status
string
Not modified
Empty response
Service unavailable
{
"code": "string",
"message": "string",
"documentation_url": "string"
}
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
total_count
int
required
incomplete_results
boolean
required
items
array[object (Code Search Result Item)]
required
Code Search Result Item
object (Code Search Result Item)
Code Search Result Item
name
string
required
path
string
required
sha
string
required
url
string
uri
required
git_url
string
uri
required
html_url
string
uri
required
repository
object (repository)
required
Minimal Repository
id
int
required
- Example
- 1296269
node_id
string
required
- Example
- "MDEwOlJlcG9zaXRvcnkxMjk2MjY5"
name
string
required
- Example
- "Hello-World"
full_name
string
required
- Example
- "octocat/Hello-World"
owner
object (owner)
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
private
boolean
required
html_url
string
uri
required
- Example
- "https://github.com/octocat/Hello-World"
description
string or null
required
- Example
- "This your first repo!"
fork
boolean
required
url
string
uri
required
- Example
- "https://api.github.com/repos/octocat/Hello-World"
archive_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}"
assignees_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/assignees{/user}"
blobs_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}"
branches_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/branches{/branch}"
collaborators_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}"
comments_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/comments{/number}"
commits_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/commits{/sha}"
compare_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}"
contents_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/contents/{+path}"
contributors_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/contributors"
deployments_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/deployments"
downloads_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/downloads"
events_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/events"
forks_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/forks"
git_commits_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}"
git_refs_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}"
git_tags_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}"
git_url
string
issue_comment_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}"
issue_events_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}"
issues_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues{/number}"
keys_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}"
labels_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/labels{/name}"
languages_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/languages"
merges_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/merges"
milestones_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/milestones{/number}"
notifications_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}"
pulls_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/pulls{/number}"
releases_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/releases{/id}"
ssh_url
string
stargazers_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/stargazers"
statuses_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}"
subscribers_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/subscribers"
subscription_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/subscription"
tags_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/tags"
teams_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/teams"
trees_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}"
clone_url
string
mirror_url
string or null
hooks_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/hooks"
svn_url
string
homepage
string or null
language
string or null
forks_count
int
stargazers_count
int
watchers_count
int
size
int
The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0.
default_branch
string
open_issues_count
int
is_template
boolean
topics
array[string]
string
has_issues
boolean
has_projects
boolean
has_wiki
boolean
has_pages
boolean
has_downloads
boolean
has_discussions
boolean
archived
boolean
disabled
boolean
visibility
string
pushed_at
string or null
date-time
- Example
- "2011-01-26T19:06:43Z"
created_at
string or null
date-time
- Example
- "2011-01-26T19:01:12Z"
updated_at
string or null
date-time
- Example
- "2011-01-26T19:14:43Z"
permissions
object (permissions)
admin
boolean
maintain
boolean
push
boolean
triage
boolean
pull
boolean
role_name
string
- Example
- "admin"
temp_clone_token
string
delete_branch_on_merge
boolean
subscribers_count
int
network_count
int
code_of_conduct
object (code_of_conduct)
Code Of Conduct
key
string
required
- Example
- "contributor_covenant"
name
string
required
- Example
- "Contributor Covenant"
url
string
uri
required
- Example
- "https://api.github.com/codes_of_conduct/contributor_covenant"
body
string
- Example
- "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment include:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response\n to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address,\n posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [EMAIL]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]\n\n[homepage]: http://contributor-covenant.org\n[version]: http://contributor-covenant.org/version/1/4/\n"
html_url
string or null
uri
required
license
object (license) or null
key
string
name
string
spdx_id
string
url
string
node_id
string
forks
int
- Example
- 0
open_issues
int
- Example
- 0
watchers
int
- Example
- 0
allow_forking
boolean
web_commit_signoff_required
boolean
- Example
- false
security_and_analysis
object (security_and_analysis) or null
advanced_security
object (advanced_security)
status
string
- Enum
-
- enabled
- disabled
secret_scanning
object (secret_scanning)
status
string
- Enum
-
- enabled
- disabled
secret_scanning_push_protection
object (secret_scanning_push_protection)
status
string
- Enum
-
- enabled
- disabled
score
number
required
file_size
int
language
string or null
last_modified_at
string
date-time
line_numbers
array[string]
- Example
- [ "73..77", "77..78" ]
string
text_matches
array[object]
object
object_url
string
object_type
string or null
property
string
fragment
string
matches
array[object]
object
text
string
indices
array[int]
int
Search commits
Find commits via various criteria on the default branch (usually main
). This method returns up to 100 results per page.
When searching for commits, you can get text match metadata for the message field when you provide 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 find commits related to CSS in the octocat/Spoon-Knife repository. Your query would look something like this:
q=repo:octocat/Spoon-Knife+css
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 Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see Constructing a search query. See "Searching commits" for a detailed list of qualifiers.
sort
string
Sorts the results of your query by author-date
or committer-date
. Default: best match
- Enum
-
- author-date
- committer-date
order
string
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
.
- Default
- "desc"
- Enum
-
- desc
- asc
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
Response
Response
{
"total_count": 1,
"incomplete_results": false,
"items": [
{
"url": "https://api.github.com/repos/octocat/Spoon-Knife/commits/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f",
"sha": "bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f",
"html_url": "https://github.com/octocat/Spoon-Knife/commit/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f",
"comments_url": "https://api.github.com/repos/octocat/Spoon-Knife/commits/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f/comments",
"commit": {
"url": "https://api.github.com/repos/octocat/Spoon-Knife/git/commits/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f",
"author": {
"date": "2014-02-04T14:38:36-08:00",
"name": "The Octocat",
"email": "octocat@nowhere.com"
},
"committer": {
"date": "2014-02-12T15:18:55-08:00",
"name": "The Octocat",
"email": "octocat@nowhere.com"
},
"message": "Create styles.css and updated README",
"tree": {
"url": "https://api.github.com/repos/octocat/Spoon-Knife/git/trees/a639e96f9038797fba6e0469f94a4b0cc459fa68",
"sha": "a639e96f9038797fba6e0469f94a4b0cc459fa68"
},
"comment_count": 8
},
"author": {
"login": "octocat",
"id": 583231,
"node_id": "MDQ6VXNlcjU4MzIzMQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/583231?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"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}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"committer": {},
"parents": [
{
"url": "https://api.github.com/repos/octocat/Spoon-Knife/commits/a30c19e3f13765a3b48829788bc1cb8b4e95cee4",
"html_url": "https://github.com/octocat/Spoon-Knife/commit/a30c19e3f13765a3b48829788bc1cb8b4e95cee4",
"sha": "a30c19e3f13765a3b48829788bc1cb8b4e95cee4"
}
],
"repository": {
"id": 1300192,
"node_id": "MDEwOlJlcG9zaXRvcnkxMzAwMTky",
"name": "Spoon-Knife",
"full_name": "octocat/Spoon-Knife",
"owner": {
"login": "octocat",
"id": 583231,
"node_id": "MDQ6VXNlcjU4MzIzMQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/583231?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"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}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/octocat/Spoon-Knife",
"description": "This repo is for demonstration purposes only.",
"fork": false,
"url": "https://api.github.com/repos/octocat/Spoon-Knife",
"forks_url": "https://api.github.com/repos/octocat/Spoon-Knife/forks",
"keys_url": "https://api.github.com/repos/octocat/Spoon-Knife/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/octocat/Spoon-Knife/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/octocat/Spoon-Knife/teams",
"hooks_url": "https://api.github.com/repos/octocat/Spoon-Knife/hooks",
"issue_events_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/events{/number}",
"events_url": "https://api.github.com/repos/octocat/Spoon-Knife/events",
"assignees_url": "https://api.github.com/repos/octocat/Spoon-Knife/assignees{/user}",
"branches_url": "https://api.github.com/repos/octocat/Spoon-Knife/branches{/branch}",
"tags_url": "https://api.github.com/repos/octocat/Spoon-Knife/tags",
"blobs_url": "https://api.github.com/repos/octocat/Spoon-Knife/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/octocat/Spoon-Knife/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/octocat/Spoon-Knife/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/octocat/Spoon-Knife/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/octocat/Spoon-Knife/statuses/{sha}",
"languages_url": "https://api.github.com/repos/octocat/Spoon-Knife/languages",
"stargazers_url": "https://api.github.com/repos/octocat/Spoon-Knife/stargazers",
"contributors_url": "https://api.github.com/repos/octocat/Spoon-Knife/contributors",
"subscribers_url": "https://api.github.com/repos/octocat/Spoon-Knife/subscribers",
"subscription_url": "https://api.github.com/repos/octocat/Spoon-Knife/subscription",
"commits_url": "https://api.github.com/repos/octocat/Spoon-Knife/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/octocat/Spoon-Knife/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/octocat/Spoon-Knife/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/octocat/Spoon-Knife/contents/{+path}",
"compare_url": "https://api.github.com/repos/octocat/Spoon-Knife/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/octocat/Spoon-Knife/merges",
"archive_url": "https://api.github.com/repos/octocat/Spoon-Knife/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/octocat/Spoon-Knife/downloads",
"issues_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues{/number}",
"pulls_url": "https://api.github.com/repos/octocat/Spoon-Knife/pulls{/number}",
"milestones_url": "https://api.github.com/repos/octocat/Spoon-Knife/milestones{/number}",
"notifications_url": "https://api.github.com/repos/octocat/Spoon-Knife/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/octocat/Spoon-Knife/labels{/name}",
"releases_url": "https://api.github.com/repos/octocat/Spoon-Knife/releases{/id}",
"deployments_url": "https://api.github.com/repos/octocat/Spoon-Knife/deployments"
},
"score": 1,
"node_id": "MDQ6VXNlcjU4MzIzMQ=="
}
]
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
Not modified
Empty response
total_count
int
required
incomplete_results
boolean
required
items
array[object (Commit Search Result Item)]
required
Commit Search Result Item
object (Commit Search Result Item)
Commit Search Result Item
url
string
uri
required
sha
string
required
html_url
string
uri
required
comments_url
string
uri
required
commit
object (commit)
required
author
object (author)
required
name
string
required
string
required
date
string
date-time
required
committer
object (committer) or null
required
Metaproperties for Git author/committer information.
name
string
- Example
- "\"Chris Wanstrath\""
string
- Example
- "\"chris@ozmm.org\""
date
string
- Example
- "\"2007-10-29T02:42:39.000-07:00\""
comment_count
int
required
message
string
required
tree
object (tree)
required
sha
string
required
url
string
uri
required
url
string
uri
required
verification
object (verification)
verified
boolean
required
reason
string
required
payload
string or null
required
signature
string or null
required
author
object (author) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
committer
object (committer) or null
required
Metaproperties for Git author/committer information.
name
string
- Example
- "\"Chris Wanstrath\""
string
- Example
- "\"chris@ozmm.org\""
date
string
- Example
- "\"2007-10-29T02:42:39.000-07:00\""
parents
array[object]
required
object
url
string
html_url
string
sha
string
repository
object (repository)
required
Minimal Repository
id
int
required
- Example
- 1296269
node_id
string
required
- Example
- "MDEwOlJlcG9zaXRvcnkxMjk2MjY5"
name
string
required
- Example
- "Hello-World"
full_name
string
required
- Example
- "octocat/Hello-World"
owner
object (owner)
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
private
boolean
required
html_url
string
uri
required
- Example
- "https://github.com/octocat/Hello-World"
description
string or null
required
- Example
- "This your first repo!"
fork
boolean
required
url
string
uri
required
- Example
- "https://api.github.com/repos/octocat/Hello-World"
archive_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}"
assignees_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/assignees{/user}"
blobs_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}"
branches_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/branches{/branch}"
collaborators_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}"
comments_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/comments{/number}"
commits_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/commits{/sha}"
compare_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}"
contents_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/contents/{+path}"
contributors_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/contributors"
deployments_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/deployments"
downloads_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/downloads"
events_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/events"
forks_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/forks"
git_commits_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}"
git_refs_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}"
git_tags_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}"
git_url
string
issue_comment_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}"
issue_events_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}"
issues_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues{/number}"
keys_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}"
labels_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/labels{/name}"
languages_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/languages"
merges_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/merges"
milestones_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/milestones{/number}"
notifications_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}"
pulls_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/pulls{/number}"
releases_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/releases{/id}"
ssh_url
string
stargazers_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/stargazers"
statuses_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}"
subscribers_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/subscribers"
subscription_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/subscription"
tags_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/tags"
teams_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/teams"
trees_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}"
clone_url
string
mirror_url
string or null
hooks_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/hooks"
svn_url
string
homepage
string or null
language
string or null
forks_count
int
stargazers_count
int
watchers_count
int
size
int
The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0.
default_branch
string
open_issues_count
int
is_template
boolean
topics
array[string]
string
has_issues
boolean
has_projects
boolean
has_wiki
boolean
has_pages
boolean
has_downloads
boolean
has_discussions
boolean
archived
boolean
disabled
boolean
visibility
string
pushed_at
string or null
date-time
- Example
- "2011-01-26T19:06:43Z"
created_at
string or null
date-time
- Example
- "2011-01-26T19:01:12Z"
updated_at
string or null
date-time
- Example
- "2011-01-26T19:14:43Z"
permissions
object (permissions)
admin
boolean
maintain
boolean
push
boolean
triage
boolean
pull
boolean
role_name
string
- Example
- "admin"
temp_clone_token
string
delete_branch_on_merge
boolean
subscribers_count
int
network_count
int
code_of_conduct
object (code_of_conduct)
Code Of Conduct
key
string
required
- Example
- "contributor_covenant"
name
string
required
- Example
- "Contributor Covenant"
url
string
uri
required
- Example
- "https://api.github.com/codes_of_conduct/contributor_covenant"
body
string
- Example
- "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment include:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response\n to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address,\n posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [EMAIL]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]\n\n[homepage]: http://contributor-covenant.org\n[version]: http://contributor-covenant.org/version/1/4/\n"
html_url
string or null
uri
required
license
object (license) or null
key
string
name
string
spdx_id
string
url
string
node_id
string
forks
int
- Example
- 0
open_issues
int
- Example
- 0
watchers
int
- Example
- 0
allow_forking
boolean
web_commit_signoff_required
boolean
- Example
- false
security_and_analysis
object (security_and_analysis) or null
advanced_security
object (advanced_security)
status
string
- Enum
-
- enabled
- disabled
secret_scanning
object (secret_scanning)
status
string
- Enum
-
- enabled
- disabled
secret_scanning_push_protection
object (secret_scanning_push_protection)
status
string
- Enum
-
- enabled
- disabled
score
number
required
node_id
string
required
text_matches
array[object]
object
object_url
string
object_type
string or null
property
string
fragment
string
matches
array[object]
object
text
string
indices
array[int]
int
Search issues and pull requests
Find issues by state and keyword. This method returns up to 100 results per page.
When searching for issues, you can get text match metadata for the issue title, issue body, and issue comment body 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 find the oldest unresolved Python bugs on Windows. Your query might look something like this.
q=windows+label:bug+language:python+state:open&sort=created&order=asc
This query searches for the keyword windows
, within any open issue that is labeled as bug
. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.
Note: For user-to-server GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the is:issue
or is:pull-request
qualifier will receive an HTTP 422 Unprocessable Entity
response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the is
qualifier, see "Searching only issues or pull requests."
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 Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see Constructing a search query. See "Searching issues and pull requests" for a detailed list of qualifiers.
sort
string
Sorts the results of your query by the number of comments
, reactions
, reactions-+1
, reactions--1
, reactions-smile
, reactions-thinking_face
, reactions-heart
, reactions-tada
, or interactions
. You can also sort results by how recently the items were created
or updated
, Default: best match
- Enum
-
- comments
- reactions
- reactions-+1
- reactions--1
- reactions-smile
- reactions-thinking_face
- reactions-heart
- reactions-tada
- interactions
- created
- updated
order
string
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
.
- Default
- "desc"
- Enum
-
- desc
- asc
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
Response
Response
{
"total_count": 280,
"incomplete_results": false,
"items": [
{
"url": "https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132",
"repository_url": "https://api.github.com/repos/batterseapower/pinyin-toolkit",
"labels_url": "https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/labels{/name}",
"comments_url": "https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/comments",
"events_url": "https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/events",
"html_url": "https://github.com/batterseapower/pinyin-toolkit/issues/132",
"id": 35802,
"node_id": "MDU6SXNzdWUzNTgwMg==",
"number": 132,
"title": "Line Number Indexes Beyond 20 Not Displayed",
"user": {
"login": "Nick3C",
"id": 90254,
"node_id": "MDQ6VXNlcjkwMjU0",
"avatar_url": "https://secure.gravatar.com/avatar/934442aadfe3b2f4630510de416c5718?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
"gravatar_id": "",
"url": "https://api.github.com/users/Nick3C",
"html_url": "https://github.com/Nick3C",
"followers_url": "https://api.github.com/users/Nick3C/followers",
"following_url": "https://api.github.com/users/Nick3C/following{/other_user}",
"gists_url": "https://api.github.com/users/Nick3C/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Nick3C/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Nick3C/subscriptions",
"organizations_url": "https://api.github.com/users/Nick3C/orgs",
"repos_url": "https://api.github.com/users/Nick3C/repos",
"events_url": "https://api.github.com/users/Nick3C/events{/privacy}",
"received_events_url": "https://api.github.com/users/Nick3C/received_events",
"type": "User",
"site_admin": true
},
"labels": [
{
"id": 4,
"node_id": "MDU6TGFiZWw0",
"url": "https://api.github.com/repos/batterseapower/pinyin-toolkit/labels/bug",
"name": "bug",
"color": "ff0000"
}
],
"state": "open",
"assignee": null,
"milestone": {
"url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
"html_url": "https://github.com/octocat/Hello-World/milestones/v1.0",
"labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels",
"id": 1002604,
"node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==",
"number": 1,
"state": "open",
"title": "v1.0",
"description": "Tracking milestone for version 1.0",
"creator": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"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}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"open_issues": 4,
"closed_issues": 8,
"created_at": "2011-04-10T20:09:31Z",
"updated_at": "2014-03-03T18:58:10Z",
"closed_at": "2013-02-12T13:22:01Z",
"due_on": "2012-10-09T23:39:01Z"
},
"comments": 15,
"created_at": "2009-07-12T20:10:41Z",
"updated_at": "2009-07-19T09:23:43Z",
"closed_at": null,
"pull_request": {
"url": "https://api/github.com/repos/octocat/Hello-World/pull/1347",
"html_url": "https://github.com/octocat/Hello-World/pull/1347",
"diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff",
"patch_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347"
},
"body": "...",
"score": 1,
"locked": true,
"author_association": "COLLABORATOR",
"state_reason": "completed"
}
]
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
code
string
message
string
documentation_url
string
message
string
documentation_url
string
url
string
status
string
Service unavailable
{
"code": "string",
"message": "string",
"documentation_url": "string"
}
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
Not modified
Empty response
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
total_count
int
required
incomplete_results
boolean
required
items
array[object (Issue Search Result Item)]
required
Issue Search Result Item
object (Issue Search Result Item)
Issue Search Result Item
url
string
uri
required
repository_url
string
uri
required
labels_url
string
required
comments_url
string
uri
required
events_url
string
uri
required
html_url
string
uri
required
id
int
int64
required
node_id
string
required
number
int
required
title
string
required
locked
boolean
required
active_lock_reason
string or null
assignees
array[object (Simple User)] or null
Simple User
object (Simple User)
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
user
object (user) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
labels
array[object]
required
object
id
int
int64
node_id
string
url
string
name
string
color
string
default
boolean
description
string or null
state
string
required
state_reason
string or null
assignee
object (assignee) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
milestone
object (milestone) or null
required
A collection of related issues and pull requests.
url
string
uri
required
- Example
- "https://api.github.com/repos/octocat/Hello-World/milestones/1"
html_url
string
uri
required
- Example
- "https://github.com/octocat/Hello-World/milestones/v1.0"
labels_url
string
uri
required
- Example
- "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels"
id
int
required
- Example
- 1002604
node_id
string
required
- Example
- "MDk6TWlsZXN0b25lMTAwMjYwNA=="
number
int
required
The number of the milestone.
- Example
- 42
state
string
required
The state of the milestone.
- Default
- "open"
- Enum
-
- open
- closed
- Example
- "open"
title
string
required
The title of the milestone.
- Example
- "v1.0"
description
string or null
required
- Example
- "Tracking milestone for version 1.0"
creator
object (creator) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
open_issues
int
required
- Example
- 4
closed_issues
int
required
- Example
- 8
created_at
string
date-time
required
- Example
- "2011-04-10T20:09:31Z"
updated_at
string
date-time
required
- Example
- "2014-03-03T18:58:10Z"
closed_at
string or null
date-time
required
- Example
- "2013-02-12T13:22:01Z"
due_on
string or null
date-time
required
- Example
- "2012-10-09T23:39:01Z"
comments
int
required
created_at
string
date-time
required
updated_at
string
date-time
required
closed_at
string or null
date-time
required
text_matches
array[object]
object
object_url
string
object_type
string or null
property
string
fragment
string
matches
array[object]
object
text
string
indices
array[int]
int
pull_request
object (pull_request)
merged_at
string or null
date-time
diff_url
string or null
uri
required
html_url
string or null
uri
required
patch_url
string or null
uri
required
url
string or null
uri
required
body
string
score
number
required
author_association
string
required
How the author is associated with the repository.
- Enum
-
- COLLABORATOR
- CONTRIBUTOR
- FIRST_TIMER
- FIRST_TIME_CONTRIBUTOR
- MANNEQUIN
- MEMBER
- NONE
- OWNER
- Example
- "OWNER"
draft
boolean
repository
object (repository)
A repository on GitHub.
id
int
required
Unique identifier of the repository
- Example
- 42
node_id
string
required
- Example
- "MDEwOlJlcG9zaXRvcnkxMjk2MjY5"
name
string
required
The name of the repository.
- Example
- "Team Environment"
full_name
string
required
- Example
- "octocat/Hello-World"
license
object (license) or null
required
License Simple
key
string
required
- Example
- "mit"
name
string
required
- Example
- "MIT License"
url
string or null
uri
required
- Example
- "https://api.github.com/licenses/mit"
spdx_id
string or null
required
- Example
- "MIT"
node_id
string
required
- Example
- "MDc6TGljZW5zZW1pdA=="
html_url
string
uri
organization
object (organization) or null
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
forks
int
required
permissions
object (permissions)
admin
boolean
required
pull
boolean
required
triage
boolean
push
boolean
required
maintain
boolean
owner
object (owner)
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
private
boolean
required
Whether the repository is private or public.
- Default
- false
html_url
string
uri
required
- Example
- "https://github.com/octocat/Hello-World"
description
string or null
required
- Example
- "This your first repo!"
fork
boolean
required
url
string
uri
required
- Example
- "https://api.github.com/repos/octocat/Hello-World"
archive_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}"
assignees_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/assignees{/user}"
blobs_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}"
branches_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/branches{/branch}"
collaborators_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}"
comments_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/comments{/number}"
commits_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/commits{/sha}"
compare_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}"
contents_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/contents/{+path}"
contributors_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/contributors"
deployments_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/deployments"
downloads_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/downloads"
events_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/events"
forks_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/forks"
git_commits_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}"
git_refs_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}"
git_tags_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}"
git_url
string
required
- Example
- "git:github.com/octocat/Hello-World.git"
issue_comment_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}"
issue_events_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}"
issues_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues{/number}"
keys_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}"
labels_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/labels{/name}"
languages_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/languages"
merges_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/merges"
milestones_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/milestones{/number}"
notifications_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}"
pulls_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/pulls{/number}"
releases_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/releases{/id}"
ssh_url
string
required
- Example
- "git@github.com:octocat/Hello-World.git"
stargazers_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/stargazers"
statuses_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}"
subscribers_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/subscribers"
subscription_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/subscription"
tags_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/tags"
teams_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/teams"
trees_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}"
clone_url
string
required
- Example
- "https://github.com/octocat/Hello-World.git"
mirror_url
string or null
uri
required
- Example
- "git:git.example.com/octocat/Hello-World"
hooks_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/hooks"
svn_url
string
uri
required
- Example
- "https://svn.github.com/octocat/Hello-World"
homepage
string or null
uri
required
- Example
- "https://github.com"
language
string or null
required
forks_count
int
required
- Example
- 9
stargazers_count
int
required
- Example
- 80
watchers_count
int
required
- Example
- 80
size
int
required
The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0.
- Example
- 108
default_branch
string
required
The default branch of the repository.
- Example
- "master"
open_issues_count
int
required
- Example
- 0
is_template
boolean
Whether this repository acts as a template that can be used to generate new repositories.
- Default
- false
- Example
- true
topics
array[string]
string
has_issues
boolean
required
Whether issues are enabled.
- Default
- true
- Example
- true
has_projects
boolean
required
Whether projects are enabled.
- Default
- true
- Example
- true
has_wiki
boolean
required
Whether the wiki is enabled.
- Default
- true
- Example
- true
has_pages
boolean
required
has_downloads
boolean
required
Whether downloads are enabled.
- Default
- true
- Example
- true
has_discussions
boolean
Whether discussions are enabled.
- Default
- false
- Example
- true
archived
boolean
required
Whether the repository is archived.
- Default
- false
disabled
boolean
required
Returns whether or not this repository disabled.
visibility
string
The repository visibility: public, private, or internal.
- Default
- "public"
pushed_at
string or null
date-time
required
- Example
- "2011-01-26T19:06:43Z"
created_at
string or null
date-time
required
- Example
- "2011-01-26T19:01:12Z"
updated_at
string or null
date-time
required
- Example
- "2011-01-26T19:14:43Z"
allow_rebase_merge
boolean
Whether to allow rebase merges for pull requests.
- Default
- true
- Example
- true
template_repository
object (template_repository) or null
id
int
node_id
string
name
string
full_name
string
owner
object (owner)
login
string
id
int
node_id
string
avatar_url
string
gravatar_id
string
url
string
html_url
string
followers_url
string
following_url
string
gists_url
string
starred_url
string
subscriptions_url
string
organizations_url
string
repos_url
string
events_url
string
received_events_url
string
type
string
site_admin
boolean
private
boolean
html_url
string
description
string
fork
boolean
url
string
archive_url
string
assignees_url
string
blobs_url
string
branches_url
string
collaborators_url
string
comments_url
string
commits_url
string
compare_url
string
contents_url
string
contributors_url
string
deployments_url
string
downloads_url
string
events_url
string
forks_url
string
git_commits_url
string
git_refs_url
string
git_tags_url
string
git_url
string
issue_comment_url
string
issue_events_url
string
issues_url
string
keys_url
string
labels_url
string
languages_url
string
merges_url
string
milestones_url
string
notifications_url
string
pulls_url
string
releases_url
string
ssh_url
string
stargazers_url
string
statuses_url
string
subscribers_url
string
subscription_url
string
tags_url
string
teams_url
string
trees_url
string
clone_url
string
mirror_url
string
hooks_url
string
svn_url
string
homepage
string
language
string
forks_count
int
stargazers_count
int
watchers_count
int
size
int
default_branch
string
open_issues_count
int
is_template
boolean
topics
array[string]
string
has_issues
boolean
has_projects
boolean
has_wiki
boolean
has_pages
boolean
has_downloads
boolean
archived
boolean
disabled
boolean
visibility
string
pushed_at
string
created_at
string
updated_at
string
permissions
object (permissions)
admin
boolean
maintain
boolean
push
boolean
triage
boolean
pull
boolean
allow_rebase_merge
boolean
temp_clone_token
string
allow_squash_merge
boolean
allow_auto_merge
boolean
delete_branch_on_merge
boolean
allow_update_branch
boolean
use_squash_pr_title_as_default
boolean
squash_merge_commit_title
string
The default value for a squash merge commit title:
PR_TITLE
- default to the pull request's title.COMMIT_OR_PR_TITLE
- default to the commit's title (if only one commit) or the pull request's title (when more than one commit).
- Enum
-
- PR_TITLE
- COMMIT_OR_PR_TITLE
squash_merge_commit_message
string
The default value for a squash merge commit message:
PR_BODY
- default to the pull request's body.COMMIT_MESSAGES
- default to the branch's commit messages.BLANK
- default to a blank commit message.
- Enum
-
- PR_BODY
- COMMIT_MESSAGES
- BLANK
merge_commit_title
string
The default value for a merge commit title.
PR_TITLE
- default to the pull request's title.MERGE_MESSAGE
- default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name).
- Enum
-
- PR_TITLE
- MERGE_MESSAGE
merge_commit_message
string
The default value for a merge commit message.
PR_TITLE
- default to the pull request's title.PR_BODY
- default to the pull request's body.BLANK
- default to a blank commit message.
- Enum
-
- PR_BODY
- PR_TITLE
- BLANK
allow_merge_commit
boolean
subscribers_count
int
network_count
int
temp_clone_token
string
allow_squash_merge
boolean
Whether to allow squash merges for pull requests.
- Default
- true
- Example
- true
allow_auto_merge
boolean
Whether to allow Auto-merge to be used on pull requests.
- Default
- false
- Example
- false
delete_branch_on_merge
boolean
Whether to delete head branches when pull requests are merged
- Default
- false
- Example
- false
allow_update_branch
boolean
Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging.
- Default
- false
- Example
- false
use_squash_pr_title_as_default
boolean
deprecated
Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use squash_merge_commit_title
instead.
- Default
- false
squash_merge_commit_title
string
The default value for a squash merge commit title:
PR_TITLE
- default to the pull request's title.COMMIT_OR_PR_TITLE
- default to the commit's title (if only one commit) or the pull request's title (when more than one commit).
- Enum
-
- PR_TITLE
- COMMIT_OR_PR_TITLE
squash_merge_commit_message
string
The default value for a squash merge commit message:
PR_BODY
- default to the pull request's body.COMMIT_MESSAGES
- default to the branch's commit messages.BLANK
- default to a blank commit message.
- Enum
-
- PR_BODY
- COMMIT_MESSAGES
- BLANK
merge_commit_title
string
The default value for a merge commit title.
PR_TITLE
- default to the pull request's title.MERGE_MESSAGE
- default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name).
- Enum
-
- PR_TITLE
- MERGE_MESSAGE
merge_commit_message
string
The default value for a merge commit message.
PR_TITLE
- default to the pull request's title.PR_BODY
- default to the pull request's body.BLANK
- default to a blank commit message.
- Enum
-
- PR_BODY
- PR_TITLE
- BLANK
allow_merge_commit
boolean
Whether to allow merge commits for pull requests.
- Default
- true
- Example
- true
allow_forking
boolean
Whether to allow forking this repo
web_commit_signoff_required
boolean
Whether to require contributors to sign off on web-based commits
- Default
- false
subscribers_count
int
network_count
int
open_issues
int
required
watchers
int
required
master_branch
string
starred_at
string
- Example
- "\"2020-07-09T00:17:42Z\""
anonymous_access_enabled
boolean
Whether anonymous git access is enabled for this repository
body_html
string
body_text
string
timeline_url
string
uri
performed_via_github_app
object (performed_via_github_app) or null
GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub.
id
int
required
Unique identifier of the GitHub app
- Example
- 37
slug
string
The slug name of the GitHub app
- Example
- "probot-owners"
node_id
string
required
- Example
- "MDExOkludGVncmF0aW9uMQ=="
owner
object (owner) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
name
string
required
The name of the GitHub app
- Example
- "Probot Owners"
description
string or null
required
- Example
- "The description of the app."
external_url
string
uri
required
- Example
- "https://example.com"
html_url
string
uri
required
- Example
- "https://github.com/apps/super-ci"
created_at
string
date-time
required
- Example
- "2017-07-08T16:18:44-04:00"
updated_at
string
date-time
required
- Example
- "2017-07-08T16:18:44-04:00"
permissions
object (permissions)
required
The set of permissions for the GitHub app
- Example
- { "issues": "read", "deployments": "write" }
issues
string
checks
string
metadata
string
contents
string
deployments
string
events
array[string]
required
The list of events for the GitHub app
- Example
- [ "label", "deployment" ]
string
installations_count
int
The number of installations associated with the GitHub app
- Example
- 5
client_id
string
- Example
- "\"Iv1.25b5d1e65ffc4022\""
client_secret
string
- Example
- "\"1d4b2097ac622ba702d19de498f005747a8b21d3\""
webhook_secret
string or null
- Example
- "\"6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b\""
pem
string
- Example
- "\"-----BEGIN RSA PRIVATE KEY-----\\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\\n-----END RSA PRIVATE KEY-----\\n\""
reactions
object (reactions)
url
string
uri
required
total_count
int
required
+1
int
required
-1
int
required
laugh
int
required
confused
int
required
heart
int
required
hooray
int
required
eyes
int
required
rocket
int
required
Search labels
Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results per page.
When searching for labels, you can get text match metadata for the label 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 find labels in the linguist
repository that match bug
, defect
, or enhancement
. Your query might look like this:
q=bug+defect+enhancement&repository_id=64778136
The labels that best match the query appear first in the search results.
repository_id
int
required
The id of the repository.
q
string
required
The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see Constructing a search query.
sort
string
Sorts the results of your query by when the label was created
or updated
. Default: best match
- Enum
-
- created
- updated
order
string
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
.
- Default
- "desc"
- Enum
-
- desc
- asc
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
Response
Response
{
"total_count": 2,
"incomplete_results": false,
"items": [
{
"id": 418327088,
"node_id": "MDU6TGFiZWw0MTgzMjcwODg=",
"url": "https://api.github.com/repos/octocat/linguist/labels/enhancement",
"name": "enhancement",
"color": "84b6eb",
"default": true,
"description": "New feature or request.",
"score": 1
},
{
"id": 418327086,
"node_id": "MDU6TGFiZWw0MTgzMjcwODY=",
"url": "https://api.github.com/repos/octocat/linguist/labels/bug",
"name": "bug",
"color": "ee0701",
"default": true,
"description": "Something isn't working.",
"score": 1
}
]
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Not modified
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
total_count
int
required
incomplete_results
boolean
required
items
array[object (Label Search Result Item)]
required
Label Search Result Item
object (Label Search Result Item)
Label Search Result Item
id
int
required
node_id
string
required
url
string
uri
required
name
string
required
color
string
required
default
boolean
required
description
string or null
required
score
number
required
text_matches
array[object]
object
object_url
string
object_type
string or null
property
string
fragment
string
matches
array[object]
object
text
string
indices
array[int]
int
Search repositories
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:
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.
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 Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see Constructing a search query. See "Searching for repositories" for a detailed list of qualifiers.
sort
string
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
- Enum
-
- stars
- forks
- help-wanted-issues
- updated
order
string
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
.
- Default
- "desc"
- Enum
-
- desc
- asc
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
Response
Response
{
"total_count": 40,
"incomplete_results": false,
"items": [
{
"id": 3081286,
"node_id": "MDEwOlJlcG9zaXRvcnkzMDgxMjg2",
"name": "Tetris",
"full_name": "dtrupenn/Tetris",
"owner": {
"login": "dtrupenn",
"id": 872147,
"node_id": "MDQ6VXNlcjg3MjE0Nw==",
"avatar_url": "https://secure.gravatar.com/avatar/e7956084e75f239de85d3a31bc172ace?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
"gravatar_id": "",
"url": "https://api.github.com/users/dtrupenn",
"received_events_url": "https://api.github.com/users/dtrupenn/received_events",
"type": "User",
"html_url": "https://github.com/octocat",
"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}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"site_admin": true
},
"private": false,
"html_url": "https://github.com/dtrupenn/Tetris",
"description": "A C implementation of Tetris using Pennsim through LC4",
"fork": false,
"url": "https://api.github.com/repos/dtrupenn/Tetris",
"created_at": "2012-01-01T00:31:50Z",
"updated_at": "2013-01-05T17:58:47Z",
"pushed_at": "2012-01-01T00:37:02Z",
"homepage": "https://github.com",
"size": 524,
"stargazers_count": 1,
"watchers_count": 1,
"language": "Assembly",
"forks_count": 0,
"open_issues_count": 0,
"master_branch": "master",
"default_branch": "master",
"score": 1,
"archive_url": "https://api.github.com/repos/dtrupenn/Tetris/{archive_format}{/ref}",
"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}",
"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",
"deployments_url": "https://api.github.com/repos/dtrupenn/Tetris/deployments",
"downloads_url": "https://api.github.com/repos/dtrupenn/Tetris/downloads",
"events_url": "https://api.github.com/repos/dtrupenn/Tetris/events",
"forks_url": "https://api.github.com/repos/dtrupenn/Tetris/forks",
"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",
"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}",
"languages_url": "https://api.github.com/repos/dtrupenn/Tetris/languages",
"merges_url": "https://api.github.com/repos/dtrupenn/Tetris/merges",
"milestones_url": "https://api.github.com/repos/dtrupenn/Tetris/milestones{/number}",
"notifications_url": "https://api.github.com/repos/dtrupenn/Tetris/notifications{?since,all,participating}",
"pulls_url": "https://api.github.com/repos/dtrupenn/Tetris/pulls{/number}",
"releases_url": "https://api.github.com/repos/dtrupenn/Tetris/releases{/id}",
"ssh_url": "git@github.com:dtrupenn/Tetris.git",
"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",
"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}",
"clone_url": "https://github.com/dtrupenn/Tetris.git",
"mirror_url": "git:git.example.com/dtrupenn/Tetris",
"hooks_url": "https://api.github.com/repos/dtrupenn/Tetris/hooks",
"svn_url": "https://svn.github.com/dtrupenn/Tetris",
"forks": 1,
"open_issues": 1,
"watchers": 1,
"has_issues": true,
"has_projects": true,
"has_pages": true,
"has_wiki": true,
"has_downloads": true,
"archived": true,
"disabled": true,
"visibility": "private",
"license": {
"key": "mit",
"name": "MIT License",
"url": "https://api.github.com/licenses/mit",
"spdx_id": "MIT",
"node_id": "MDc6TGljZW5zZW1pdA==",
"html_url": "https://api.github.com/licenses/mit"
}
}
]
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
code
string
message
string
documentation_url
string
Service unavailable
{
"code": "string",
"message": "string",
"documentation_url": "string"
}
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
Not modified
Empty response
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
total_count
int
required
incomplete_results
boolean
required
items
array[object (Repo Search Result Item)]
required
Repo Search Result Item
object (Repo Search Result Item)
Repo Search Result Item
id
int
required
node_id
string
required
name
string
required
full_name
string
required
owner
object (owner) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
private
boolean
required
html_url
string
uri
required
description
string or null
required
fork
boolean
required
url
string
uri
required
created_at
string
date-time
required
updated_at
string
date-time
required
pushed_at
string
date-time
required
homepage
string or null
uri
required
size
int
required
stargazers_count
int
required
watchers_count
int
required
language
string or null
required
forks_count
int
required
open_issues_count
int
required
master_branch
string
default_branch
string
required
score
number
required
forks_url
string
uri
required
keys_url
string
required
collaborators_url
string
required
teams_url
string
uri
required
hooks_url
string
uri
required
issue_events_url
string
required
events_url
string
uri
required
assignees_url
string
required
branches_url
string
required
tags_url
string
uri
required
blobs_url
string
required
git_tags_url
string
required
git_refs_url
string
required
trees_url
string
required
statuses_url
string
required
languages_url
string
uri
required
stargazers_url
string
uri
required
contributors_url
string
uri
required
subscribers_url
string
uri
required
subscription_url
string
uri
required
commits_url
string
required
git_commits_url
string
required
comments_url
string
required
issue_comment_url
string
required
contents_url
string
required
compare_url
string
required
merges_url
string
uri
required
archive_url
string
required
downloads_url
string
uri
required
issues_url
string
required
pulls_url
string
required
milestones_url
string
required
notifications_url
string
required
labels_url
string
required
releases_url
string
required
deployments_url
string
uri
required
git_url
string
required
ssh_url
string
required
clone_url
string
required
svn_url
string
uri
required
forks
int
required
open_issues
int
required
watchers
int
required
topics
array[string]
string
mirror_url
string or null
uri
required
has_issues
boolean
required
has_projects
boolean
required
has_pages
boolean
required
has_wiki
boolean
required
has_downloads
boolean
required
has_discussions
boolean
archived
boolean
required
disabled
boolean
required
Returns whether or not this repository disabled.
visibility
string
The repository visibility: public, private, or internal.
license
object (license) or null
required
License Simple
key
string
required
- Example
- "mit"
name
string
required
- Example
- "MIT License"
url
string or null
uri
required
- Example
- "https://api.github.com/licenses/mit"
spdx_id
string or null
required
- Example
- "MIT"
node_id
string
required
- Example
- "MDc6TGljZW5zZW1pdA=="
html_url
string
uri
permissions
object (permissions)
admin
boolean
required
maintain
boolean
push
boolean
required
triage
boolean
pull
boolean
required
text_matches
array[object]
object
object_url
string
object_type
string or null
property
string
fragment
string
matches
array[object]
object
text
string
indices
array[int]
int
temp_clone_token
string
allow_merge_commit
boolean
allow_squash_merge
boolean
allow_rebase_merge
boolean
allow_auto_merge
boolean
delete_branch_on_merge
boolean
allow_forking
boolean
is_template
boolean
web_commit_signoff_required
boolean
- Example
- false
Search topics
Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results per page. See "Searching topics" for a detailed list of qualifiers.
When searching for topics, you can get text match metadata for the topic's short_description, description, name, or display_name field 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 topics related to Ruby that are featured on https://github.com/topics. Your query might look like this:
q=ruby+is:featured
This query searches for topics with the keyword ruby
and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results.
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 Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see Constructing a search query.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
Response
Response
{
"total_count": 6,
"incomplete_results": false,
"items": [
{
"name": "ruby",
"display_name": "Ruby",
"short_description": "Ruby is a scripting language designed for simplified object-oriented programming.",
"description": "Ruby was developed by Yukihiro \"Matz\" Matsumoto in 1995 with the intent of having an easily readable programming language. It is integrated with the Rails framework to create dynamic web-applications. Ruby's syntax is similar to that of Perl and Python.",
"created_by": "Yukihiro Matsumoto",
"released": "December 21, 1995",
"created_at": "2016-11-28T22:03:59Z",
"updated_at": "2017-10-30T18:16:32Z",
"featured": true,
"curated": true,
"score": 1
},
{
"name": "rails",
"display_name": "Rails",
"short_description": "Ruby on Rails (Rails) is a web application framework written in Ruby.",
"description": "Ruby on Rails (Rails) is a web application framework written in Ruby. It is meant to help simplify the building of complex websites.",
"created_by": "David Heinemeier Hansson",
"released": "December 13 2005",
"created_at": "2016-12-09T17:03:50Z",
"updated_at": "2017-10-30T16:20:19Z",
"featured": true,
"curated": true,
"score": 1
},
{
"name": "python",
"display_name": "Python",
"short_description": "Python is a dynamically typed programming language.",
"description": "Python is a dynamically typed programming language designed by Guido Van Rossum. Much like the programming language Ruby, Python was designed to be easily read by programmers. Because of its large following and many libraries, Python can be implemented and used to do anything from webpages to scientific research.",
"created_by": "Guido van Rossum",
"released": "February 20, 1991",
"created_at": "2016-12-07T00:07:02Z",
"updated_at": "2017-10-27T22:45:43Z",
"featured": true,
"curated": true,
"score": 1
},
{
"name": "jekyll",
"display_name": "Jekyll",
"short_description": "Jekyll is a simple, blog-aware static site generator.",
"description": "Jekyll is a blog-aware, site generator written in Ruby. It takes raw text files, runs it through a renderer and produces a publishable static website.",
"created_by": "Tom Preston-Werner",
"released": "2008",
"created_at": "2016-12-16T21:53:08Z",
"updated_at": "2017-10-27T19:00:24Z",
"featured": true,
"curated": true,
"score": 1
},
{
"name": "sass",
"display_name": "Sass",
"short_description": "Sass is a stable extension to classic CSS.",
"description": "Sass is a stylesheet language with a main implementation in Ruby. It is an extension of CSS that makes improvements to the old stylesheet format, such as being able to declare variables and using a cleaner nesting syntax.",
"created_by": "Hampton Catlin, Natalie Weizenbaum, Chris Eppstein",
"released": "November 28, 2006",
"created_at": "2016-12-16T21:53:45Z",
"updated_at": "2018-01-16T16:30:40Z",
"featured": true,
"curated": true,
"score": 1
},
{
"name": "homebrew",
"display_name": "Homebrew",
"short_description": "Homebrew is a package manager for macOS.",
"description": "Homebrew is a package manager for Apple's macOS operating system. It simplifies the installation of software and is popular in the Ruby on Rails community.",
"created_by": "Max Howell",
"released": "2009",
"created_at": "2016-12-17T20:30:44Z",
"updated_at": "2018-02-06T16:14:56Z",
"featured": true,
"curated": true,
"score": 1
}
]
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
Not modified
Empty response
total_count
int
required
incomplete_results
boolean
required
items
array[object (Topic Search Result Item)]
required
Topic Search Result Item
object (Topic Search Result Item)
Topic Search Result Item
name
string
required
display_name
string or null
required
short_description
string or null
required
description
string or null
required
created_by
string or null
required
released
string or null
required
created_at
string
date-time
required
updated_at
string
date-time
required
featured
boolean
required
curated
boolean
required
score
number
required
repository_count
int or null
logo_url
string or null
uri
text_matches
array[object]
object
object_url
string
object_type
string or null
property
string
fragment
string
matches
array[object]
object
text
string
indices
array[int]
int
related
array[object] or null
object
topic_relation
object (topic_relation)
id
int
name
string
topic_id
int
relation_type
string
aliases
array[object] or null
object
topic_relation
object (topic_relation)
id
int
name
string
topic_id
int
relation_type
string
Search users
Find users via various criteria. This method returns up to 100 results per page.
When searching for users, you can get text match metadata for the issue login, public email, and name fields when you pass the text-match
media type. For more details about highlighting search results, see Text match metadata. For more details about how to receive highlighted search results, see 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.
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 Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see Constructing a search query. See "Searching users" for a detailed list of qualifiers.
sort
string
Sorts the results of your query by number of followers
or repositories
, or when the person joined
GitHub Enterprise Server. Default: best match
- Enum
-
- followers
- repositories
- joined
order
string
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
.
- Default
- "desc"
- Enum
-
- desc
- asc
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
Response
Response
{
"total_count": 12,
"incomplete_results": false,
"items": [
{
"login": "mojombo",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://secure.gravatar.com/avatar/25c7c18223fb42a4c6ae1c8db6f50f9b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
"gravatar_id": "",
"url": "https://api.github.com/users/mojombo",
"html_url": "https://github.com/mojombo",
"followers_url": "https://api.github.com/users/mojombo/followers",
"subscriptions_url": "https://api.github.com/users/mojombo/subscriptions",
"organizations_url": "https://api.github.com/users/mojombo/orgs",
"repos_url": "https://api.github.com/users/mojombo/repos",
"received_events_url": "https://api.github.com/users/mojombo/received_events",
"type": "User",
"score": 1,
"following_url": "https://api.github.com/users/mojombo/following{/other_user}",
"gists_url": "https://api.github.com/users/mojombo/gists{/gist_id}",
"starred_url": "https://api.github.com/users/mojombo/starred{/owner}{/repo}",
"events_url": "https://api.github.com/users/mojombo/events{/privacy}",
"site_admin": true
}
]
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
code
string
message
string
documentation_url
string
Not modified
Empty response
Service unavailable
{
"code": "string",
"message": "string",
"documentation_url": "string"
}
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
total_count
int
required
incomplete_results
boolean
required
items
array[object (User Search Result Item)]
required
User Search Result Item
object (User Search Result Item)
User Search Result Item
login
string
required
id
int
required
node_id
string
required
avatar_url
string
uri
required
gravatar_id
string or null
required
url
string
uri
required
html_url
string
uri
required
followers_url
string
uri
required
subscriptions_url
string
uri
required
organizations_url
string
uri
required
repos_url
string
uri
required
received_events_url
string
uri
required
type
string
required
score
number
required
following_url
string
required
gists_url
string
required
starred_url
string
required
events_url
string
required
public_repos
int
public_gists
int
followers
int
following
int
created_at
string
date-time
updated_at
string
date-time
name
string or null
bio
string or null
string or null
location
string or null
site_admin
boolean
required
hireable
boolean or null
text_matches
array[object]
object
object_url
string
object_type
string or null
property
string
fragment
string
matches
array[object]
object
text
string
indices
array[int]
int
blog
string or null
company
string or null
suspended_at
string or null
date-time
Was this page helpful?