Before you start
- Get an API keySign up for 100 free credits, no card. Keys start with
gs_live_. - Put it in the environmentEvery example reads it from
GROUNDSOCIAL_API_KEY:export GROUNDSOCIAL_API_KEY=gs_live_… - Set up cURL
jq --version # brew install jq, or apt install jq
Call GitHub user activity API from cURL
GET /v1/github/users/{handle}/activity. Save this as fetch.sh and run bash fetch.sh. It reads the items in items and prints actor.login for each.
# The whole response, pretty-printed:
curl -sS "https://api.groundsocial.dev/v1/github/users/torvalds/activity" \
-H "Authorization: Bearer $GROUNDSOCIAL_API_KEY" | jq .
# Just the login, one line per item:
curl -sS "https://api.groundsocial.dev/v1/github/users/torvalds/activity" \
-H "Authorization: Bearer $GROUNDSOCIAL_API_KEY" \
| jq -r '.items[] | [.actor.login] | @tsv'The response
A real GitHub response to this call, recorded from the live API on 27 Nov 2026 and shortened for display: arrays keep their first items and … marks every cut. The recorded page had 30 items in items. Live calls return current data in the same shape.
{
"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"
}Top-level fields
| 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. |
Parameters
| Name | In | Type | Description |
|---|---|---|---|
handle (required) | path | string | GitHub username, with or without the @, or a profile URL. Example: torvalds. |
year | query | integer | Only events from this calendar year. |
per_page | query | integer | Items per page, 1-100 (default 30). |
page | query | integer | 1-indexed page number (default 1). |
after | query | string | Cursor: the previous page’s next_cursor (instead of page). |
Pagination
Each page carries the next cursor in next_cursor; pass it back as after and stop when it is empty. Every page is a separate call at 1 credit per call, so cap the pages you read. A plain shell loop.
cursor=""
for i in 1 2 3 4 5; do # each page is one call
page=$(curl -sS "https://api.groundsocial.dev/v1/github/users/torvalds/activity${cursor:+?after=$cursor}" \
-H "Authorization: Bearer $GROUNDSOCIAL_API_KEY")
echo "$page" | jq -r '.items[] | [.actor.login] | @tsv'
cursor=$(echo "$page" | jq -r '.next_cursor // empty')
if [ -z "$cursor" ]; then break; fi
doneErrors and retries
Every error is JSON with error.code (stable: branch on it), message, hint (what to do next), docs_url and retryable. A failed call is never charged. Retry only when retryable is true, after the Retry-After header.
# --fail-with-body exits non-zero on a 4xx/5xx and still saves the error JSON.
curl -sS "https://api.groundsocial.dev/v1/github/users/torvalds/activity" \
-H "Authorization: Bearer $GROUNDSOCIAL_API_KEY" \
--fail-with-body -o page.json \
|| jq -r '.error | "\(.code): \(.hint)"' page.json| 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 code and what to do about it.
Pricing
| Cost | |
|---|---|
| Per call | 1 credit per call |
| 1,000 calls | $1.00 on the starter pack, $0.40 at volume |
| No key (MPP or x402) | $0.01 per call |
| Failed call | Refunded, never charged |
Every response has x-credits-charged and x-credits-remaining headers. Credits never expire. Packs and calculator.
From an AI agent (MCP)
The same call is the github_user_activity tool on the hosted MCP server, so Claude, Cursor or any MCP client can make it without code. Add the server once:
claude mcp add --transport http groundsocial https://api.groundsocial.dev/mcpThen ask for it in words (“A GitHub user’s recent public activity: pushes, pull requests, issues, stars”), or call the tool directly:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "github_user_activity",
"arguments": {
"handle": "torvalds"
}
}
}MCP setup for Claude Desktop, Cursor, VS Code and ChatGPT.
Start here
Call it with the example and read the fields you need.
Keep going
- This call in Python, JavaScript, TypeScript, Go, PHP.
- GitHub user activity API reference: every field and status code.
- GitHub tutorials and all cURL tutorials.
- GitHub API: every endpoint and price.
- How to scrape GitHub user repositories with cURL: A GitHub user’s public repositories, sorted and paginated, with stars and languages.
- How to scrape GitHub user pull requests with cURL: Pull requests a GitHub user opened, newest first, with since/until.
- How to scrape GitHub releases with cURL: A GitHub repository’s releases, newest first, with since/until.
- How to scrape GitHub repository issues with cURL: Issues and pull requests of a GitHub repository, filtered by state, labels and date.
- How to scrape GitHub top issues with cURL: The most-reacted open issues of a GitHub repository: top requests and complaints.
- How to scrape GitHub user with cURL: A public GitHub user: name, bio, company, location, followers, following, public repo count.
Run it on your own data
One key for GitHub and 76 more platforms, over REST or MCP. Free credits on signup, no card.
GitHub is a trademark of GitHub, Inc. We are not affiliated with or endorsed by GitHub.