For bug reports or feature requests, open an issue on the GitHub repository. For general API questions, join the Top.gg Discord server at discord.gg/dbl.
{"docsConfig":{"theme":"luma","$schema":"https://mintlify.com/docs.json","name":"Top.gg","colors":{"primary":"#ff3366","light":"#ffffff","dark":"#070510"},"logo":{"light":"https://mintcdn.com/topgg/gdgFOFBVG_QEe4e1/images/logo-light.svg?fit=max\u0026auto=format\u0026n=gdgFOFBVG_QEe4e1\u0026q=85\u0026s=698e583680a834d8a166a4e378c5f6c3","dark":"https://mintcdn.com/topgg/gdgFOFBVG_QEe4e1/images/logo-dark.svg?fit=max\u0026auto=format\u0026n=gdgFOFBVG_QEe4e1\u0026q=85\u0026s=0fc4c68c6e6b2753bd3f8f3ed40cd199","href":"https://docs.top.gg"},"favicon":"https://mintcdn.com/topgg/gdgFOFBVG_QEe4e1/images/logo-light.svg?fit=max\u0026auto=format\u0026n=gdgFOFBVG_QEe4e1\u0026q=85\u0026s=698e583680a834d8a166a4e378c5f6c3","api":{"openapi":"https://top.gg/api/v1/openapi/spec.json"},"background":{"decoration":"gradient","color":{"dark":"#070510"}},"navbar":{"primary":{"type":"github","href":"https://github.com/top-gg"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"topgg","hasAudioNarration":false,"actualSubdomain":"topgg","customDomains":["docs.top.gg"],"gitSource":{"type":"github","owner":"top-gg","repo":"developer-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a972de97804c4ae63e3df0c","collectionId":"ed862889-aaf6-4caf-9230-d723f0f12000","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6a972de97804c4ae63e3df0c"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6a972de97804c4ae63e3df0c","clientVersion":"0.0.3966","searchFilterCounts":[{"language":"default","tag":"Documentation","count":18},{"language":"default","tag":"API Reference","count":11},{"language":"default","tag":"v1 API","count":8},{"language":"default","tag":"Libraries","count":8},{"language":"default","tag":"OAuth","count":4},{"language":"default","tag":"Legacy v0 API","count":3},{"language":"default","tag":"Webhooks","count":3},{"language":"default","tag":"Get Started","count":2},{"language":"default","tag":"Resources","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":true,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@top.gg","showHelpButton":true}},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"starterQuestions":[{"_id":"69e21ee583d79df37e044b85","deploymentId":"69dec376eafc826ab8500799","questionText":"How do I verify a vote?","status":"active","generatedBy":"manual","createdAt":"2026-04-17T11:52:05.896Z","updatedAt":"2026-04-17T11:52:05.896Z","__v":0},{"_id":"69e21ed083d79df37e044ad7","deploymentId":"69dec376eafc826ab8500799","questionText":"How do I receive a webhook?","status":"active","generatedBy":"manual","createdAt":"2026-04-17T11:51:44.272Z","updatedAt":"2026-04-17T11:51:44.272Z","__v":0},{"_id":"69e21ec883d79df37e044a91","deploymentId":"69dec376eafc826ab8500799","questionText":"How do I post my server count?","status":"active","generatedBy":"manual","createdAt":"2026-04-17T11:51:36.947Z","updatedAt":"2026-04-17T11:51:36.947Z","__v":0}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"libraries/go","slug":"/libraries/go","pageMetadata":{"title":"Top.gg Go SDK: Community Library","sidebarTitle":"Go","description":"A community-maintained Go library for the Top.gg API. Integrate Top.gg bot stats posting and vote tracking features into your Go Discord bot.","href":"/libraries/go"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"A community-maintained Go library for the Top.gg API. Integrate Top.gg bot stats posting and vote tracking features into your Go Discord bot.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`The Top.gg Go SDK is a community-maintained library that wraps the Top.gg REST API for Go applications. It is not maintained by the Top.gg core team.`}),`\n`,_jsx(Heading,{level:`2`,id:`installation`,children:`Installation`}),`\n`,_jsxs(_components.p,{children:[`Add the package to your module with `,_jsx(_components.code,{children:`go get`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`go`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` get`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` github.com/top-gg/go-dbl@latest`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Then import it in your code:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`go`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`go`,children:_jsxs(_components.code,{language:`go`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` dbl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#CE9178`},children:`github.com/top-gg/go-dbl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`community-and-support`,children:`Community and support`}),`\n`,_jsxs(_components.p,{children:[`For bug reports or feature requests, open an issue on the `,_jsx(_components.a,{href:`https://github.com/top-gg/go-sdk`,children:`GitHub repository`}),`. For general API questions, join the Top.gg Discord server at `,_jsx(_components.a,{href:`https://discord.gg/dbl`,children:`discord.gg/dbl`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Top.gg Go SDK: Community Library","sidebarTitle":"Go","description":"A community-maintained Go library for the Top.gg API. Integrate Top.gg bot stats posting and vote tracking features into your Go Discord bot.","href":"/libraries/go"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Installation","slug":"installation","depth":2,"children":[]},{"title":"Community and support","slug":"community-and-support","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"topgg","siteName":"Top.gg","title":"Top.gg Go SDK: Community Library - Top.gg","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-04-17T10:40:36.577Z","originalFileLocation":"libraries/go.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"A community-maintained Go library for the Top.gg API. Integrate Top.gg bot stats posting and vote tracking features into your Go Discord bot.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Top.gg\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/topgg/kW0rCpw9qo0XekdR/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/topgg/kW0rCpw9qo0XekdR/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/topgg/kW0rCpw9qo0XekdR/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/topgg/kW0rCpw9qo0XekdR/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/topgg/kW0rCpw9qo0XekdR/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/topgg/kW0rCpw9qo0XekdR/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/topgg/kW0rCpw9qo0XekdR/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/topgg/kW0rCpw9qo0XekdR/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/topgg/kW0rCpw9qo0XekdR/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Top.gg Go SDK: Community Library - Top.gg\">\u003cmeta data-mint-head property=\"og:description\" content=\"A community-maintained Go library for the Top.gg API. Integrate Top.gg bot stats posting and vote tracking features into your Go Discord bot.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Top.gg\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.top.gg/libraries/go\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://topgg.mintlify.app/_mintlify/api/og/v2?division=Libraries\u0026amp;title=Top.gg+Go+SDK%3A+Community+Library\u0026amp;description=A+community-maintained+Go+library+for+the+Top.gg+API.+Integrate+Top.gg+bot+stats+posting+and+vote+tracking+features+into+your+Go+Discord+bot.\u0026amp;theme=3411de4495cad5aa5f9d4aff\u0026amp;signature=6e1be24432112cdf019b605a2a9c2a04eb958a640ecc9f2e1f8d570c69f331c2\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Top.gg Go SDK: Community Library - Top.gg\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"A community-maintained Go library for the Top.gg API. Integrate Top.gg bot stats posting and vote tracking features into your Go Discord bot.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://topgg.mintlify.app/_mintlify/api/og/v2?division=Libraries\u0026amp;title=Top.gg+Go+SDK%3A+Community+Library\u0026amp;description=A+community-maintained+Go+library+for+the+Top.gg+API.+Integrate+Top.gg+bot+stats+posting+and+vote+tracking+features+into+your+Go+Discord+bot.\u0026amp;theme=3411de4495cad5aa5f9d4aff\u0026amp;signature=6e1be24432112cdf019b605a2a9c2a04eb958a640ecc9f2e1f8d570c69f331c2\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/topgg/kW0rCpw9qo0XekdR/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Top.gg\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ff3366\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.top.gg/libraries/go\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/libraries/go.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.top.gg/#organization\",\"name\":\"Top.gg\",\"url\":\"https://docs.top.gg\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/topgg/gdgFOFBVG_QEe4e1/images/logo-light.svg?fit=max\u0026auto=format\u0026n=gdgFOFBVG_QEe4e1\u0026q=85\u0026s=698e583680a834d8a166a4e378c5f6c3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.top.gg#website\",\"name\":\"Top.gg\",\"url\":\"https://docs.top.gg\",\"publisher\":{\"@id\":\"https://docs.top.gg/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.top.gg/libraries/go#webpage\",\"url\":\"https://docs.top.gg/libraries/go\",\"name\":\"Top.gg Go SDK: Community Library\",\"description\":\"A community-maintained Go library for the Top.gg API. Integrate Top.gg bot stats posting and vote tracking features into your Go Discord bot.\",\"dateModified\":\"2026-04-17T10:40:36.577Z\",\"isPartOf\":{\"@id\":\"https://docs.top.gg#website\"},\"breadcrumb\":{\"@id\":\"https://docs.top.gg/libraries/go#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.top.gg/libraries/go#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Libraries\",\"item\":\"https://docs.top.gg/libraries/javascript\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Top.gg Go SDK: Community Library\",\"item\":\"https://docs.top.gg/libraries/go\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.top.gg/libraries/go#article\",\"headline\":\"Top.gg Go SDK: Community Library\",\"name\":\"Top.gg Go SDK: Community Library\",\"description\":\"A community-maintained Go library for the Top.gg API. Integrate Top.gg bot stats posting and vote tracking features into your Go Discord bot.\",\"url\":\"https://docs.top.gg/libraries/go\",\"mainEntityOfPage\":{\"@id\":\"https://docs.top.gg/libraries/go#webpage\"},\"dateModified\":\"2026-04-17T10:40:36.577Z\",\"publisher\":{\"@id\":\"https://docs.top.gg/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.top.gg#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Top.gg\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Top.gg","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Get Started","pages":[{"title":"Top.gg Developer Documentation","href":"/introduction"},{"title":"Authenticate with the Top.gg API","href":"/authentication"}]},{"group":"OAuth","pages":[{"title":"Access Top.gg Projects on Behalf of Users with OAuth","sidebarTitle":"Overview","href":"/oauth/overview"},{"title":"Authorize Users and Obtain OAuth Tokens","sidebarTitle":"Authorization","href":"/oauth/authorization"},{"title":"Act on Every Granted Project with an Application Token","sidebarTitle":"Application token","href":"/oauth/application-token"},{"title":"OAuth Scopes for the Top.gg API","sidebarTitle":"Scopes","href":"/oauth/scopes"}]},{"group":"Webhooks","pages":[{"title":"Receive Vote Notifications with Webhooks","href":"/webhooks/overview"},{"title":"Webhook Event Reference for Top.gg","href":"/webhooks/events"},{"title":"Build Installable Top.gg Integrations","href":"/webhooks/integrations"}]},{"group":"Libraries","pages":[{"title":"Top.gg JavaScript SDK: Stats and Webhooks","sidebarTitle":"JavaScript","href":"/libraries/javascript"},{"title":"Top.gg Python SDK: topggpy Library","sidebarTitle":"Python","href":"/libraries/python"},{"title":"Top.gg .NET Library: DiscordBotsList.Api","sidebarTitle":".NET","href":"/libraries/dotnet"},{"title":"Top.gg Java SDK: Community Library","sidebarTitle":"Java","description":"A community-maintained Java library for the Top.gg API. Post bot stats and retrieve bot and user information from your Java application.","href":"/libraries/java"},{"title":"Top.gg Go SDK: Community Library","sidebarTitle":"Go","href":"/libraries/go"},{"title":"Top.gg Rust SDK: Community Library","sidebarTitle":"Rust","description":"A community-maintained Rust crate for the Top.gg API. Post bot stats, retrieve bot data, and query the Top.gg API from your Rust Discord bot.","href":"/libraries/rust"},{"title":"Top.gg PHP SDK: Community Library","sidebarTitle":"PHP","href":"/libraries/php"},{"title":"Top.gg Ruby SDK: Community Library","sidebarTitle":"Ruby","href":"/libraries/ruby"}]},{"group":"Resources","pages":[{"title":"Top.gg API Rate Limits and 429 Error Handling","href":"/resources/rate-limits"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api/v1/introduction"}]}]},"title":"Top.gg Go SDK: Community Library - Top.gg","buildId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","deploymentId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","dynamics":[],"chunks":[]}