{"id":28471177,"url":"https://github.com/top-gg-community/node-sdk","last_synced_at":"2026-02-15T20:00:59.473Z","repository":{"id":39628288,"uuid":"121037526","full_name":"Top-gg-Community/node-sdk","owner":"Top-gg-Community","description":"An official module for interacting with the Top.gg API","archived":false,"fork":false,"pushed_at":"2025-03-18T22:00:21.000Z","size":131,"stargazers_count":137,"open_issues_count":3,"forks_count":44,"subscribers_count":12,"default_branch":"master","last_synced_at":"2026-01-27T00:03:21.713Z","etag":null,"topics":["api","bot","discord","javascript","list"],"latest_commit_sha":null,"homepage":"https://topgg.js.org/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Top-gg-Community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-02-10T17:33:32.000Z","updated_at":"2026-01-04T22:51:45.000Z","dependencies_parsed_at":"2022-08-22T17:40:50.064Z","dependency_job_id":"da8483aa-c42e-4fea-a422-2d4592302c77","html_url":"https://github.com/Top-gg-Community/node-sdk","commit_stats":null,"previous_names":["discordbotlist/dblapi.js","top-gg/dblapi.js","top-gg-community/node-sdk","top-gg/node-sdk"],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/Top-gg-Community/node-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Top-gg-Community%2Fnode-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Top-gg-Community%2Fnode-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Top-gg-Community%2Fnode-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Top-gg-Community%2Fnode-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Top-gg-Community","download_url":"https://codeload.github.com/Top-gg-Community/node-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Top-gg-Community%2Fnode-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29487772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T19:29:10.908Z","status":"ssl_error","status_checked_at":"2026-02-15T19:29:10.419Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["api","bot","discord","javascript","list"],"created_at":"2025-06-07T10:30:39.273Z","updated_at":"2026-02-15T20:00:59.427Z","avatar_url":"https://github.com/Top-gg-Community.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Top.gg Node SDK\n\nAn official module for interacting with the Top.\u003cspan\u003egg API\n\n# Installation\n\n`yarn add @top-gg/sdk` or `npm i @top-gg/sdk`\n\n# Introduction\n\nThe base client is Topgg.Api, and it takes your Top.gg token and provides you with plenty of methods to interact with the API.\n\nSee [this tutorial](https://github.com/top-gg/rust-sdk/assets/60427892/d2df5bd3-bc48-464c-b878-a04121727bff) on how to retrieve your API token.\n\nYou can also setup webhooks via Topgg.Webhook, look down below at the examples for how to do so!\n\n# Links\n\n[Documentation](https://topgg.js.org)\n\n[API Reference](https://docs.top.gg) | [GitHub](https://github.com/top-gg/node-sdk) | [NPM](https://npmjs.com/package/@top-gg/sdk) | [Discord Server](https://discord.gg/EYHTgJX)\n\n# Popular Examples\n\n## Auto-Posting stats\n\nIf you're looking for an easy way to post your bot's stats (server count, shard count), check out [`topgg-autoposter`](https://npmjs.com/package/topgg-autoposter)\n\n```js\nconst client = Discord.Client(); // Your discord.js client or any other\nconst { AutoPoster } = require(\"topgg-autoposter\");\n\nAutoPoster(\"topgg-token\", client).on(\"posted\", () =\u003e {\n  console.log(\"Posted stats to Top.gg!\");\n});\n```\n\nWith this your server count and shard count will be posted to Top.\u003cspan\u003egg\n\n## Webhook server\n\n```js\nconst express = require(\"express\");\nconst Topgg = require(\"@top-gg/sdk\");\n\nconst app = express(); // Your express app\n\nconst webhook = new Topgg.Webhook(\"topggauth123\"); // add your Top.gg webhook authorization (not bot token)\n\napp.post(\n  \"/dblwebhook\",\n  webhook.listener((vote) =\u003e {\n    // vote is your vote object\n    console.log(vote.user); // 221221226561929217\n  })\n); // attach the middleware\n\napp.listen(3000); // your port\n```\n\nWith this example, your webhook dashboard (`https://top.gg/bot/{your bot's id}/webhooks`) should look like this:\n![](https://i.imgur.com/cZfZgK5.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftop-gg-community%2Fnode-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftop-gg-community%2Fnode-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftop-gg-community%2Fnode-sdk/lists"}