GitHub API endpoint
Lists the public accounts a GitHub user follows, identified by the required `username`. Page with `page` and `per_page` (max 100). Each account has its login, id, avatar URL, profile URL and account type.
/github/user/{username}/followingPath parameters:
username: required. GitHub username.Query parameters:
page: optional. Page number (integer).per_page: optional. Results per page (integer, max 100).| Field | Filled in, of 20 checked | Values in the sample |
|---|---|---|
| login | 20 | |
| id | 20 | |
| avatar_url | 20 | avatars.githubusercontent.com |
| html_url | 20 | github.com |
| type | 20 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| username (path) | string | Yes | GitHub username | torvalds | |
| page | integer | No | Page number | ||
| per_page | integer | No | Results per page (max 100) | ||
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/github/user/torvalds/following?page=1" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": [
{
"login": "mattt",
"id": 7659,
"avatar_url": "https://avatars.githubusercontent.com/u/7659?v=4",
"html_url": "https://github.com/mattt",
"type": "User"
}
]
}Request schema
No body schema
Response schema
#/definitions/app.Response
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | Code is the HTTP status code or a custom code used to indicate the result of the request @example 200 | |||
| data | unknown | No | Data is the response data (can be any object or null) @example {"id": 1, "name": "John Doe"} | |||
| msg | unknown | No | Msg is the message that describes the result of the request @example "Request successful" |
| Status | Description | Schema |
|---|---|---|
| 400 | Missing or invalid parameters | #/definitions/app.Response |
| 503 | Upstream error or rate limit | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/github/user/torvalds/following?page=1" \
-H "x-api-key: $CRAWLORA_API_KEY"