> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrape.rocks/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub

| Method | Endpoint            | Parameters                                                    |
| ------ | ------------------- | ------------------------------------------------------------- |
| GET    | `/github/user`      | `username`                                                    |
| GET    | `/github/search`    | `query`, `limit` (default 10)                                 |
| GET    | `/github/followers` | `username`, `limit` (default 100)                             |
| GET    | `/github/following` | `username`, `limit` (default 100)                             |
| GET    | `/github/orgs`      | `username`                                                    |
| GET    | `/github/repos`     | `username`, `limit` (default 100), `sort` (default "updated") |
| GET    | `/github/gists`     | `username`, `limit` (default 100)                             |
| GET    | `/github/starred`   | `username`, `limit` (default 100)                             |

<CodeGroup>
  ```bash curl theme={null}
  curl -H "Authorization: Bearer <key>" "https://api.scrape.rocks/github/user?username=octocat"
  ```

  ```python Python theme={null}
  import requests

  headers = {"Authorization": "Bearer <key>"}
  r = requests.get("https://api.scrape.rocks/github/user?username=octocat", headers=headers)
  print(r.json())
  ```

  ```javascript JavaScript theme={null}
  fetch("https://api.scrape.rocks/github/user?username=octocat", {
    headers: { Authorization: "Bearer <key>" }
  })
    .then(r => r.json())
    .then(console.log)
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch("https://api.scrape.rocks/github/user?username=octocat", {
    headers: { Authorization: "Bearer <key>" }
  });
  const data = await response.json();
  console.log(data);
  ```
</CodeGroup>

<CodeGroup>
  ```json User theme={null}
  {
    "login": "octocat",
    "id": 583231,
    "avatar_url": "https://avatars.githubusercontent.com/u/583231",
    "html_url": "https://github.com/octocat",
    "name": "The Octocat",
    "company": "@github",
    "location": "San Francisco",
    "email": "octocat@github.com",
    "bio": "A robot",
    "public_repos": 8,
    "followers": 9500,
    "following": 9,
    "created_at": "2011-01-25T18:44:36Z"
  }
  ```

  ```json Repos theme={null}
  [
    {
      "name": "Hello-World",
      "full_name": "octocat/Hello-World",
      "html_url": "https://github.com/octocat/Hello-World",
      "description": "A repository",
      "fork": false,
      "stargazers_count": 2500,
      "language": "Python",
      "forks_count": 1200,
      "visibility": "public"
    }
  ]
  ```
</CodeGroup>
