GitHub v3 REST API

List followers of a user

Lists the people following the specified user.

get
http://HOSTNAME/api/v3/users/{username}/followers

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

usernamestringrequired

Response

200 application/json

Response

Simple User

namestring | null
emailstring | null
loginstringrequired

Example:octocat

idintegerrequired

Example:1

node_idstringrequired

Example:MDQ6VXNlcjE=

avatar_urlstring(uri)required

Example:https://github.com/images/error/octocat_happy.gif

gravatar_idstring | nullrequired

Example:41d064eb2195891e12d0413f63227ea7

urlstring(uri)required

Example:https://api.github.com/users/octocat

html_urlstring(uri)required

Example:https://github.com/octocat

followers_urlstring(uri)required

Example:https://api.github.com/users/octocat/followers

following_urlstringrequired

Example:https://api.github.com/users/octocat/following{/other_user}

gists_urlstringrequired

Example:https://api.github.com/users/octocat/gists{/gist_id}

starred_urlstringrequired

Example:https://api.github.com/users/octocat/starred{/owner}{/repo}

subscriptions_urlstring(uri)required

Example:https://api.github.com/users/octocat/subscriptions

organizations_urlstring(uri)required

Example:https://api.github.com/users/octocat/orgs

repos_urlstring(uri)required

Example:https://api.github.com/users/octocat/repos

events_urlstringrequired

Example:https://api.github.com/users/octocat/events{/privacy}

received_events_urlstring(uri)required

Example:https://api.github.com/users/octocat/received_events

typestringrequired

Example:User

site_adminbooleanrequired
starred_atstring

Example:"2020-07-09T00:17:55Z"

get/users/{username}/followers
 
200 application/json

List the people a user follows

Lists the people who the specified user follows.

get
http://HOSTNAME/api/v3/users/{username}/following

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

usernamestringrequired

Response

200 application/json

Response

Simple User

namestring | null
emailstring | null
loginstringrequired

Example:octocat

idintegerrequired

Example:1

node_idstringrequired

Example:MDQ6VXNlcjE=

avatar_urlstring(uri)required

Example:https://github.com/images/error/octocat_happy.gif

gravatar_idstring | nullrequired

Example:41d064eb2195891e12d0413f63227ea7

urlstring(uri)required

Example:https://api.github.com/users/octocat

html_urlstring(uri)required

Example:https://github.com/octocat

followers_urlstring(uri)required

Example:https://api.github.com/users/octocat/followers

following_urlstringrequired

Example:https://api.github.com/users/octocat/following{/other_user}

gists_urlstringrequired

Example:https://api.github.com/users/octocat/gists{/gist_id}

starred_urlstringrequired

Example:https://api.github.com/users/octocat/starred{/owner}{/repo}

subscriptions_urlstring(uri)required

Example:https://api.github.com/users/octocat/subscriptions

organizations_urlstring(uri)required

Example:https://api.github.com/users/octocat/orgs

repos_urlstring(uri)required

Example:https://api.github.com/users/octocat/repos

events_urlstringrequired

Example:https://api.github.com/users/octocat/events{/privacy}

received_events_urlstring(uri)required

Example:https://api.github.com/users/octocat/received_events

typestringrequired

Example:User

site_adminbooleanrequired
starred_atstring

Example:"2020-07-09T00:17:55Z"

get/users/{username}/following
 
200 application/json

Check if a user follows another user

get
http://HOSTNAME/api/v3/users/{username}/following/{target_user}

Path Parameters

usernamestringrequired
target_userstringrequired

Response

if the user follows the target user

get/users/{username}/following/{target_user}
 

List GPG keys for a user

Lists the GPG keys for a user. This information is accessible by anyone.

get
http://HOSTNAME/api/v3/users/{username}/gpg_keys

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

usernamestringrequired

Response

200 application/json

Response

A unique encryption key

idintegerrequired

Example:3

primary_key_idinteger | nullrequired
key_idstringrequired

Example:3262EFF25BA0D270

public_keystringrequired

Example:xsBNBFayYZ...

emailsarray[object]required

Example:[{"email":"mastahyeti@users.noreply.github.com","verified":true}]

Show Child Parameters
subkeysarray[object]required

Example:[{"id":4,"primary_key_id":3,"key_id":"4A595D4C72EE49C7","public_key":"zsBNBFayYZ...","emails":[],"subkeys":[],"can_sign":false,"can_encrypt_comms":true,"can_encrypt_storage":true,"can_certify":false,"created_at":"2016-03-24T11:31:04-06:00","expires_at":null}]

Show Child Parameters
can_signbooleanrequired

Example:true

can_encrypt_commsbooleanrequired
can_encrypt_storagebooleanrequired
can_certifybooleanrequired

Example:true

created_atstring(date-time)required

Example:2016-03-24T11:31:04-06:00

expires_atstring | null(date-time)required
raw_keystring | nullrequired
get/users/{username}/gpg_keys
 
200 application/json

Get contextual information for a user

Provides hovercard information when authenticated through basic auth or OAuth with the repo scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations.

The subject_type and subject_id parameters provide context for the person’s hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about octocat who owns the Spoon-Knife repository via cURL, it would look like this:

 curl -u username:token
  https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192
get
http://HOSTNAME/api/v3/users/{username}/hovercard

Query Parameters

subject_typestring

Identifies which additional information you’d like to receive about the person’s hovercard. Can be organization, repository, issue, pull_request. Required when using subject_id.

Allowed values:organizationrepositoryissuepull_request

subject_idstring

Uses the ID for the subject_type you specified. Required when using subject_type.

Path Parameters

usernamestringrequired

Response

application/json

Response

Hovercard

Hovercard

contextsarray[object]required
Show Child Parameters
get/users/{username}/hovercard
 
application/json