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>"
}
]
}GitHub API
Get a GitHub repository
Public repository statistics, native README, root files and latest commit.
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>"
}
]
}Read a public repository on its default branch. Pass an owner login and
repository name separately, not a URL. No GitHub token is required; authenticate
with your ScrapeBadger
Use MCP
X-API-Key. Restricted keys need the github scope.
Credits: 10 per successful uncached response. Cache hits can cost zero;
inspect X-Credits-Used. An empty repository still returns meaningful identity
and its explicit empty state. Health and errors are free. Check
credits and pricing for current currency rates.
Representative requests
curl 'https://scrapebadger.com/v1/github/repositories/cli/cli' \
-H 'X-API-Key: YOUR_API_KEY'
scrapebadger github repository cli cli
github_get_repository(owner="cli", repo="cli"). SDK method names are
client.github.get_repository("cli", "cli") in Python and
client.github.getRepository("cli", "cli") in Node. Verify your installed SDK
version includes the operation before using it.
Inputs and handoff
The owner is 1–39 letters, digits or hyphens. Repository names are 1–100 letters, digits, dots, hyphens or underscores, excluding. and ... Encode each path
segment. No query parameters are accepted: market, ref, page, cursor and tab
inputs are rejected. From a profile repository summary, pass
owner.login and name; do not pass its complete URL as either identifier.
Renamed/transferred repositories return their resolved public identity.
Understand the fields
The response is unwrapped.repository contains identity/owner, description,
website, default branch, topics, language/license and public state flags.
Counts include stars, actual watcher subscriptions, forks and source-published
issue/PR/commit/branch/tag/release/contributor/dependent counts when available.
watchers is not the REST star alias. Website issue and pull-request counts are
separate from open_issues_and_pull_requests_count. Display counts with
*_approximate flags are estimates, not exact totals.
readme includes displayed text, native rendered HTML, actual path/ref and
heading metadata when present. It does not guess a README filename or convert
rendered HTML back into original Markdown. latest_commit includes SHA/link,
message, authors, committer and check state where public. Full timestamps have
ISO *_at and Unix-seconds *_utc pairs.
files is the native root preview, not a recursive tree. files_count counts
root entries including directories; preserve truncation information. Optional
language/release/contributor/funding/community-file previews depend on public
source visibility. Preview lengths are not exhaustive membership totals.
Absence and errors
Only a recognized native empty state setsrepository.is_empty=true. Missing
fields are unknown/not applicable and must not become invented zeroes. An
explicit null stays null. Supplemental REST metadata availability is reported
separately; it cannot replace native website sections. A failed expected native
README/commit read is an unbilled error, not an empty success.
Invalid inputs return 400/422. Missing/deleted/private resources share GitHub’s
public 404 verdict without revealing private existence. Transient challenge,
throttle or invalid source state returns an unbilled source error. Standard
authentication/scope/rate-limit errors also apply. Repository search, trending,
private data and paginated child lists are separate from this operation.
See the endpoint reference and
GitHub overview.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.

