Github Unofficial Trending API
A simple API that returns number of Github trending repositories and developers.
Table of Contents
Expand Table of Contents
Projects using github-trending-api
- Hacker Tab (Chrome Store): Chrome extension to view GitHub trending projects on new tab.
- github-trending-plus (Live):
✨ Experimental Github trending UI. - HitUp (Chrome Store) (Website): Help you find top things, including GitHub Trending Repositories.
- Gitter: Gitter for GitHub - 可能是�?前颜值最高的 GitHub 小程序�?�户端.
- flutter_wanandroid: Flutter �?�整项�?,WanAndroid �?�户端,BLoC、RxDart 、国际化、主题色、启动页、引导页,拥有较好的项�?结构&比较规范的代码!
- vsc-github-trending: (VS Code Marketplace): Explore Github Trending repositories directly from Visual Studio Code
- GiTiny(AppStore): iOS app for GitHub with exploring trending.
- SwiftHub: GitHub iOS client written in RxSwift and MVVM clean architecture.
- GitNews: Trending repositories from GitHub, HackerNews & Reddit (Mobile & Desktop).
- mini-github: GitHub WeChat Mini Program (可能是全网功能最全的 GitHub �?信小程序).
API Status
API status is available at uptimerobot.
REST API
See the full API documentation in Apiary.
Tutorial
How to scrape any website and build an API using cheerio.js
Trending Repositories
Receive an array of trending repositories.
URL Endpoint:
https://github-trending-api.now.sh/repositories?language=javascript&since=weekly
Parameters:
language: optional, list trending repositories of certain programming languages, possible values are listed here.since: optional, default todaily, possible values:daily,weeklyandmonthly.
Response:
[
...
{
"author": "google",
"name": "gvisor",
"url": "https://github.com/google/gvisor",
"description": "Container Runtime Sandbox",
"language": "Go",
"languageColor": "#3572A5",
"stars": 3320,
"forks": 118,
"currentPeriodStars": 1624,
"builtBy": [
{
"href": "https://github.com/viatsko",
"avatar": "https://avatars0.githubusercontent.com/u/376065",
"username": "viatsko"
}
]
}
...
]Note that GitHub trending page sometimes is empty, in that case this API returns
[]in response, your application should be able to handle it or read from previous cache.
Trending Developers
Receive an array of trending developers.
URL Endpoint:
https://github-trending-api.now.sh/developers?language=javascript&since=weekly
Parameters:
language: optional, list trending repositories of certain programming languages, possible values are listed here.since: optional, default todaily, possible values:daily,weeklyandmonthly.
Response:
[
{
"username": "google",
"name": "Google",
"type": "organization",
"url": "https://github.com/google",
"avatar": "https://avatars0.githubusercontent.com/u/1342004",
"repo": {
"name": "traceur-compiler",
"description": "Traceur is a JavaScript.next-to-JavaScript-of-today compiler",
"url": "https://github.com/google/traceur-compiler"
}
}
]
typecould beorganizationoruser.
List Languages
Receive popular languages and all languages.
URL Endpoint:
https://github-trending-api.now.sh/languages
Response:
{
"popular": [
...
{
"urlParam": "html",
"name": "HTML"
}
...
],
"all": [
...
{
"urlParam": "javascript",
"name": "JavaScript"
}
...
]
}NPM Package
You could also use the API as a NPM package.
Install
$ npm install --save @huchenme/github-trendingUsage
import {
fetchAllLanguages,
fetchRepositories,
fetchDevelopers,
} from '@huchenme/github-trending';
fetchAllLanguages().then(languages => {
console.log(languages);
});
fetchRepositories({ language: 'ruby', since: 'monthly' }).then(repositories => {
console.log(repositories);
});
fetchDevelopers({ language: 'javascript' }).then(developers => {
console.log(developers);
});API
fetchAllLanguages()
Return popular languages and all languages.
{
popular: [
...
{
urlParam: 'html',
name: 'HTML'
}
...
],
all: [
...
{
urlParam: 'javascript',
name: 'JavaScript'
}
...
]
}fetchRepositories(params)
Receive an array of trending repositories.
params:
language: possible values are the the ones fromfetchAllLanguages()or just find here.since:daily,weeklyormonthly, default todaily.
[
...
{
author: 'google',
name: 'gvisor',
url: 'https://github.com/google/gvisor',
description: 'Container Runtime Sandbox',
language: 'Go',
languageColor: '#3572A5',
stars: 3320,
forks: 118,
currentPeriodStars: 1624,
"builtBy": [
{
"href": "https://github.com/viatsko",
"avatar": "https://avatars0.githubusercontent.com/u/376065",
"username": "viatsko"
}
]
}
...
]fetchDevelopers(params)
Receive an array of trending developers.
params:
language: possible values are the the ones fromfetchAllLanguages()or just find here.since:daily,weeklyormonthly, default todaily.
[
...
{
username: 'google',
name: 'Google',
type: 'organization',
url: 'https://github.com/google',
avatar: 'https://avatars0.githubusercontent.com/u/1342004',
repo: {
name: 'traceur-compiler',
description:
'Traceur is a JavaScript.next-to-JavaScript-of-today compiler',
url: 'https://github.com/google/traceur-compiler'
}
}
...
]License
MIT