GitHub API endpoint
Returns a public GitHub user's profile plus user-published social links. Email is included only when the user has made it public on their profile.
/github/user/{username}Returns public profile details for a GitHub user. The email field is included only if the user made it public.
Path parameters:
username: required. GitHub username.| Field | In the sample | Value in the sample |
|---|---|---|
| login | Has a value | |
| id | Has a value | |
| type | Has a value | |
| name | Has a value | |
| company | Has a value | |
| location | Has a value | |
| avatar_url | Has a value | avatars.githubusercontent.com |
| html_url | Has a value | github.com |
| public_repos | Has a value | 12 |
| public_gists | Has a value | 1 |
| followers | Has a value | 327,628 |
| following | Has a value | 0 |
| created_at | Has a value | 2011-09-03 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| username (path) | string | Yes | GitHub username | torvalds | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/github/user/torvalds" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"login": "torvalds",
"name": "Linus Torvalds",
"company": "Linux Foundation",
"blog": "",
"location": "Portland, OR",
"twitter_username": null,
"public_repos": 7,
"followers": 228000,
"social_accounts": [
{
"provider": "mastodon",
"url": "https://social.kernel.org/users/torvalds"
}
]
}
}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 |
| 404 | User not found | #/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" \
-H "x-api-key: $CRAWLORA_API_KEY"