GitHub user API
A public GitHub profile in GitHub’s REST user object.
GET /v1/github/users/{handle}1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/github/users/torvalds",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "user": { "login": "torvalds", "id": 1024025, "node_id": "MDQ6VXNlcjEwMjQwMjU=", "avatar_url": "https://avatars.githubusercontent.com/u/1024025?v=4", "html_url": "https://github.com/torvalds", "type": "User", "site_admin": false, "name": "Linus Torvalds", "company": "Linux Foundation", "blog": "", "location": "Portland, OR", "email": null, "hireable": null, "bio": null, "twitter_username": null, "public_repos": 12, "public_gists": 1, "followers": 333019, "following": 0, "created_at": "2011-09-03T15:26:22Z", "updated_at": "2026-11-01T20:12:14Z", "gravatar_id": "", "url": "https://api.github.com/users/torvalds", "followers_url": "https://api.github.com/users/torvalds/followers", "…": "9 more fields" }}Parameters
| Name | Type | Description |
|---|---|---|
handlepath · required | string | GitHub username, with or without the @, or a profile URL. Example: torvalds. |
Response fields
200 with a GitHubUserResponse, in GitHub’s own REST v3 objects.
| Field | Type | Description |
|---|---|---|
user | GitHubUser |
Status codes
| Status | Meaning |
|---|---|
200 | The user. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | No public GitHub user, repository or issue by that name. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | GitHub 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.