Skip to content

User Following

GET/v1/github/user/following1 credit

Returns a page of the accounts a GitHub user follows, with login, id, avatar, profile URL and account type.

01Query parameters

NameTypeDescription
handleoptionalstringGitHub username, e.g. `torvalds` (a leading `@` is ignored). One of `handle`, `username` or `url` is required.
usernameoptionalstringSame as `handle`, accepted under this name too. One of `handle`, `username` or `url` is required.
urloptionalstringGitHub profile URL, e.g. `https://github.com/torvalds`. One of `handle`, `username` or `url` is required.
cursoroptionalstringPage number to fetch, starting at 1. Pass the `cursor` value of the previous answer to get the next page.Default: 1

02Request

curl "https://api.scrapesocial.ai/v1/github/user/following?handle=kentcdodds" \
  -H "x-api-key: $SCRAPESOCIAL_KEY"

03Responses

Real answers from the API. Lists are shortened to 2 items.

GET /v1/github/user/following?handle=kentcdodds

{
  "success": true,
  "credits_remaining": 4980,
  "credits_charged": 1,
  "following": [
    {
      "id": 4303,
      "node_id": "MDQ6VXNlcjQzMDM=",
      "login": "jdalton",
      "avatar_url": "https://avatars.githubusercontent.com/u/4303?v=4",
      "url": "https://github.com/jdalton",
      "type": "User",
      "site_admin": false
    },
    {
      "id": 17031,
      "node_id": "MDQ6VXNlcjE3MDMx",
      "login": "jlongster",
      "avatar_url": "https://avatars.githubusercontent.com/u/17031?v=4",
      "url": "https://github.com/jlongster",
      "type": "User",
      "site_admin": false
    }
  ],
  "cursor": 2
}

Common to every endpoint

Any route can answer these: a missing or wrong key, no credits left, the platform not answering, or a failure on our side. None of them costs credits.

GET /v1/cosmos/profile?handle=design

{
  "success": false,
  "message": "Invalid API key"
}

04Notes

30 accounts per page. The answer's `cursor` is the next page number, null on the last page. A user who follows nobody, or a page past the end, is a 200 with an empty `following` list and costs 0 credits. An unknown user is a free 404; a value that is not a GitHub username or profile URL is a free 400.

05Errors & credits

Every error has success: false, a real HTTP status and costs no credits.

  • 400missing_parameter

    A required parameter is missing or invalid.

  • 403private_account

    The account is private or age-restricted.

  • 404not_found

    No such account.

  • 503upstream_error

    The platform did not answer; retry shortly.