GitHub public activity API
The profile's contribution activity timeline (commits, repositories created, pull requests, issues, reviews), one month a page, newest month first, pagi...
GET /v1/github/user/activity
GET /v1/github/user/activity
The profile's contribution activity timeline (commits, repositories created, pull requests, issues, reviews), one month a page, newest month first, paging backward through the year.
- Cost: 1 credit
- Cache: Results are kept up to 30 days; send
max_age_daysto reuse them for free. - Timeout: A request still running after about 25 seconds answers
202with a job to poll (Batch and jobs).
Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
handle | string | one of | GitHub username. Also accepted as username, login. |
url | URL | one of | Profile URL (github.com/<user>). Accepted hosts: github.com. |
year | integer | no | Calendar year (2008 onward); default the current year. Range 2008 to 2100. Example 2025. |
Send at least one of handle, url. If you send several, the first listed is used and the rest are ignored.
Every request also accepts:
cursor: the cursor from the previous page (Pagination).trim:truefor a smaller response withoutnullfields andextra.raw:trueto also get the platform's original object asraw.max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).
Example request#
Set your key in the environment first (see Authentication).
1curl -G "https://api.socialscrape.dev/v1/github/user/activity" \2 -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3 --data-urlencode "handle=gaearon" \4 --data-urlencode "year=2025" \5 --data-urlencode "cursor=7"1import os2import requests34params = {5 "handle": "gaearon",6 "year": "2025",7 "cursor": "7",8}9res = requests.get(10 "https://api.socialscrape.dev/v1/github/user/activity",11 headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},12 params=params,13)14body = res.json()1516if body["ok"]:17 print(body["data"])18else:19 print(body["error"]["code"], body["error"]["message"])1const url = new URL("https://api.socialscrape.dev/v1/github/user/activity");2url.search = new URLSearchParams({3 "handle": "gaearon",4 "year": "2025",5 "cursor": "7"6}).toString();7const res = await fetch(url, {8 headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },9});10const body = await res.json();1112if (body.ok) {13 console.log(body.data);14} else {15 console.error(body.error.code, body.error.message);16}1{2 "nodes": [3 {4 "name": "SocialScrape GitHub public activity",5 "type": "n8n-nodes-base.httpRequest",6 "typeVersion": 4.2,7 "position": [8 0,9 010 ],11 "parameters": {12 "method": "GET",13 "url": "https://api.socialscrape.dev/v1/github/user/activity",14 "sendQuery": true,15 "queryParameters": {16 "parameters": [17 {18 "name": "handle",19 "value": "gaearon"20 },21 {22 "name": "year",23 "value": "2025"24 },25 {26 "name": "cursor",27 "value": "7"28 }29 ]30 },31 "sendHeaders": true,32 "headerParameters": {33 "parameters": [34 {35 "name": "x-api-key",36 "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"37 }38 ]39 }40 }41 }42 ],43 "connections": {}44}Example response#
This is a sample from a recorded response, lists and long text are shortened. Status 200.
1{2 "ok": true,3 "credits_charged": 1,4 "credits_remaining": 4999,5 "cached": false,6 "cached_at": null,7 "request_id": "req_918c37a7eb5b316257905e23",8 "data": {9 "object": "list",10 "items": [11 {12 "object": "activity",13 "platform": "github",14 "id": "gaearon:2025-06:1",15 "type": "commits",16 "actor": {17 "id": null,18 "handle": "gaearon",19 "name": null,20 "url": "https://github.com/gaearon",21 "avatar_url": null,22 "verified": null23 },24 "repo": null,25 "created_at": null,26 "extra": {27 "details": [28 {29 "date_text": null,30 "language": null,31 "links": [32 {33 "text": "gaearon/overreacted.io",34 "url": "https://github.com/gaearon/overreacted.io"35 },36 {37 "text": "21 commits",38 "url": "https://github.com/gaearon/overreacted.io/commits?author=gaearon&since=2025-06-01&until=2025-07-01"39 }40 ],41 "repository": {42 "text": "gaearon/overreacted.io",43 "url": "https://github.com/gaearon/overreacted.io"44 },45 "text": "gaearon/overreacted.io 21 commits"46 },47 {48 "date_text": null,49 "language": null,50 "links": [51 {52 "text": "vercel/next.js",53 "url": "https://github.com/vercel/next.js"54 },55 {56 "text": "1 commit",57 "url": "https://github.com/vercel/next.js/commits?author=gaearon&since=2025-06-01&until=2025-07-01"58 }59 ],60 "repository": {61 "text": "vercel/next.js",62 "url": "https://github.com/vercel/next.js"63 },64 "text": "vercel/next.js 1 commit"65 },66 {67 "date_text": null,68 "language": null,69 "links": [70 {71 "text": "bluesky-social/social-app",72 "url": "https://github.com/bluesky-social/social-app"73 },74 {75 "text": "1 commit",76 "url": "https://github.com/bluesky-social/social-app/commits?author=gaearon&since=2025-06-01&until=2025-07-01"77 }78 ],79 "repository": {80 "text": "bluesky-social/social-app",81 "url": "https://github.com/bluesky-social/social-app"82 },83 "text": "bluesky-social/social-app 1 commit"84 }85 ],86 "month": "June 2025",87 "summary": "Created 23 commits in 3 repositories"88 }89 },90 {91 "object": "activity",92 "platform": "github",93 "id": "gaearon:2025-06:2",94 "type": "repositories",95 "actor": {96 "id": null,97 "handle": "gaearon",98 "name": null,99 "url": "https://github.com/gaearon",100 "avatar_url": null,101 "verified": null102 },103 "repo": "gaearon/analysis-solutions",104 "created_at": null,105 "extra": {106 "details": [107 {108 "date_text": "Jun 28",109 "language": "Lean",110 "links": [111 {112 "text": "gaearon/analysis-solutions",113 "url": "https://github.com/gaearon/analysis-solutions"114 }115 ],116 "repository": {117 "text": "gaearon/analysis-solutions",118 "url": "https://github.com/gaearon/analysis-solutions"119 },120 "text": "gaearon/analysis-solutions"121 }122 ],123 "month": "June 2025",124 "summary": "Created 1 repository"125 }126 }127 ],128 "cursor": "eyJwIjo4fQ",129 "has_more": true,130 "parent": null131 },132 "cursor": "eyJwIjo4fQ",133 "has_more": true134}Response#
A list of Activity objects in data.items, with data.cursor and data.has_more.
See Data models for every field. The envelope around data is described in Responses.
Errors#
Failures are free: credits_charged is 0. Branch on error.code, never on the message.
| Code | HTTP | Retry | Meaning |
|---|---|---|---|
invalid_params | 400 | no | A parameter is missing, unknown or has the wrong type. |
unsupported_url | 400 | no | The URL is not one this endpoint accepts (wrong platform or form). |
not_found | 404 | no | The platform says this profile, post or item does not exist. |
Every request can also fail with the account and platform errors listed on the Errors page.
Example error:
1{2 "ok": false,3 "error": {4 "code": "not_found",5 "message": "The platform says this profile, post or item does not exist.",6 "retryable": false7 },8 "credits_charged": 0,9 "request_id": "req_b3d77cb0a773a9fa4948fd89"10}Related endpoints#
- GitHub user (
GET /v1/github/user) - GitHub user repositories (
GET /v1/github/user/repositories) - GitHub repository (
GET /v1/github/repository) - GitHub followers (
GET /v1/github/user/followers) - GitHub following (
GET /v1/github/user/following) - GitHub contribution calendar (
GET /v1/github/user/contributions) - GitHub pull requests by a user (
GET /v1/github/user/pull-requests) - GitHub trending repositories (
GET /v1/github/trending/repositories)