Docs menu

GitHub public activity

Beta 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
  • Status: Beta. Built and tested against recorded responses; the shape may still gain fields.
  • Cache: Results are kept up to 30 days; send max_age_days to reuse them for free.
  • Timeout: A request still running after about 25 seconds answers 202 with a job to poll (Batch and jobs).

Parameters#

NameTypeRequiredDescription
handlestringone ofGitHub username. Also accepted as username, login.
urlURLone ofProfile URL (github.com/<user>). Accepted hosts: github.com.
yearintegernoCalendar 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: true for a smaller response without null fields and extra.
  • raw: true to also get the platform's original object as raw.
  • 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).

curl
curl -G "https://api.socialscrape.io/v1/github/user/activity" \
  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \
  --data-urlencode "handle=gaearon" \
  --data-urlencode "year=2025" \
  --data-urlencode "cursor=7"
Python
import os
import requests

params = {
    "handle": "gaearon",
    "year": "2025",
    "cursor": "7",
}
res = requests.get(
    "https://api.socialscrape.io/v1/github/user/activity",
    headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
    params=params,
)
body = res.json()

if body["ok"]:
    print(body["data"])
else:
    print(body["error"]["code"], body["error"]["message"])
TypeScript
const url = new URL("https://api.socialscrape.io/v1/github/user/activity");
url.search = new URLSearchParams({
  "handle": "gaearon",
  "year": "2025",
  "cursor": "7"
}).toString();
const res = await fetch(url, {
  headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();

if (body.ok) {
  console.log(body.data);
} else {
  console.error(body.error.code, body.error.message);
}
n8n
{
  "nodes": [
    {
      "name": "SocialScrape GitHub public activity",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        0,
        0
      ],
      "parameters": {
        "method": "GET",
        "url": "https://api.socialscrape.io/v1/github/user/activity",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "handle",
              "value": "gaearon"
            },
            {
              "name": "year",
              "value": "2025"
            },
            {
              "name": "cursor",
              "value": "7"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "x-api-key",
              "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
            }
          ]
        }
      }
    }
  ],
  "connections": {}
}

Example response#

This is a sample from a recorded response, lists and long text are shortened. Status 200.

{
  "ok": true,
  "credits_charged": 1,
  "credits_remaining": 4999,
  "cached": false,
  "cached_at": null,
  "request_id": "req_918c37a7eb5b316257905e23",
  "data": {
    "object": "list",
    "items": [
      {
        "object": "activity",
        "platform": "github",
        "id": "gaearon:2025-06:1",
        "type": "commits",
        "actor": {
          "id": null,
          "handle": "gaearon",
          "name": null,
          "url": "https://github.com/gaearon",
          "avatar_url": null,
          "verified": null
        },
        "repo": null,
        "created_at": null,
        "extra": {
          "details": [
            {
              "date_text": null,
              "language": null,
              "links": [
                {
                  "text": "gaearon/overreacted.io",
                  "url": "https://github.com/gaearon/overreacted.io"
                },
                {
                  "text": "21 commits",
                  "url": "https://github.com/gaearon/overreacted.io/commits?author=gaearon&since=2025-06-01&until=2025-07-01"
                }
              ],
              "repository": {
                "text": "gaearon/overreacted.io",
                "url": "https://github.com/gaearon/overreacted.io"
              },
              "text": "gaearon/overreacted.io 21 commits"
            },
            {
              "date_text": null,
              "language": null,
              "links": [
                {
                  "text": "vercel/next.js",
                  "url": "https://github.com/vercel/next.js"
                },
                {
                  "text": "1 commit",
                  "url": "https://github.com/vercel/next.js/commits?author=gaearon&since=2025-06-01&until=2025-07-01"
                }
              ],
              "repository": {
                "text": "vercel/next.js",
                "url": "https://github.com/vercel/next.js"
              },
              "text": "vercel/next.js 1 commit"
            },
            {
              "date_text": null,
              "language": null,
              "links": [
                {
                  "text": "bluesky-social/social-app",
                  "url": "https://github.com/bluesky-social/social-app"
                },
                {
                  "text": "1 commit",
                  "url": "https://github.com/bluesky-social/social-app/commits?author=gaearon&since=2025-06-01&until=2025-07-01"
                }
              ],
              "repository": {
                "text": "bluesky-social/social-app",
                "url": "https://github.com/bluesky-social/social-app"
              },
              "text": "bluesky-social/social-app 1 commit"
            }
          ],
          "month": "June 2025",
          "summary": "Created 23 commits in 3 repositories"
        }
      },
      {
        "object": "activity",
        "platform": "github",
        "id": "gaearon:2025-06:2",
        "type": "repositories",
        "actor": {
          "id": null,
          "handle": "gaearon",
          "name": null,
          "url": "https://github.com/gaearon",
          "avatar_url": null,
          "verified": null
        },
        "repo": "gaearon/analysis-solutions",
        "created_at": null,
        "extra": {
          "details": [
            {
              "date_text": "Jun 28",
              "language": "Lean",
              "links": [
                {
                  "text": "gaearon/analysis-solutions",
                  "url": "https://github.com/gaearon/analysis-solutions"
                }
              ],
              "repository": {
                "text": "gaearon/analysis-solutions",
                "url": "https://github.com/gaearon/analysis-solutions"
              },
              "text": "gaearon/analysis-solutions"
            }
          ],
          "month": "June 2025",
          "summary": "Created 1 repository"
        }
      }
    ],
    "cursor": "eyJwIjo4fQ",
    "has_more": true,
    "parent": null
  },
  "cursor": "eyJwIjo4fQ",
  "has_more": true
}

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.

CodeHTTPRetryMeaning
invalid_params400noA parameter is missing, unknown or has the wrong type.
unsupported_url400noThe URL is not one this endpoint accepts (wrong platform or form).
not_found404noThe 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:

{
  "ok": false,
  "error": {
    "code": "not_found",
    "message": "The platform says this profile, post or item does not exist.",
    "retryable": false
  },
  "credits_charged": 0,
  "request_id": "req_b3d77cb0a773a9fa4948fd89"
}