Skip to content

:octocat: API to fetch trending GitHub repos. Hosted on Heroku - Free to use, CORS-enabled and no auth required.

Notifications You must be signed in to change notification settings

Lissy93/gh-trending-no-cors

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github Trending Repos API

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!

Usage

Requests can be made to: https://gh-trending-repos.herokuapp.com/repo. No auth is required.

Parameters

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"
    ]
  }
  ...
]
}

Deployment

Deploy to Heroku:

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

Info

Contributing

Pull requests are welcome :)

Dependencies

  • [lxml] - Python XML toolkit
  • [tornado] - Web framework, developed by FriendFeed
  • [ustudio-tornado-cors] - Adds CORS support to Tornado, by @ustudio

Credits

Full credit to the author of the original repo, @Edgar

Privacy

See the Heroku/ Salesforce Privacy Policy for the hosted instance, and the GitHub Privacy Statement for the data fetched from the GH API.

License

This fork is licensed under MIT - © Alicia Sykes 2021

About

:octocat: API to fetch trending GitHub repos. Hosted on Heroku - Free to use, CORS-enabled and no auth required.

Topics

Resources

Stars

Watchers

Forks

Languages

  • Python 100.0%