GitHub user activity API
Recent public events of a user: pushes, pull requests, issues, releases, stars.
GET /v1/github/users/{handle}/activity1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/github/users/torvalds/activity",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "items": [ { "id": "28305289334", "type": "PushEvent", "actor": { "login": "torvalds", "id": 1024025, "display_login": "torvalds", "gravatar_id": "", "url": "https://api.github.com/users/torvalds", "avatar_url": "https://avatars.githubusercontent.com/u/1024025?" }, "repo": { "name": "torvalds/linux", "id": 2325298, "url": "https://api.github.com/repos/torvalds/linux" }, "payload": { "repository_id": 2325298, "push_id": 51929712691, "ref": "refs/heads/master", "head": "25faec9ce61c01fb45abf812a222c5b43c3cd5c5", "before": "40212b29a6f718d4e7fb3275cede181cb8e137cf" }, "public": true, "created_at": "2026-11-26T06:00:50Z" }, { "id": "28264213563", "type": "PushEvent", "actor": { "login": "torvalds", "id": 1024025, "display_login": "torvalds", "gravatar_id": "", "url": "https://api.github.com/users/torvalds", "avatar_url": "https://avatars.githubusercontent.com/u/1024025?" }, "repo": { "name": "torvalds/linux", "id": 2325298, "url": "https://api.github.com/repos/torvalds/linux" }, "payload": { "repository_id": 2325298, "push_id": 51595459390, "ref": "refs/heads/master", "head": "8d7fe9885c62fc9a95bf55d9db244d9672a8aadc", "before": "b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f" }, "public": true, "created_at": "2026-11-24T01:53:58Z" }, "… 28 more" ], "page": 1, "per_page": 30, "has_more": true, "next_cursor": "eyJzIjoiZXZlbnRzOnRvcnZhbGRzIiwicCI6MiwibiI6MzB9"}Parameters
| Name | Type | Description |
|---|---|---|
handlepath · required | string | GitHub username, with or without the @, or a profile URL. Example: torvalds. |
yearquery | integer | Only events from this calendar year. |
per_pagequery | integer | Items per page, 1-100 (default 30). |
pagequery | integer | 1-indexed page number (default 1). |
afterquery | string | Cursor: the previous page’s next_cursor (instead of page). |
Response fields
200 with a GitHubEventsResponse, in GitHub’s own REST v3 objects.
| Field | Type | Description |
|---|---|---|
items | GitHubEvent[] | |
page | integer | 1-indexed page this is. |
per_page | integer | |
has_more | boolean | |
next_cursor | string | null | Pass as after for the next page; null at the end. |
Status codes
| Status | Meaning |
|---|---|
200 | A page of events. |
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.