The GitHub API
This describes the resources that make up the official GitHub API v3. If you have any problems or requests please contact support.
For the new API v3, start browsing the resources on the right »
View the API Changelog for information on existing and planned changes to the API.
Current Version
Accept: application/vnd.github.beta+json
The GitHub API version is currently in beta. The beta
media type
property will be valid until sometime in 2013. A notice will be given closer
to the actual date.
We consider the “beta” API unchangeable. File a support issue if you have problems.
Deprecations
The following functionality is deprecated. For backwards compatibility purposes, API v3 will continue to provide this functionality. However, this deprecated functionality will be removed in the next major version of the API.
The recommendations below will help you prepare your application for the next major version of the API.
-
- Method: /gists/:id/fork
- Recommendation: Use /gists/:id/forks (plural) instead.
-
- Method: /legacy/issues/search/:owner/:repository/:state/:keyword
- Recommendation: Use v3 Issue Search API instead.
-
- Method: /legacy/repos/search/:keyword
- Recommendation: Use v3 Repository Search API instead.
-
- Method: /legacy/user/search/:keyword
- Recommendation: Use v3 User Search API instead.
-
- Method: /legacy/user/email/:email
- Recommendation: Use v3 User Search API instead.
-
- Method: /repos/:owner/:repo/hooks/:id/test
- Recommendation: Use /repos/:owner/:repo/hooks/:id/tests (plural) instead.
-
- Query parameters when POSTing to /repos/:owner/:repo/forks
- Recommendation: Use JSON to POST to this method instead.
-
- Pull Request attribute: merge_commit_sha
- Recommendation: Do not use this attribute.
-
- Rate Limit attribute: rate
- Recommendation: Use resources[“core”] instead.
-
- Repository attribute: forks
- Recommendation: Use fork_count instead.
-
- Repository attribute: master_branch
- Recommendation: Use default_branch instead.
-
- Repository attribute: open_issues
- Recommendation: Use open_issues_count instead.
-
- Repository attribute: public
- Recommendation: When creating a repository, use the private attribute to indicate whether the repository should be public or private. Do not use the public attribute.
-
- Repository attribute: watchers
- Recommendation: Use watchers_count instead.
-
- User attribute: bio
- Recommendation: Do not use this attribute. It is obsolete.
Breaking Beta Changes
June 12, 2012:
- Removed API v1 support
- Removed API v2 support
June 15th, 2011:
-
gravatar_url
is being deprecated in favor ofavatar_url
for all responses that include users or orgs. A default size is no longer included in the URL. - Creating new gists (both anonymously and with an authenticated user)
should use
POST /gists
from now on.POST /users/:user/gists
is no longer supported.
June 1st, 2011:
- Removed support for PUT verb on update requests. Use POST or PATCH instead.
- Removed
.json
extension from all URLs. - No longer using the X-Next or X-Last headers. Pagination info is returned in the Link header instead.
- JSON-P response has completely changed to a more consistent format.
- Starring gists now uses PUT verb (instead of POST) and returns 204.