Get repository
curl --request GET \
--url https://scrapebadger.com/v1/github/repositories/{owner}/{repo} \
--header 'X-API-Key: <api-key>'import requests
url = "https://scrapebadger.com/v1/github/repositories/{owner}/{repo}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://scrapebadger.com/v1/github/repositories/{owner}/{repo}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/github/repositories/{owner}/{repo}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scrapebadger.com/v1/github/repositories/{owner}/{repo}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/github/repositories/{owner}/{repo}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/github/repositories/{owner}/{repo}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"repository": {
"name": "<string>",
"full_name": "<string>",
"link": "<string>",
"owner": {
"login": "<string>",
"link": "<string>",
"id": 123,
"avatar_url": "<string>",
"node_id": "<string>",
"name": "<string>",
"type": "<string>"
},
"is_empty": true,
"id": 123,
"node_id": "<string>",
"description": "<string>",
"website": "<string>",
"social_image": "<string>",
"default_branch": "<string>",
"current_commit": "<string>",
"visibility": "<string>",
"is_fork": true,
"forked_from": "<string>",
"parent": {
"name": "<string>",
"full_name": "<string>",
"link": "<string>",
"id": 123,
"owner": {
"login": "<string>",
"link": "<string>",
"id": 123,
"avatar_url": "<string>",
"node_id": "<string>",
"name": "<string>",
"type": "<string>"
},
"description": "<string>",
"default_branch": "<string>",
"language": "<string>"
},
"source": {
"name": "<string>",
"full_name": "<string>",
"link": "<string>",
"id": 123,
"owner": {
"login": "<string>",
"link": "<string>",
"id": 123,
"avatar_url": "<string>",
"node_id": "<string>",
"name": "<string>",
"type": "<string>"
},
"description": "<string>",
"default_branch": "<string>",
"language": "<string>"
},
"fork_comparison": {
"ahead": 123,
"behind": 123,
"base_branch": "<string>",
"current_ref": "<string>",
"is_tracking_branch": true
},
"is_archived": true,
"is_template": true,
"is_mirror": true,
"is_disabled": true,
"language": "<string>",
"language_color": "<string>",
"license": {
"name": "<string>",
"spdx_id": "<string>",
"key": "<string>",
"link": "<string>"
},
"topics": [
"<string>"
],
"stars": 123,
"watchers": 123,
"forks": 123,
"network_count": 123,
"open_issues_count": 123,
"open_pull_requests_count": 123,
"open_issues_count_approximate": true,
"open_pull_requests_count_approximate": true,
"open_issues_display": "<string>",
"open_pull_requests_display": "<string>",
"is_open_issues_count_capped": true,
"is_open_pull_requests_count_capped": true,
"open_issues_and_pull_requests_count": 123,
"commits_count": 123,
"commits_display": "<string>",
"commits_count_approximate": true,
"branches_count": 123,
"branches_count_approximate": true,
"tags_count": 123,
"releases_count": 123,
"contributors_count": 123,
"contributors_count_approximate": true,
"used_by_count": 123,
"used_by_count_approximate": true,
"security_advisories_count": 123,
"files_count": 123,
"files_truncated": true,
"has_issues": true,
"has_pull_requests": true,
"has_discussions": true,
"has_projects": true,
"has_wiki": true,
"has_pages": true,
"has_downloads": true,
"has_citation": true,
"has_code_of_conduct": true,
"has_contributing_guide": true,
"has_security_policy": true,
"allow_forking": true,
"web_commit_signoff_required": true,
"pull_request_creation_policy": "<string>",
"size_kb": 123,
"clone_url": "<string>",
"ssh_url": "<string>",
"git_url": "<string>",
"svn_url": "<string>",
"archive_url": "<string>",
"mirror_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_utc": 123,
"updated_at": "2023-11-07T05:31:56Z",
"updated_utc": 123,
"pushed_at": "2023-11-07T05:31:56Z",
"pushed_utc": 123
},
"latest_commit": {
"sha": "<string>",
"link": "<string>",
"message": "<string>",
"message_html": "<string>",
"body": "<string>",
"body_html": "<string>",
"committed_at": "2023-11-07T05:31:56Z",
"committed_utc": 123,
"pushed_at": "2023-11-07T05:31:56Z",
"pushed_utc": 123,
"authors": [
{
"login": "<string>",
"name": "<string>",
"profile_name": "<string>",
"link": "<string>",
"avatar_url": "<string>",
"id": 123,
"is_github": true
}
],
"committer": {
"login": "<string>",
"name": "<string>",
"profile_name": "<string>",
"link": "<string>",
"avatar_url": "<string>",
"id": 123,
"is_github": true
},
"pusher": {
"login": "<string>",
"name": "<string>",
"profile_name": "<string>",
"link": "<string>",
"avatar_url": "<string>",
"id": 123,
"is_github": true
},
"checks": {
"state": "<string>"
},
"is_spoofed": true
},
"readme": {
"text": "<string>",
"html": "<string>",
"link": "<string>",
"name": "<string>",
"path": "<string>",
"ref": "<string>",
"toc": [
{
"level": 123,
"text": "<string>",
"anchor": "<string>"
}
]
},
"files": [
{
"name": "<string>",
"path": "<string>",
"type": "<string>",
"link": "<string>",
"has_simplified_path": true,
"latest_commit": {
"sha": "<string>",
"link": "<string>",
"message": "<string>",
"message_html": "<string>",
"body": "<string>",
"body_html": "<string>",
"committed_at": "2023-11-07T05:31:56Z",
"committed_utc": 123,
"pushed_at": "2023-11-07T05:31:56Z",
"pushed_utc": 123,
"authors": [
{
"login": "<string>",
"name": "<string>",
"profile_name": "<string>",
"link": "<string>",
"avatar_url": "<string>",
"id": 123,
"is_github": true
}
],
"committer": {
"login": "<string>",
"name": "<string>",
"profile_name": "<string>",
"link": "<string>",
"avatar_url": "<string>",
"id": 123,
"is_github": true
},
"pusher": {
"login": "<string>",
"name": "<string>",
"profile_name": "<string>",
"link": "<string>",
"avatar_url": "<string>",
"id": 123,
"is_github": true
},
"checks": {
"state": "<string>"
},
"is_spoofed": true
}
}
],
"languages": [
{
"name": "<string>",
"percentage": 123,
"color": "<string>",
"bytes": 123
}
],
"latest_release": {
"name": "<string>",
"link": "<string>",
"tag": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"published_utc": 123
},
"contributors": [
{
"login": "<string>",
"link": "<string>",
"id": 123,
"avatar_url": "<string>",
"node_id": "<string>",
"name": "<string>",
"type": "<string>"
}
],
"contributors_truncated": true,
"dependents": [
{
"login": "<string>",
"link": "<string>",
"id": 123,
"avatar_url": "<string>",
"node_id": "<string>",
"name": "<string>",
"type": "<string>"
}
],
"dependents_truncated": true,
"funding": {
"github_sponsors": [
{
"login": "<string>",
"link": "<string>",
"id": 123,
"avatar_url": "<string>",
"node_id": "<string>",
"name": "<string>",
"type": "<string>"
}
],
"links": [
{
"link": "<string>",
"label": "<string>",
"platform": "<string>",
"icon_url": "<string>"
}
],
"sponsorable_count": 123,
"sponsors_link": "<string>"
},
"community_files": [
{
"name": "<string>",
"path": "<string>",
"ref": "<string>",
"link": "<string>",
"type": "<string>"
}
],
"metadata_available": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Endpoint reference
Get repository
Retrieve public default-branch repository detail; 10 credits per uncached response.
GET
/
v1
/
github
/
repositories
/
{owner}
/
{repo}
Get repository
curl --request GET \
--url https://scrapebadger.com/v1/github/repositories/{owner}/{repo} \
--header 'X-API-Key: <api-key>'import requests
url = "https://scrapebadger.com/v1/github/repositories/{owner}/{repo}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://scrapebadger.com/v1/github/repositories/{owner}/{repo}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/github/repositories/{owner}/{repo}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scrapebadger.com/v1/github/repositories/{owner}/{repo}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/github/repositories/{owner}/{repo}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/github/repositories/{owner}/{repo}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"repository": {
"name": "<string>",
"full_name": "<string>",
"link": "<string>",
"owner": {
"login": "<string>",
"link": "<string>",
"id": 123,
"avatar_url": "<string>",
"node_id": "<string>",
"name": "<string>",
"type": "<string>"
},
"is_empty": true,
"id": 123,
"node_id": "<string>",
"description": "<string>",
"website": "<string>",
"social_image": "<string>",
"default_branch": "<string>",
"current_commit": "<string>",
"visibility": "<string>",
"is_fork": true,
"forked_from": "<string>",
"parent": {
"name": "<string>",
"full_name": "<string>",
"link": "<string>",
"id": 123,
"owner": {
"login": "<string>",
"link": "<string>",
"id": 123,
"avatar_url": "<string>",
"node_id": "<string>",
"name": "<string>",
"type": "<string>"
},
"description": "<string>",
"default_branch": "<string>",
"language": "<string>"
},
"source": {
"name": "<string>",
"full_name": "<string>",
"link": "<string>",
"id": 123,
"owner": {
"login": "<string>",
"link": "<string>",
"id": 123,
"avatar_url": "<string>",
"node_id": "<string>",
"name": "<string>",
"type": "<string>"
},
"description": "<string>",
"default_branch": "<string>",
"language": "<string>"
},
"fork_comparison": {
"ahead": 123,
"behind": 123,
"base_branch": "<string>",
"current_ref": "<string>",
"is_tracking_branch": true
},
"is_archived": true,
"is_template": true,
"is_mirror": true,
"is_disabled": true,
"language": "<string>",
"language_color": "<string>",
"license": {
"name": "<string>",
"spdx_id": "<string>",
"key": "<string>",
"link": "<string>"
},
"topics": [
"<string>"
],
"stars": 123,
"watchers": 123,
"forks": 123,
"network_count": 123,
"open_issues_count": 123,
"open_pull_requests_count": 123,
"open_issues_count_approximate": true,
"open_pull_requests_count_approximate": true,
"open_issues_display": "<string>",
"open_pull_requests_display": "<string>",
"is_open_issues_count_capped": true,
"is_open_pull_requests_count_capped": true,
"open_issues_and_pull_requests_count": 123,
"commits_count": 123,
"commits_display": "<string>",
"commits_count_approximate": true,
"branches_count": 123,
"branches_count_approximate": true,
"tags_count": 123,
"releases_count": 123,
"contributors_count": 123,
"contributors_count_approximate": true,
"used_by_count": 123,
"used_by_count_approximate": true,
"security_advisories_count": 123,
"files_count": 123,
"files_truncated": true,
"has_issues": true,
"has_pull_requests": true,
"has_discussions": true,
"has_projects": true,
"has_wiki": true,
"has_pages": true,
"has_downloads": true,
"has_citation": true,
"has_code_of_conduct": true,
"has_contributing_guide": true,
"has_security_policy": true,
"allow_forking": true,
"web_commit_signoff_required": true,
"pull_request_creation_policy": "<string>",
"size_kb": 123,
"clone_url": "<string>",
"ssh_url": "<string>",
"git_url": "<string>",
"svn_url": "<string>",
"archive_url": "<string>",
"mirror_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_utc": 123,
"updated_at": "2023-11-07T05:31:56Z",
"updated_utc": 123,
"pushed_at": "2023-11-07T05:31:56Z",
"pushed_utc": 123
},
"latest_commit": {
"sha": "<string>",
"link": "<string>",
"message": "<string>",
"message_html": "<string>",
"body": "<string>",
"body_html": "<string>",
"committed_at": "2023-11-07T05:31:56Z",
"committed_utc": 123,
"pushed_at": "2023-11-07T05:31:56Z",
"pushed_utc": 123,
"authors": [
{
"login": "<string>",
"name": "<string>",
"profile_name": "<string>",
"link": "<string>",
"avatar_url": "<string>",
"id": 123,
"is_github": true
}
],
"committer": {
"login": "<string>",
"name": "<string>",
"profile_name": "<string>",
"link": "<string>",
"avatar_url": "<string>",
"id": 123,
"is_github": true
},
"pusher": {
"login": "<string>",
"name": "<string>",
"profile_name": "<string>",
"link": "<string>",
"avatar_url": "<string>",
"id": 123,
"is_github": true
},
"checks": {
"state": "<string>"
},
"is_spoofed": true
},
"readme": {
"text": "<string>",
"html": "<string>",
"link": "<string>",
"name": "<string>",
"path": "<string>",
"ref": "<string>",
"toc": [
{
"level": 123,
"text": "<string>",
"anchor": "<string>"
}
]
},
"files": [
{
"name": "<string>",
"path": "<string>",
"type": "<string>",
"link": "<string>",
"has_simplified_path": true,
"latest_commit": {
"sha": "<string>",
"link": "<string>",
"message": "<string>",
"message_html": "<string>",
"body": "<string>",
"body_html": "<string>",
"committed_at": "2023-11-07T05:31:56Z",
"committed_utc": 123,
"pushed_at": "2023-11-07T05:31:56Z",
"pushed_utc": 123,
"authors": [
{
"login": "<string>",
"name": "<string>",
"profile_name": "<string>",
"link": "<string>",
"avatar_url": "<string>",
"id": 123,
"is_github": true
}
],
"committer": {
"login": "<string>",
"name": "<string>",
"profile_name": "<string>",
"link": "<string>",
"avatar_url": "<string>",
"id": 123,
"is_github": true
},
"pusher": {
"login": "<string>",
"name": "<string>",
"profile_name": "<string>",
"link": "<string>",
"avatar_url": "<string>",
"id": 123,
"is_github": true
},
"checks": {
"state": "<string>"
},
"is_spoofed": true
}
}
],
"languages": [
{
"name": "<string>",
"percentage": 123,
"color": "<string>",
"bytes": 123
}
],
"latest_release": {
"name": "<string>",
"link": "<string>",
"tag": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"published_utc": 123
},
"contributors": [
{
"login": "<string>",
"link": "<string>",
"id": 123,
"avatar_url": "<string>",
"node_id": "<string>",
"name": "<string>",
"type": "<string>"
}
],
"contributors_truncated": true,
"dependents": [
{
"login": "<string>",
"link": "<string>",
"id": 123,
"avatar_url": "<string>",
"node_id": "<string>",
"name": "<string>",
"type": "<string>"
}
],
"dependents_truncated": true,
"funding": {
"github_sponsors": [
{
"login": "<string>",
"link": "<string>",
"id": 123,
"avatar_url": "<string>",
"node_id": "<string>",
"name": "<string>",
"type": "<string>"
}
],
"links": [
{
"link": "<string>",
"label": "<string>",
"platform": "<string>",
"icon_url": "<string>"
}
],
"sponsorable_count": 123,
"sponsors_link": "<string>"
},
"community_files": [
{
"name": "<string>",
"path": "<string>",
"ref": "<string>",
"link": "<string>",
"type": "<string>"
}
],
"metadata_available": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Representative request:
GET /v1/github/repositories/cli/cli.
Pass owner and repository name separately; no query options are supported.
Read repository fields and availability for native
README, latest commit, count precision, root previews and unbilled failures.
Every successful uncached response costs 10 credits.Authorizations
Path Parameters
Required string length:
1 - 39Pattern:
^[A-Za-z0-9-]+$Required string length:
1 - 100Pattern:
^[A-Za-z0-9_.-]+$Response
Successful Response
Default-branch repository detail and native website sections.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Dependent owner account preview; not a repository or dependency tree.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Whether supplemental public REST metadata was available.

