{"id":13583709,"url":"https://github.com/huchenme/github-trending-api","last_synced_at":"2025-05-16T01:04:49.317Z","repository":{"id":32290233,"uuid":"132098906","full_name":"huchenme/github-trending-api","owner":"huchenme","description":":octocat: The missing APIs for GitHub trending projects and developers 📈","archived":false,"fork":false,"pushed_at":"2023-01-06T01:41:27.000Z","size":3990,"stargazers_count":776,"open_issues_count":40,"forks_count":107,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-08T19:01:57.959Z","etag":null,"topics":["expressjs","github","github-api","trending","trending-repositories","zeit"],"latest_commit_sha":null,"homepage":"https://ghapi.huchen.dev/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/huchenme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":"github-trending-api","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.buymeacoffee.com/huchenme"]}},"created_at":"2018-05-04T06:39:16.000Z","updated_at":"2025-05-08T08:40:44.000Z","dependencies_parsed_at":"2023-01-14T21:01:10.099Z","dependency_job_id":null,"html_url":"https://github.com/huchenme/github-trending-api","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huchenme%2Fgithub-trending-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huchenme%2Fgithub-trending-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huchenme%2Fgithub-trending-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huchenme%2Fgithub-trending-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huchenme","download_url":"https://codeload.github.com/huchenme/github-trending-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254448579,"owners_count":22072764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expressjs","github","github-api","trending","trending-repositories","zeit"],"created_at":"2024-08-01T15:03:42.974Z","updated_at":"2025-05-16T01:04:49.232Z","avatar_url":"https://github.com/huchenme.png","language":"JavaScript","readme":"\u003ch1 align=\"center\"\u003eGithub Unofficial Trending API\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e:octocat: A simple API that returns number of Github trending repositories and developers.\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"images/hero.svg\" alt=\"hero image\" width=\"400\"/\u003e\n  \u003cbr\u003e\n  \u003cp\u003e\n    \u003cem\u003eCredits: Illustration by \u003ca href=\"https://undraw.co/\"\u003eunDraw\u003c/a\u003e\u003c/em\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n[![Financial Contributors on Open Collective](https://opencollective.com/github-trending-api/all/badge.svg?label=financial+contributors)](https://opencollective.com/github-trending-api) [![GitHub closed issues](https://img.shields.io/github/issues-closed/huchenme/github-trending-api.svg)](https://github.com/huchenme/github-trending-api/issues)\n[![Travis](https://img.shields.io/travis/huchenme/github-trending-api.svg)](https://travis-ci.org/huchenme/github-trending-api)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![coverage](https://img.shields.io/codecov/c/github/huchenme/github-trending-api.svg)](https://codecov.io/github/huchenme/github-trending-api)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/huchenme/github-trending-api/blob/master/LICENSE)\n[![Code of Conduct](https://img.shields.io/badge/code%20of-conduct-ff69b4.svg)](CODE_OF_CONDUCT.md)\n\n[![npm (scoped)](https://img.shields.io/npm/v/@huchenme/github-trending.svg)](https://www.npmjs.com/package/@huchenme/github-trending)\n[![module formats: cjs, es](https://img.shields.io/badge/module%20formats-cjs%2C%20esm-green.svg)](https://unpkg.com/@huchenme/github-trending/dist/)\n\n---\n\n## Table of Contents\n\n\u003cdetails\u003e\n\n\u003csummary\u003e\u003cb\u003eExpand Table of Contents\u003c/b\u003e\u003c/summary\u003e\n\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [Projects using github-trending-api](#projects-using-github-trending-api)\n- [Backers](#backers)\n- [API Status](#api-status)\n- [REST API](#rest-api)\n- [Tutorial](#tutorial)\n  - [Trending Repositories](#trending-repositories)\n  - [Trending Developers](#trending-developers)\n  - [List Languages](#list-languages)\n  - [List Spoken Languages](#list-spoken-languages)\n- [NPM Package](#npm-package)\n  - [Install](#install)\n  - [Usage](#usage)\n  - [API](#api)\n    - [languages](#languages)\n    - [spokenLanguages](#spokenlanguages)\n    - [fetchRepositories(params)](#fetchrepositoriesparams)\n    - [fetchDevelopers(params)](#fetchdevelopersparams)\n- [docker](#docker)\n- [Contributors](#contributors)\n  - [Code Contributors](#code-contributors)\n  - [Financial Contributors](#financial-contributors)\n    - [Individuals](#individuals)\n    - [Organizations](#organizations)\n- [License](#license)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c/details\u003e\n\n## Projects using github-trending-api\n\n- **[Hacker Tab](https://github.com/huchenme/hacker-tab-extension)** ([Chrome Store](https://chrome.google.com/webstore/detail/hacker-tab/ibomigipadcieapbemkegkmadbbanbgm)): Chrome extension to view GitHub trending projects on new tab.\n- **[github-trending-plus](https://github.com/zircleUI/github-trending-plus)** ([Live](https://github-trending-plus.surge.sh/)): ✨ Experimental Github trending UI.\n- **[HitUp](https://github.com/wonderbeyond/HitUP)** ([Chrome Store](https://chrome.google.com/webstore/detail/hitup/eiokaohkigpbonodjcbjpecbnccijkjb)) ([Website](https://hitup.wondertools.top/)): Help you find top things, including GitHub Trending Repositories.\n- **[Gitter](https://github.com/huangjianke/Gitter)**: Gitter for GitHub - 可能是目前颜值最高的 GitHub 小程序客户端.\n- **[flutter_wanandroid](https://github.com/Sky24n/flutter_wanandroid)**:\n  Flutter 完整项目，WanAndroid 客户端，BLoC、RxDart 、国际化、主题色、启动页、引导页，拥有较好的项目结构\u0026比较规范的代码！\n- **[vsc-github-trending](https://github.com/4gray/vsc-github-trending)**: ([VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=4gray.vsc-github-trending#overview)): Explore Github Trending repositories directly from Visual Studio Code\n- **[GiTiny](https://github.com/k-lpmg/GiTiny)**([AppStore](https://itunes.apple.com/app/tiny-github/id1461424565)): iOS app for GitHub with exploring trending.\n- **[SwiftHub](https://github.com/khoren93/SwiftHub)**: GitHub iOS client written in RxSwift and MVVM clean architecture.\n- **[GitNews](https://git.news)**: Trending repositories from GitHub, HackerNews \u0026 Reddit (Mobile \u0026 Desktop).\n- **[mini-github](https://github.com/kezhenxu94/mini-github)**: GitHub WeChat Mini Program (可能是全网功能最全的 GitHub 微信小程序).\n- **[StarGit](https://github.com/theArgex/stargit2.0)** ([Website](https://stargit.xyz)): Find trending repositories from GitHub. Built with Angular.\n- **[GitTouch](https://github.com/pd4d10/git-touch)** ([App Store](https://itunes.apple.com/us/app/gittouch/id1452042346), [Google Play](https://play.google.com/store/apps/details?id=io.github.pd4d10.gittouch)): Open source GitHub App built with Flutter.\n- **[lazyhub](https://github.com/ryo-ma/lazyhub)**: :octocat: lazyhub - Terminal UI Client for GitHub using gocui.\n- **[Gitrepos](https://github.com/Hyraze/gitrepos)** ([Website](https://gitrepos.now.sh)): :octocat: A simple PWA app that returns Trending Repositories \u0026 Developers from GitHub, Gitlab \u0026 HackerNews.\n- **[Trendzz](https://github.com/omarryhan/trendzz)** ([Website](https://trendzz.netlify.app)): Github trending PWA focusing on usability.\n- **[Ceelog](https://mp.weixin.qq.com/s?__biz=MzAwOTMxMzgxMA==\u0026mid=2647972345\u0026idx=1\u0026sn=8b316d6b89b9aae2454f89144ffafa61\u0026chksm=8341f284b4367b9227901a69bcb49be191a4c1e4054a2df464a58b073745e225a943ad808db4\u0026token=1659362714\u0026lang=zh_CN#rd)** Github trending in WeChat Official Account Platform.\n\n## Backers\n\nThank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/github-trending-api#backer)]\n\n\u003ca href=\"https://opencollective.com/github-trending-api#backers\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/github-trending-api/backers.svg?width=890\"\u003e\u003c/a\u003e\n\n\u003ca href=\"https://www.buymeacoffee.com/huchenme\" target=\"_blank\"\u003e\u003cimg src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy Me A Coffee\" style=\"height: auto !important;width: auto !important;\" \u003e\u003c/a\u003e\n\n## API Status\n\nAPI status is available at [uptimerobot](https://stats.uptimerobot.com/K6yKjcKlM).\n\n## REST API\n\nSee the full API documentation in [Apiary](https://githubtrendingapi.docs.apiary.io/#).\n\n## Tutorial\n\n[How to scrape any website and build an API using cheerio.js](https://medium.com/@chen/how-to-scrape-any-website-and-build-an-api-using-cheerio-js-6a3f0c651d2e?source=friends_link\u0026sk=7b76d9abf0b6c572042238906e281228)\n\n### Trending Repositories\n\nReceive an array of trending repositories.\n\n**URL Endpoint:**\n\nhttps://ghapi.huchen.dev/repositories?language=javascript\u0026since=weekly\n\n**Parameters:**\n\n- `language`: **optional**, list trending repositories of certain programming languages, possible values are listed [here](./src/languages.json).\n- `since`: **optional**, default to `daily`, possible values: `daily`, `weekly` and `monthly`.\n- `spoken_language_code`: **optional**, list trending repositories of certain spoken languages (e.g English, Chinese), possible values are listed [here](./src/spoken-languages.json).\n\n**Response:**\n\n```json\n[\n  ...\n  {\n    \"author\": \"google\",\n    \"name\": \"gvisor\",\n    \"avatar\": \"https://github.com/google.png\",\n    \"url\": \"https://github.com/google/gvisor\",\n    \"description\": \"Container Runtime Sandbox\",\n    \"language\": \"Go\",\n    \"languageColor\": \"#3572A5\",\n    \"stars\": 3320,\n    \"forks\": 118,\n    \"currentPeriodStars\": 1624,\n    \"builtBy\": [\n      {\n        \"href\": \"https://github.com/viatsko\",\n        \"avatar\": \"https://avatars0.githubusercontent.com/u/376065\",\n        \"username\": \"viatsko\"\n      }\n    ]\n  }\n  ...\n]\n```\n\n\u003e Note that [GitHub trending page](http://github.com/trending) sometimes is empty, in that case this API returns `[]` in response, your application should be able to handle it or read from previous cache.\n\n### Trending Developers\n\nReceive an array of trending developers.\n\n**URL Endpoint:**\n\nhttps://ghapi.huchen.dev/developers?language=javascript\u0026since=weekly\n\n**Parameters:**\n\n- `language`: **optional**, list trending repositories of certain programming languages, possible values are listed [here](./src/languages.json).\n- `since`: **optional**, default to `daily`, possible values: `daily`, `weekly` and `monthly`.\n\n**Response:**\n\n```json\n[\n  {\n    \"username\": \"google\",\n    \"name\": \"Google\",\n    \"type\": \"organization\",\n    \"url\": \"https://github.com/google\",\n    \"avatar\": \"https://avatars0.githubusercontent.com/u/1342004\",\n    \"repo\": {\n      \"name\": \"traceur-compiler\",\n      \"description\": \"Traceur is a JavaScript.next-to-JavaScript-of-today compiler\",\n      \"url\": \"https://github.com/google/traceur-compiler\"\n    }\n  }\n]\n```\n\n\u003e `type` could be `organization` or `user`.\n\n### List Languages\n\n**URL Endpoint:**\n\nhttps://ghapi.huchen.dev/languages\n\n**Response:**\n\n```json\n[\n  {\n    \"urlParam\": \"1c-enterprise\",\n    \"name\": \"1C Enterprise\"\n  },\n  {\n    \"urlParam\": \"abap\",\n    \"name\": \"ABAP\"\n  },\n  {\n    \"urlParam\": \"abnf\",\n    \"name\": \"ABNF\"\n  },\n  {\n    \"urlParam\": \"actionscript\",\n    \"name\": \"ActionScript\"\n  }\n]\n```\n\n### List Spoken Languages\n\n**URL Endpoint:**\n\nhttps://ghapi.huchen.dev/spoken_languages\n\n**Response:**\n\n```json\n[\n  {\n    \"urlParam\": \"ab\",\n    \"name\": \"Abkhazian\"\n  },\n  {\n    \"urlParam\": \"aa\",\n    \"name\": \"Afar\"\n  },\n  {\n    \"urlParam\": \"af\",\n    \"name\": \"Afrikaans\"\n  },\n  {\n    \"urlParam\": \"ak\",\n    \"name\": \"Akan\"\n  }\n]\n```\n\n## NPM Package\n\nYou could also use the API as a NPM package.\n\n### Install\n\n```sh\n$ npm install --save @huchenme/github-trending\n```\n\n### Usage\n\n```js\nimport {\n  languages,\n  spokenLanguages,\n  fetchRepositories,\n  fetchDevelopers,\n} from '@huchenme/github-trending';\n\nfetchRepositories({ language: 'ruby', since: 'monthly' }).then(\n  (repositories) =\u003e {\n    console.log(repositories);\n  }\n);\n\nfetchDevelopers({ language: 'javascript' }).then((developers) =\u003e {\n  console.log(developers);\n});\n\nconsole.log(languages);\nconsole.log(spokenLanguages);\n```\n\n### API\n\n#### languages\n\nList all languages\n\n```js\n[\n  {\n    urlParam: '1c-enterprise',\n    name: '1C Enterprise',\n  },\n  {\n    urlParam: 'abap',\n    name: 'ABAP',\n  },\n  {\n    urlParam: 'abnf',\n    name: 'ABNF',\n  },\n  {\n    urlParam: 'actionscript',\n    name: 'ActionScript',\n  },\n];\n```\n\n#### spokenLanguages\n\nList all spoken languages\n\n```js\n[\n  {\n    urlParam: 'ab',\n    name: 'Abkhazian',\n  },\n  {\n    urlParam: 'aa',\n    name: 'Afar',\n  },\n  {\n    urlParam: 'af',\n    name: 'Afrikaans',\n  },\n  {\n    urlParam: 'ak',\n    name: 'Akan',\n  },\n];\n```\n\n#### fetchRepositories(params)\n\nReceive an array of trending repositories.\n\n**params**:\n\n- `language`: possible values are the the ones from `languages` or [just find here](./src/languages.json).\n- `since`: `daily`, `weekly` or `monthly`, default to `daily`.\n- `spokenLanguageCode`: possible values are the the ones from `spokenLanguages` or [just find here](./src/spoken-languages.json).\n\n```js\n[\n  ...\n  {\n    author: 'google',\n    name: 'gvisor',\n    avatar: 'https://github.com/google.png',\n    url: 'https://github.com/google/gvisor',\n    description: 'Container Runtime Sandbox',\n    language: 'Go',\n    languageColor: '#3572A5',\n    stars: 3320,\n    forks: 118,\n    currentPeriodStars: 1624,\n    \"builtBy\": [\n      {\n        \"href\": \"https://github.com/viatsko\",\n        \"avatar\": \"https://avatars0.githubusercontent.com/u/376065\",\n        \"username\": \"viatsko\"\n      }\n    ]\n  }\n  ...\n]\n```\n\n#### fetchDevelopers(params)\n\nReceive an array of trending developers.\n\n**params**:\n\n- `language`: possible values are the the ones from `languages` or [just find here](languages.json).\n- `since`: `daily`, `weekly` or `monthly`, default to `daily`.\n\n```js\n[\n  ...\n  {\n    username: 'google',\n    name: 'Google',\n    type: 'organization',\n    url: 'https://github.com/google',\n    avatar: 'https://avatars0.githubusercontent.com/u/1342004',\n    repo: {\n      name: 'traceur-compiler',\n      description:\n        'Traceur is a JavaScript.next-to-JavaScript-of-today compiler',\n      url: 'https://github.com/google/traceur-compiler'\n    }\n  }\n  ...\n]\n```\n\n## docker\n\nYou can develop by using docker.\n\n```\n$ docker build -t github-trending-api .\n$ docker run -d --rm -p 8000:8888 github-trending-api:latest\n```\n\n## Contributors\n\n### Code Contributors\n\nThis project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].\n\u003ca href=\"https://github.com/huchenme/github-trending-api/graphs/contributors\"\u003e\u003cimg src=\"https://opencollective.com/github-trending-api/contributors.svg?width=890\u0026button=false\" /\u003e\u003c/a\u003e\n\n### Financial Contributors\n\nBecome a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/github-trending-api/contribute)]\n\n#### Individuals\n\n\u003ca href=\"https://opencollective.com/github-trending-api\"\u003e\u003cimg src=\"https://opencollective.com/github-trending-api/individuals.svg?width=890\"\u003e\u003c/a\u003e\n\n#### Organizations\n\nSupport this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/github-trending-api/contribute)]\n\n\u003ca href=\"https://opencollective.com/github-trending-api/organization/0/website\"\u003e\u003cimg src=\"https://opencollective.com/github-trending-api/organization/0/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/github-trending-api/organization/1/website\"\u003e\u003cimg src=\"https://opencollective.com/github-trending-api/organization/1/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/github-trending-api/organization/2/website\"\u003e\u003cimg src=\"https://opencollective.com/github-trending-api/organization/2/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/github-trending-api/organization/3/website\"\u003e\u003cimg src=\"https://opencollective.com/github-trending-api/organization/3/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/github-trending-api/organization/4/website\"\u003e\u003cimg src=\"https://opencollective.com/github-trending-api/organization/4/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/github-trending-api/organization/5/website\"\u003e\u003cimg src=\"https://opencollective.com/github-trending-api/organization/5/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/github-trending-api/organization/6/website\"\u003e\u003cimg src=\"https://opencollective.com/github-trending-api/organization/6/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/github-trending-api/organization/7/website\"\u003e\u003cimg src=\"https://opencollective.com/github-trending-api/organization/7/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/github-trending-api/organization/8/website\"\u003e\u003cimg src=\"https://opencollective.com/github-trending-api/organization/8/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/github-trending-api/organization/9/website\"\u003e\u003cimg src=\"https://opencollective.com/github-trending-api/organization/9/avatar.svg\"\u003e\u003c/a\u003e\n\n## License\n\nMIT\n","funding_links":["https://opencollective.com/github-trending-api","https://www.buymeacoffee.com/huchenme","https://opencollective.com/github-trending-api/contribute","https://opencollective.com/github-trending-api/organization/0/website","https://opencollective.com/github-trending-api/organization/1/website","https://opencollective.com/github-trending-api/organization/2/website","https://opencollective.com/github-trending-api/organization/3/website","https://opencollective.com/github-trending-api/organization/4/website","https://opencollective.com/github-trending-api/organization/5/website","https://opencollective.com/github-trending-api/organization/6/website","https://opencollective.com/github-trending-api/organization/7/website","https://opencollective.com/github-trending-api/organization/8/website","https://opencollective.com/github-trending-api/organization/9/website"],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuchenme%2Fgithub-trending-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuchenme%2Fgithub-trending-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuchenme%2Fgithub-trending-api/lists"}