100 free credits. No credit card required. Get a key

GitHub following API

Accounts a user follows, paginated.

GET /v1/github/users/{handle}/following1 credit per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/github/users/sindresorhus/following",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 1 credit
{
"items": [
{
"login": "mattt",
"id": 7659,
"node_id": "MDQ6VXNlcjc2NTk=",
"avatar_url": "https://avatars.githubusercontent.com/u/7659?v=4",
"html_url": "https://github.com/mattt",
"type": "User",
"site_admin": false,
"gravatar_id": "",
"url": "https://api.github.com/users/mattt",
"followers_url": "https://api.github.com/users/mattt/followers",
"following_url": "https://api.github.com/users/mattt/following{/other_user}",
"gists_url": "https://api.github.com/users/mattt/gists{/gist_id}",
"starred_url": "https://api.github.com/users/mattt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mattt/subscriptions",
"organizations_url": "https://api.github.com/users/mattt/orgs",
"repos_url": "https://api.github.com/users/mattt/repos",
"events_url": "https://api.github.com/users/mattt/events{/privacy}",
"received_events_url": "https://api.github.com/users/mattt/received_events",
"user_view_type": "public"
},
{
"login": "paulirish",
"id": 39191,
"node_id": "MDQ6VXNlcjM5MTkx",
"avatar_url": "https://avatars.githubusercontent.com/u/39191?v=4",
"html_url": "https://github.com/paulirish",
"type": "User",
"site_admin": false,
"gravatar_id": "",
"url": "https://api.github.com/users/paulirish",
"followers_url": "https://api.github.com/users/paulirish/followers",
"following_url": "https://api.github.com/users/paulirish/following{/other_user}",
"gists_url": "https://api.github.com/users/paulirish/gists{/gist_id}",
"starred_url": "https://api.github.com/users/paulirish/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/paulirish/subscriptions",
"organizations_url": "https://api.github.com/users/paulirish/orgs",
"repos_url": "https://api.github.com/users/paulirish/repos",
"events_url": "https://api.github.com/users/paulirish/events{/privacy}",
"received_events_url": "https://api.github.com/users/paulirish/received_events",
"user_view_type": "public"
},
"… 14 more"
],
"page": 1,
"per_page": 30,
"has_more": false,
"next_cursor": null
}

Parameters

NameTypeDescription
handlepath · requiredstringGitHub username, with or without the @, or a profile URL. Example: torvalds.
per_pagequeryintegerItems per page, 1-100 (default 30).
pagequeryinteger1-indexed page number (default 1).
afterquerystringCursor: the previous page’s next_cursor (instead of page).
Response fields

200 with a GitHubUsersResponse, in GitHub’s own REST v3 objects.

FieldTypeDescription
itemsGitHubUser[]
pageinteger1-indexed page this is.
per_pageinteger
has_moreboolean
next_cursorstring | nullPass as after for the next page; null at the end.
Status codes
StatusMeaning
200A page of users.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404No public GitHub user, repository or issue by that name.
429Too many requests. Wait for Retry-After seconds.
503GitHub is temporarily unavailable. Retryable; nothing was charged.

Every error has code, message, hint and retryable. All error codes

GitHub is a trademark of GitHub, Inc. We are not affiliated with or endorsed by GitHub.