GitHub following API
  1. Docs
  2. GitHub
  3. GitHub following API

GitHub following API

GitHub following: GET /v1/github/user/following. 1 credit per request.

GET /v1/github/user/following

GET /v1/github/user/following

GitHub following.

  • Cost: 1 credit
  • 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.

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).

1curl -G "https://api.socialscrape.dev/v1/github/user/following" \2  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3  --data-urlencode "handle=kentcdodds"

Example response#

This is a sample from a recorded response, lists and long text are shortened, other people's names and handles are replaced. Status 200.

200 OKSample response
1{2  "ok": true,3  "credits_charged": 1,4  "credits_remaining": 4999,5  "cached": false,6  "cached_at": null,7  "request_id": "req_d0400ab2ae5309bdafd354ff",8  "data": {9    "object": "list",10    "items": [11      {12        "object": "profile",13        "platform": "github",14        "id": "1000000001",15        "handle": "sample_user",16        "name": "Sample User",17        "headline": null,18        "url": null,19        "kind": "person",20        "bio": null,21        "avatar_url": null,22        "banner_url": null,23        "verified": null,24        "is_private": null,25        "external_url": null,26        "links": null,27        "location": null,28        "category": null,29        "created_at": null,30        "stats": {31          "followers": null,32          "following": null,33          "posts": null,34          "likes": null,35          "views": null36        },37        "extra": {38          "node_id": "MDQ6VXNlcjQzMDM=",39          "site_admin": false,40          "type": "User"41        }42      },43      {44        "object": "profile",45        "platform": "github",46        "id": "1000000001",47        "handle": "sample_user",48        "name": "Sample User",49        "headline": null,50        "url": null,51        "kind": "person",52        "bio": null,53        "avatar_url": null,54        "banner_url": null,55        "verified": null,56        "is_private": null,57        "external_url": null,58        "links": null,59        "location": null,60        "category": null,61        "created_at": null,62        "stats": {63          "followers": null,64          "following": null,65          "posts": null,66          "likes": null,67          "views": null68        },69        "extra": {70          "node_id": "MDQ6VXNlcjE3MDMx",71          "site_admin": false,72          "type": "User"73        }74      }75    ],76    "cursor": "eyJwIjoyfQ",77    "has_more": true,78    "parent": null79  },80  "cursor": "eyJwIjoyfQ",81  "has_more": true82}

Response#

A list of Profile 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.