Search
This is a listing of the Search API features from API v2 that have been ported to API v3. There should be no changes, other than the new URL and JSON output format.
Search issues
Find issues by state and keyword.
GET /legacy/issues/search/:owner/:repository/:state/:keyword
Parameters
- state
-
openorclosed - keyword
- Search term
Status: 200 OK
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4999
{
"issues": [
{
"gravatar_id": "4c3d600867886124a73f14a907b1a955",
"position": 10,
"number": 10,
"votes": 2,
"created_at": "2010-06-04T23:20:33Z",
"comments": 5,
"body": "Issue body goes here",
"title": "This is is the issue title",
"updated_at": "2010-06-04T23:20:33Z",
"html_url": "https://github.com/pengwynn/linkedin/issues/10",
"user": "ckarbass",
"labels": [
"api",
"feature request",
"investigation"
],
"state": "open"
}
]
}
Search repositories
Find repositories by keyword. Note, this legacy method does not follow the
v3 pagination pattern. This method returns up to 100 results per page and
pages can be fetched using the start_page parameter.
GET /legacy/repos/search/:keyword
Parameters
- keyword
- Search term
- language
- Optional Filter results by language
- start_page
- Optional Page number to fetch
- sort
-
Optional Sort field. One of
stars,forks, orupdated. If not provided, results are sorted by best match. - order
-
Optional Sort order if
sortparam is provided. One ofascordesc.
Status: 200 OK
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4999
{
"repositories": [
{
"type": "repo",
"created": "2011-09-05T11:07:54Z",
"watchers": 2913,
"has_downloads": true,
"username": "mathiasbynens",
"homepage": "http://mths.be/dotfiles",
"url": "https://github.com/mathiasbynens/dotfiles",
"fork": false,
"has_issues": true,
"has_wiki": false,
"forks": 520,
"size": 192,
"private": false,
"followers": 2913,
"name": "dotfiles",
"owner": "mathiasbynens",
"open_issues": 12,
"pushed_at": "2012-06-05T03:37:13Z",
"score": 3.289718,
"pushed": "2012-06-05T03:37:13Z",
"description": "sensible hacker defaults for OS X",
"language": "VimL",
"created_at": "2011-09-05T11:07:54Z"
}
]
}
Search users
Find users by keyword.
GET /legacy/user/search/:keyword
Parameters
- keyword
- Keyword search parameters
- start_page
- Optional Page number to fetch
- sort
-
Optional Sort field. One of
followers,joined, orrepositories. If not provided, results are sorted by best match. - order
-
Optional Sort order if
sortparam is provided. One ofascordesc.
Status: 200 OK
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4999
{
"users": [
{
"gravatar_id": "70889091349f7598bce9afa588034310",
"name": "Hirotaka Kawata",
"created_at": "2009-10-05T01:32:06Z",
"location": "Tsukuba, Ibaraki, Japan",
"public_repo_count": 8,
"followers": 10,
"language": "Python",
"fullname": "Hirotaka Kawata",
"username": "techno",
"id": "user-135050",
"repos": 8,
"type": "user",
"followers_count": 10,
"login": "techno",
"score": 4.2559967,
"created": "2009-10-05T01:32:06Z"
}
]
}
Email search
This API call is added for compatibility reasons only. There’s no guarantee
that full email searches will always be available. The @ character in the
address must be left unencoded. Searches only against public email addresses
(as configured on the user’s GitHub profile).
GET /legacy/user/email/:email
Parameters
- Email address
Status: 200 OK
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4999
{
"user": {
"public_repo_count": 2,
"public_gist_count": 1,
"followers_count": 20,
"following_count": 0,
"created": "2009-10-05T01:32:06Z",
"created_at": "2009-10-05T01:32:06Z",
"name": "monalisa octocat",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"id": 2,
"login": "octocat",
"type": "User",
"gravatar_id": "70889091349f7598bce9afa588034310"
}
}