A REST API to fetch a list of trending GitHub repositories
A fork of xdgongs/github-trending, but with CORS enabled
Warning
Heroku has recently removed all free plans, and bumped up their pricing 😔
Therefore the API is temporarily offline, while I find an alternative platform, suggestions welcome!
Requests can be made to: https://gh-trending-repos.herokuapp.com/repo
. No auth is required.
Name | Type | Description |
---|---|---|
lang | string | Optional - The language of trending repository. Do not include # characters |
since | string | Optional - The timeframe, can be either daily , weekly or monthly . Defaults to daily |
For example request this address: https://gh-trending-repos.herokuapp.com/repo?lang=java&since=weekly
Example Response
{
"count": 25,
"msg": "suc",
"items": [
{
"repo": "TencentARC/GFPGAN",
"repo_link": "https://github.com/TencentARC/GFPGAN",
"desc": "GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration.",
"lang": "Python",
"stars": "10,767",
"forks": "1,635",
"added_stars": "5,356 stars this week",
"avatars": [
"https://avatars.githubusercontent.com/u/17445847?s=40&v=4",
"https://avatars.githubusercontent.com/u/81195143?s=40&v=4",
"https://avatars.githubusercontent.com/u/18028233?s=40&v=4",
"https://avatars.githubusercontent.com/u/36897236?s=40&v=4",
"https://avatars.githubusercontent.com/u/17243165?s=40&v=4"
]
},
{
"repo": "dendibakh/perf-book",
"repo_link": "https://github.com/dendibakh/perf-book",
"desc": "The book \"Performance Analysis and Tuning on Modern CPU\"",
"lang": "TeX",
"stars": "759",
"forks": "47",
"added_stars": "445 stars this week",
"avatars": [
"https://avatars.githubusercontent.com/u/4634056?s=40&v=4"
]
}
...
]
}
Deploy to Heroku:
Or, Run locally:
- Get the code:
git clone https://github.com/Lissy93/gh-trending-no-cors.git
- Navigate into directory:
cd gh-trending-no-cors
- Install dependencies:
pip install -r requirements.txt
- Start the web server:
python manage.py --port=8080
- Then open your Postman or your browser, and visit
http://localhost:8080/repo
Pull requests are welcome :)
- [lxml] - Python XML toolkit
- [tornado] - Web framework, developed by FriendFeed
- [ustudio-tornado-cors] - Adds CORS support to Tornado, by @ustudio
Full credit to the author of the original repo, @Edgar
See the Heroku/ Salesforce Privacy Policy for the hosted instance, and the GitHub Privacy Statement for the data fetched from the GH API.
This fork is licensed under MIT - © Alicia Sykes 2021