GitHub Repository
Parse a single GitHub repository page into structured JSON with stars, forks, watchers, languages, topics, license, open issues and PRs, default branch, and latest release.
API usage
Add &scraper=github-repository to a Crawling API request. URL-encode the target URL in the url parameter.
curl 'https://api.crawlbase.com/?token=YOUR_TOKEN' \
--data-urlencode 'url=https://github.com/rails/rails' \
--data-urlencode 'scraper=github-repository' -Gfrom crawlbase import CrawlingAPI
api = CrawlingAPI({'token': 'YOUR_TOKEN'})
res = api.get(
'https://github.com/rails/rails',
{'scraper': 'github-repository'}
)
import json
data = json.loads(res['body'])const { CrawlingAPI } = require('crawlbase');
const api = new CrawlingAPI({ token: 'YOUR_TOKEN' });
const res = await api.get(
'https://github.com/rails/rails',
{ scraper: 'github-repository' }
);
const data = JSON.parse(res.body);require 'crawlbase'
api = Crawlbase::API.new(token: 'YOUR_TOKEN')
res = api.get('https://github.com/rails/rails', scraper: 'github-repository')
data = JSON.parse(res.body)Example input URL
The URL passed in the url parameter (URL-decoded for readability):
https://github.com/rails/railsResponse shape
JSON response body. Field types may be null when the source page omits the value.
Repository name.
Owner (user or organization) login.
Full
owner/name identifier.Canonical repository URL.
Repository description (the tagline under the header).
Primary programming language (first entry of
languages).Languages listed in the repository language bar.
Star count.
Fork count.
Watcher count.
True if the Issues tab is enabled.
Open issue count.
Open pull request count.
Repository topic tags.
License name shown in the sidebar.
Default branch name.
Latest release tag, when the repository has releases.
True if a rendered README is present.
True if the repository is archived (read-only).
Sample response
{
"name": "rails",
"owner": "rails",
"fullName": "rails/rails",
"url": "https://github.com/rails/rails",
"description": "Ruby on Rails",
"primaryLanguage": "Ruby",
"languages": ["Ruby", "JavaScript", "HTML", "SCSS", "CSS", "Dockerfile"],
"stars": 58789,
"forks": 22414,
"watchers": 2400,
"hasIssues": true,
"openIssuesCount": 478,
"openPrsCount": 1081,
"topics": ["ruby", "rails", "html", "activerecord", "framework", "mvc", "activejob"],
"license": "MIT license",
"defaultBranch": "main",
"latestRelease": "v8.1.3",
"readmePresent": true,
"archived": false
}