# Social Fetch API - GitHub endpoints # Base URL: https://api.socialfetch.dev # Auth: x-api-key header (sfk_...) # Full catalog: https://www.socialfetch.dev/llms-endpoints.txt | JSON: https://www.socialfetch.dev/llms.json # Docs hub: https://www.socialfetch.dev/docs/api | OpenAPI: https://www.socialfetch.dev/openapi.json 9 documented GitHub operations. Do not invent paths - only the routes below (and their linked markdown pages) are supported. ## GET /v1/github/profiles/{handle} Get GitHub profile Credit cost: 1 credit per successful request. Docs: https://www.socialfetch.dev/docs/api/v1/github/profiles/handle/get.mdx SDK: client.github.getProfile({ handle }) Parameters: - handle (required, string) - GitHub username to look up, with or without a leading @. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/github/profiles/torvalds" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/github/profiles/{handle}/repositories List GitHub profile repositories Credit cost: 1 credit per successful request. Docs: https://www.socialfetch.dev/docs/api/v1/github/profiles/handle/repositories/get.mdx SDK: client.github.listProfileRepositories({ handle: 'torvalds' }) Parameters: - handle (required, string) - GitHub username whose public repositories should be listed. - cursor (optional, string) - Pagination cursor returned by a previous response. - type (optional, string, enum: owner | all | member) - Repository type filter. Defaults to owner. - sort (optional, string, enum: created | updated | pushed | full_name) - Sort field for repositories. - direction (optional, string, enum: asc | desc) - Sort direction. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/github/profiles/torvalds/repositories" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/github/repositories Get GitHub repository Credit cost: 1 credit per successful request. Docs: https://www.socialfetch.dev/docs/api/v1/github/repositories/get.mdx SDK: client.github.getRepository({ url: 'https://github.com/torvalds/linux' }) Parameters: - url (required, string) - Full public GitHub repository URL. Outcome field: `data.lookupStatus` in `found`, `not_found` Disambiguation: Use this endpoint for one repository when you have a full `owner/repo` URL. To list every public repository for a user, use the profile repositories list endpoint instead. curl "https://api.socialfetch.dev/v1/github/repositories?url=https://github.com/torvalds/linux" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/github/profiles/{handle}/activity List GitHub profile activity Credit cost: 1 credit per successful request. Docs: https://www.socialfetch.dev/docs/api/v1/github/profiles/handle/activity/get.mdx SDK: client.github.listProfileActivity({ handle: 'torvalds' }) Parameters: - handle (required, string) - GitHub username whose public activity timeline should be listed. - year (optional) - Calendar year to read activity for. Defaults to the current year when omitted. - cursor (optional, string) - Pagination cursor from a previous response (`data.page.nextCursor`). Pages backward one month at a time through the selected year. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found` Disambiguation: This endpoint returns one month of public contribution activity per request. Keep the same `year` on follow-up calls and pass `data.page.nextCursor` as `cursor` to page backward through the year. curl "https://api.socialfetch.dev/v1/github/profiles/torvalds/activity" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/github/profiles/{handle}/followers List GitHub profile followers Credit cost: 1 credit per successful request. Docs: https://www.socialfetch.dev/docs/api/v1/github/profiles/handle/followers/get.mdx SDK: client.github.listProfileFollowers({ handle: 'torvalds' }) Parameters: - handle (required, string) - GitHub username whose followers should be listed. - cursor (optional, string) - Pagination cursor from a previous response (numeric page index as a string). Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/github/profiles/torvalds/followers" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/github/profiles/{handle}/following List GitHub profile following Credit cost: 1 credit per successful request. Docs: https://www.socialfetch.dev/docs/api/v1/github/profiles/handle/following/get.mdx SDK: client.github.listProfileFollowing({ handle: 'torvalds' }) Parameters: - handle (required, string) - GitHub username whose following list should be listed. - cursor (optional, string) - Pagination cursor from a previous response (numeric page index as a string). Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/github/profiles/torvalds/following" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/github/profiles/{handle}/contributions Get GitHub contribution graph Credit cost: 1 credit per successful request. Docs: https://www.socialfetch.dev/docs/api/v1/github/profiles/handle/contributions/get.mdx SDK: client.github.getProfileContributions({ handle: 'torvalds' }) Parameters: - handle (required, string) - GitHub username to look up, with or without a leading @. - year (optional) - Calendar year for the contribution graph. Defaults to the current year when omitted. Outcome field: `data.lookupStatus` in `found`, `not_found` Disambiguation: Optional `year` defaults to the current calendar year when omitted. Contribution counts reflect public GitHub activity for that year. curl "https://api.socialfetch.dev/v1/github/profiles/torvalds/contributions" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/github/trending/repositories List trending GitHub repositories Credit cost: 1 credit per successful request. Docs: https://www.socialfetch.dev/docs/api/v1/github/trending/repositories/get.mdx SDK: client.github.listTrendingRepositories({ language: 'javascript', since: 'daily' }) Parameters: - language (optional, string) - Optional coding language filter. - since (optional, string, enum: daily | weekly | monthly) - Trending time window. Defaults to daily when omitted. - spokenLanguageCode (optional, string) - Optional spoken language code filter. Disambiguation: Use `since` (`daily`, `weekly`, `monthly`) and optional `language` / `spokenLanguageCode` to narrow results. For trending developers instead of repositories, use the trending developers endpoint. curl "https://api.socialfetch.dev/v1/github/trending/repositories?language=value&since=daily" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/github/trending/developers List trending GitHub developers Credit cost: 1 credit per successful request. Docs: https://www.socialfetch.dev/docs/api/v1/github/trending/developers/get.mdx SDK: client.github.listTrendingDevelopers({ language: 'javascript', since: 'daily' }) Parameters: - language (optional, string) - Optional trending coding language filter. - since (optional, string, enum: daily | weekly | monthly) - Trending time window. Defaults to daily when omitted. Disambiguation: Use `since` (`daily`, `weekly`, `monthly`) and optional `language` to narrow results. Each developer may include `popularRepository` when GitHub highlights one. For trending repositories instead of developers, use the trending repositories endpoint. curl "https://api.socialfetch.dev/v1/github/trending/developers?language=value&since=daily" \ -H "x-api-key: YOUR_API_KEY"