GitHub API endpoint
Returns the languages detected in a GitHub repository, identified by the required `owner` and `repo`, as language and byte-count pairs sorted by bytes, largest first.
/github/repo/{owner}/{repo}/languagesReturns the languages detected in a GitHub repository with their byte counts, sorted by bytes descending.
Path parameters:
owner: required. Repository owner login.repo: required. Repository name.| Field | Filled in, of 25 checked | Values in the sample |
|---|---|---|
| language | 25 | |
| bytes | 25 | 1,239 to 1,452,475,934, median 68,792 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| owner (path) | string | Yes | Repository owner (user or org login) | torvalds | |
| repo (path) | string | Yes | Repository name | linux | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/github/repo/torvalds/linux/languages" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": [
{
"language": "C",
"bytes": 742118394
},
{
"language": "Assembly",
"bytes": 12048221
},
{
"language": "Shell",
"bytes": 2204113
}
]
}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/repo/torvalds/linux/languages" \
-H "x-api-key: $CRAWLORA_API_KEY"