> **For coding agents and LLMs:** This is one Social Fetch marketing page (markdown export). For API orientation start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for auth and crawl rules use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for every operation use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt).

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/platforms/github>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/github.mdx>

---

# GitHub scraper API

Public GitHub profiles, repos, pull requests, activity, followers, contributions, and trending lists over REST — same envelope as every other platform.

GitHub is the identity layer many enrichment stacks skip. Social Fetch exposes GitHub as GET routes: `GET /v1/github/profiles/{handle}`, `GET /v1/github/repositories`, or trending with language and time-window filters. Responses use `{ data, meta }` with `data.lookupStatus`, `meta.requestId`, and `meta.creditsCharged`. Missing logins and unknown repos return typed `not_found` outcomes.

The same API key covers Instagram, X, LinkedIn, and the rest of the catalog — no second vendor or GitHub personal access token for these public lookups.

## What you can get

- Profile cards by login — bio, company, location, follower and public-repo counts, User vs Organization.
- Single repository metadata by URL — stars, forks, language, license, topics, push timestamps.
- List public repositories for a user or org with pagination.
- List public pull requests authored by a GitHub user, newest first.
- Activity and yearly contribution graphs for shipping-signal enrichment.
- Followers and following lists for developer-graph expansion.
- Trending repositories filtered by language and daily / weekly / monthly window.
- Trending developers for discovery and open-source scouting jobs.

## GitHub endpoints

| Endpoint | Request | Credits | Docs |
| --- | --- | --- | --- |
| Profile | GET /v1/github/profiles/{handle} | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/github/profiles/handle/get) |
| Repositories | GET /v1/github/profiles/{handle}/repositories | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/github/profiles/handle/repositories/get) |
| Pull requests | GET /v1/github/profiles/{handle}/pull-requests | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/github/profiles/handle/pull-requests/get) |
| Activity | GET /v1/github/profiles/{handle}/activity | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/github/profiles/handle/activity/get) |
| Followers | GET /v1/github/profiles/{handle}/followers | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/github/profiles/handle/followers/get) |
| Following | GET /v1/github/profiles/{handle}/following | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/github/profiles/handle/following/get) |
| Contributions | GET /v1/github/profiles/{handle}/contributions | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/github/profiles/handle/contributions/get) |
| Repository | GET /v1/github/repositories | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/github/repositories/get) |
| Trending repos | GET /v1/github/trending/repositories | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/github/trending/repositories/get) |
| Trending developers | GET /v1/github/trending/developers | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/github/trending/developers/get) |

## How to start

1. **Create an API key.** Sign up at Social Fetch and copy a key (`sfk_…`). New accounts get 100 free credits — enough to exercise profile, repository, and trending routes against live data.
2. **Call a GitHub route.** Send `GET /v1/github/profiles/{handle}` (or any other GitHub path) with `x-api-key`. Use the playground for one-off checks; use the TypeScript SDK or curl in production jobs.
3. **Read the shared envelope.** Branch on `data.lookupStatus` before writing rows. Log `meta.requestId` for support. Bill against `meta.creditsCharged` — that field is the source of truth for what the call cost.

## Pricing

GitHub marketplace routes document credit costs per operation (many profile and repository GETs are 1 credit on a successful completed lookup). List and trending calls can differ — read each operation page. Credits never expire on pay-as-you-go packs. Check `meta.creditsCharged` on every response.

## Compared with the official API

GitHub REST and GraphQL APIs are first-class for webhooks, writes, private repos you authorize, and GitHub-native automation. Social Fetch is public read enrichment: login or repo URL in, structured JSON out, one Social Fetch API key. Use official APIs when GitHub is the product; use Social Fetch when GitHub is one node in a multi-platform pipeline.

## FAQ

### Is there a GitHub scraper API that works without a personal access token?

Yes for Social Fetch public routes. You authenticate to Social Fetch with an API key (`x-api-key`). You do not create a GitHub OAuth app or pass a GitHub personal access token for public profile, repository, activity, follower, contribution, or trending lookups on this hub.

### How do I fetch a GitHub profile with an API?

Create a Social Fetch key, call `GET /v1/github/profiles/{handle}` with the public GitHub login, and parse the JSON envelope. Branch on `data.lookupStatus` before treating the payload as a found profile. Docs and the profile endpoint page cover parameters and examples.

### What GitHub data does Social Fetch cover?

Profiles, profile repositories, authored pull requests, single repository by URL, activity, followers, following, contribution graphs, trending repositories, and trending developers. Exact paths live under `/docs/api` and on this hub's endpoint list.

### Can I get trending GitHub repositories and developers?

Yes. `GET /v1/github/trending/repositories` and `GET /v1/github/trending/developers` accept language and time-window filters (daily, weekly, monthly where documented). Official GitHub REST does not expose the trending page as a first-class list endpoint.

### How much does the GitHub API cost on Social Fetch?

You buy credit packs (or use the 100 free signup credits). Most GitHub GETs list a flat credit note per successful lookup; some list-style routes may differ. There is no required monthly subscription for pay-as-you-go packs. Trust `meta.creditsCharged` on each response.

### Official GitHub REST API vs Social Fetch — what is the difference?

Official GitHub APIs handle authenticated apps, webhooks, private data, and writes. Social Fetch is hosted public lookup with the same envelope as TikTok and LinkedIn. Choose official for deep GitHub integration; choose Social Fetch for public enrichment beside other social sources on one key.

### Are private repositories supported?

No. Social Fetch only returns publicly visible GitHub data. Private repos and non-public fields are never invented. Unknown logins and missing public repos resolve as `lookupStatus` `not_found`.

### Can I pull contribution graphs and activity?

Yes. Contribution routes return yearly heatmap-style totals and per-day counts for a login. Activity routes cover public event-style signals. Paths are on this hub's endpoint list and in the API docs.

### Can I expand a developer graph with followers and following?

Yes. Follower and following list routes take a public login and return publicly visible neighbor accounts for network expansion jobs. Pair them with the profile card when you need identity plus graph edges.

### Can I use the GitHub API in production?

Yes. Routes are synchronous REST with typed errors, request IDs, and credit metering. Teams run recruiting enrichment, open-source monitoring, founder graphs, and agent tools against the documented routes.

## Related

- [GitHub Profile API](https://www.socialfetch.dev/platforms/github/profiles-handle): Public profile card by login — bio, metrics, User vs Organization.
- [GitHub Repository API](https://www.socialfetch.dev/platforms/github/repositories): Single public repo by URL — stars, forks, language, topics.
- [List profile repositories](https://www.socialfetch.dev/platforms/github/profiles-handle-repositories): Page public repos for a user or organization login.
- [List profile pull requests](https://www.socialfetch.dev/platforms/github/profiles-handle-pull-requests): Page public pull requests authored by a GitHub login.
- [Trending repositories API](https://www.socialfetch.dev/platforms/github/trending-repositories): Daily, weekly, or monthly trending repos with language filters.
- [Trending developers API](https://www.socialfetch.dev/platforms/github/trending-developers): Trending people list for open-source discovery jobs.
- [Contribution graph API](https://www.socialfetch.dev/platforms/github/profiles-handle-contributions): Yearly heatmap totals and per-day contribution counts.
- [AI agents use case](https://www.socialfetch.dev/use-cases/social-data-api-for-ai-agents): Wire GitHub lookups as typed tools beside social routes.
