Legacy Search
This is a listing of the Legacy 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.
Legacy Search API is Deprecated
The Legacy Search API (described below) is deprecated and is scheduled for removal in the next major version of the API. We recommend using the v3 Search API instead. It contains new endpoints and much more functionality.
Search issues
Find issues by state and keyword.
GET /legacy/issues/search/:owner/:repository/:state/:keyword
Parameters
Name | Type | Description |
---|---|---|
state |
string |
Indicates the state of the issues to return. Can be either open or closed . |
keyword |
string |
The search term. |
Status: 200 OK
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4999
{
"issues": [
{
"gravatar_id": "",
"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
Name | Type | Description |
---|---|---|
keyword |
string |
The search term |
language |
string |
Filter results by language |
start_page |
string |
The page number to fetch |
sort |
string |
The sort field. One of stars , forks , or updated . Default: results are sorted by best match. |
order |
string |
The sort field. if sort param is provided. Can be either asc or desc . |
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
Name | Type | Description |
---|---|---|
keyword |
string |
The search term |
start_page |
string |
The page number to fetch |
sort |
string |
The sort field. One of stars , forks , or updated . Default: results are sorted by best match. |
order |
string |
The sort field. if sort param is provided. Can be either asc or desc . |
Status: 200 OK
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4999
{
"users": [
{
"gravatar_id": "",
"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
Name | Type | Description |
---|---|---|
email |
string |
The 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": ""
}
}