- Use cases
- Developer sourcing from GitHub
Developer sourcing from GitHub
Read GitHub profiles, repositories and trending developers.
The job
Recruiters and tool makers look for people by what they ship. List a language's trending developers, then read each one's repositories.
Endpoints
Failed requests and cached repeats cost 0 credits. Send max_age_days to accept a recent cached copy. See credits and caching.
| Endpoint | Returns | Cost |
|---|---|---|
| GitHub trending developers | 1 credit | |
| GitHub user | 1 credit | |
| GitHub user repositories | 1 credit | |
| GitHub contribution calendar | 1 credit | |
| GitHub trending repositories | 1 credit |
Recipe
- List trending developers for a language.
- Read each profile.
- List their repositories by last push.
1import os2import requests34API = "https://api.socialscrape.dev"5HEADERS = {"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]}678def get(path, **params):9 res = requests.get(API + path, headers=HEADERS, params=params, timeout=60)10 res.raise_for_status()11 return res.json()["data"]1213# GitHub trending developers14devs = get("/v1/github/trending/developers", language="rust", since="weekly")15# GitHub user repositories16repos = get("/v1/github/user/repositories", handle=devs["items"][0]["handle"], sort="pushed", direction="desc")1718for r in repos["items"][:10]:19 print(r["url"])1const API = "https://api.socialscrape.dev";2const headers = { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! };34async function get(path: string, params: Record<string, string | number | boolean>) {5 const query = new URLSearchParams(Object.entries(params).map(([k, v]) => [k, String(v)]));6 const res = await fetch(`${API}${path}?${query}`, { headers });7 if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);8 return (await res.json()).data;9}1011// GitHub trending developers12const devs = await get("/v1/github/trending/developers", { language: "rust", since: "weekly" });13// GitHub user repositories14const repos = await get("/v1/github/user/repositories", { handle: devs.items[0].handle, sort: "pushed", direction: "desc" });1516for (const r of repos.items.slice(0, 10)) console.log(r.url);Calls use api.socialscrape.dev and return the shapes in the reference.
Good to know
Contacting people is a separate step, with its own rules.