---
title: "Top.gg API: Discord bot, server listings as JSON"
description: "Top.gg API for Discord bot and server listings: tag search, votes, members, ratings, review texts and vote widgets as JSON. 1 credit per successful call."
url: https://perceptlayer.com/apis/topgg
---

[APIs](https://perceptlayer.com/apis) / [Social media](https://perceptlayer.com/verticals/social) / Top.gg

1 credit per call 6 endpoints 12 datapoints 

# Top.gg API

Top.gg API for Discord bot and server listings: tag search, votes, members, ratings, review texts and vote widgets as JSON. 1 credit per successful call.

[Get a free API key](https://perceptlayer.com/signup) Run it below

Top.gg

GET /v1/topgg/search?type=BOT 

```
{
  "success": true,
  "data": {
    "items": [
      {
        "id": "4283371123597541376",
        "externalId": "432610292342587392",
        "type": "DiscordBot",
        "name": "Mudae",
        "description": "Database of 140,000 anime/game characters: make and customize the best collection in your server. 400 commands, multiplayer games and more!",
        "tags": [
          {
            "slug": "anime",
            "name": "Anime",
            "count": 79958
          },
          {
            "slug": "fun",
            "name": "Fun",
            "count": 146611
          },
          {
            "slug": "game",
            "name": "Game",
            "count": 17882
          }
        ],
        "votes": 2709210,
        "memberCount": 3371839,
        "imageUrl": "https://cdn.discordapp.com/avatars/432610292342587392/29cb28fbf65a3958105026ab03abd306.webp?size=256",
        "createdAt": "2018-04-21T21:17:57Z",
        "rating": 89.96768112038782,
        "reviewCount": 14852
      },
      {
        "id": "4283790394010009600",
        "externalId": "646937666251915264",
        "type": "DiscordBot",
        "name": "Karuta",
        "description": "EDITION 8️⃣ DROPPING NOW! #1 ANIME CARD BOT! 🎴 Over 180,000 anime cards to collect, trade, customize, date, fight, and much more!",
        "tags": [
          {
            "slug": "anime",
            "name": "Anime",
            "count": 79958
          },
          {
            "slug": "art",
            "name": "Art",
            "count": 10690
          },
          {
            "slug": "economy",
            "name": "Economy",
            "count": 22939
          }
        ],
        "votes": 922403,
        "memberCount": 916415,
        "imageUrl": "https://cdn.top.gg/icons/4283790394010009600/2b096056691349d7f902499c2c18ea7f97102207d8fae6cbed23cc640fd4c43e.webp",
        "createdAt": "2020-02-06T10:09:04Z",
        "rating": 87.95600366636114,
        "reviewCount": 1091
      },
      {
        "id": "4283331369380249600",
        "externalId": "408785106942164992",
        "type": "DiscordBot",
        "name": "OwO",
        "description": "Keep track of your OwOs and compete globally! Hunt for animals and fight other users!",
        "tags": [
          {
            "slug": "economy",
            "name": "Economy",
            "count": 22939
          },
          {
            "slug": "fun",
            "name": "Fun",
            "count": 146611
          },
          {
            "slug": "game",
            "name": "Game",
            "count": 17882
          }
        ],
        "votes": 521803,
        "memberCount": 2019,
        "imageUrl": "https://cdn.discordapp.com/avatars/408785106942164992/1a449430e3a9a830efebb8c57917f943.webp?size=256",
        "createdAt": "2018-02-04T09:00:37Z",
        "rating": 90.85674644467568,
        "reviewCount": 5766
      }
    ],
    "tags": [
      {
        "slug": "gaming",
        "name": "Gaming",
        "count": 172698
      },
      {
        "slug": "fun",
        "name": "Fun",
        "count": 146611
      },
      {
        "slug": "social",
        "name": "Social",
        "count": 145092
      }
    ],
    "count": 20
  },
  "meta": {
    "pagination": "offset",
    "filters": {
      "type": "BOT",
      "skip": 0,
      "limit": 20,
      "locale": "en"
    },
    "endpoint_family": "search",
    "upstream_requests": 1,
    "duration_ms": 484,
    "request_id": "req_4334d3789ade454fb14eff90ab183672",
    "credits_charged": 1,
    "credits_remaining": 4855
  }
}
```

200 OK JSON X-Credits-Used: 1

Recorded from our API and shortened.

Sample data

## What one call returns

A recorded run of `search`: the fields and shapes you will get, shortened to 3 items.

| # | id string | externalId string | type string | name string | description string | tags object\[\] | votes integer | memberCount integer | imageUrl url | createdAt string | rating number | reviewCount integer |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | 4283371123597541376 | 432610292342587392 | DiscordBot | Mudae | Database of 140,000 anime/game characters: make and customize the best collection in your server. 400 commands, multiplayer games and more! | \[3 items\] | 2709210 | 3371839 | https://cdn.discordapp.com/avatars/432610292342587392/29cb28fbf65a3958105026ab03abd306.webp?size=256 | 2018-04-21T21:17:57Z | 89.96768112038782 | 14852 |
| 2 | 4283790394010009600 | 646937666251915264 | DiscordBot | Karuta | EDITION 8️⃣ DROPPING NOW! #1 ANIME CARD BOT! 🎴 Over 180,000 anime cards to collect, trade, customize, date, fight, and much more! | \[3 items\] | 922403 | 916415 | https://cdn.top.gg/icons/4283790394010009600/2b096056691349d7f902499c2c18ea7f97102207d8fae6cbed23cc640fd4c43e.webp | 2020-02-06T10:09:04Z | 87.95600366636114 | 1091 |
| 3 | 4283331369380249600 | 408785106942164992 | DiscordBot | OwO | Keep track of your OwOs and compete globally! Hunt for animals and fight other users! | \[3 items\] | 521803 | 2019 | https://cdn.discordapp.com/avatars/408785106942164992/1a449430e3a9a830efebb8c57917f943.webp?size=256 | 2018-02-04T09:00:37Z | 90.85674644467568 | 5766 |

Recorded from our API · 3 items shown · 12 datapoints per item GET /v1/topgg/search?type=BOT

12 datapoints

### Identity

-   id string
-   externalId string
-   type string
-   name string

### Contact

-   imageUrl url

### Reputation

-   rating number
-   reviewCount integer

### Other

-   description string
-   tags object\[\]
-   votes integer
-   memberCount integer
-   createdAt string

Playground

## Run this API

cURL shell 

```
curl "https://api.perceptlayer.com/v1/topgg/search?type=BOT" \
  -H "X-API-Key: $API_KEY"
```

Top.gg · 6 endpoints

## Endpoints

Every endpoint takes the same key. Open one for its parameters, the fields it returns and an example request.

| Endpoint | Required parameters | Returns | Cost |
| --- | --- | --- | --- |
| [GET `/v1/topgg/bot`](https://perceptlayer.com/apis/topgg/bot) | `id` | `id` `externalId` `type` `name` `description` `tags` +6 more | 1 credit |
| [GET `/v1/topgg/reviews`](https://perceptlayer.com/apis/topgg/reviews) | `id` +2 optional | `id` `text` `score` `createdAt` `author` | 1 credit |
| [GET `/v1/topgg/search`](https://perceptlayer.com/apis/topgg/search) | `type` +6 optional | `id` `externalId` `type` `name` `description` `tags` +6 more | 1 credit |
| [GET `/v1/topgg/server`](https://perceptlayer.com/apis/topgg/server) | `id` | `id` `externalId` `type` `name` `description` `tags` +6 more | 1 credit |
| [GET `/v1/topgg/tags`](https://perceptlayer.com/apis/topgg/tags) | `query` +2 optional | `slug` `name` `count` | 1 credit |
| [GET `/v1/topgg/widget`](https://perceptlayer.com/apis/topgg/widget) | `id` | `id` `mime` `image_base64` `image_url` | 1 credit |

Overview

## About the Top.gg API

## What you can get

The Top.gg API returns Top.gg Discord bot and server listings as JSON through 6 endpoints.

-   **Search:** `search` takes a `type` ( `BOT` or `SERVER`), with `query`, `tag`, `sort` ( `MONTHLY_VOTES`), `skip`, `limit` and `locale` ( `en` or `de`). `tags` takes a `query`, with `type` and `locale`, and returns matching tags with listing counts.
-   **Listings:** `bot` and `server` take an `id`, the Discord id of the bot or server.
-   **Reviews:** `reviews` takes an `id`, Top.gg's own internal id, with `skip` and `limit`.
-   **Widget:** `widget` takes a bot's Discord `id` and returns its vote widget as a PNG.

The recorded `bot` call for Mudae returns `id` (Top.gg's internal id), `externalId` (the Discord id), `type`, `name`, `description`, `tags`, `votes`, `memberCount`, `imageUrl`, `createdAt`, `rating` and `reviewCount`. Mudae had 2,708,163 votes, 3,371,839 members and a rating of 89.97 from 14,852 reviews.

## How a call works

Search, then look up: `GET /v1/topgg/search?type=BOT` with your key in the `X-API-Key` header returns 20 listings with both ids. Pass the `externalId` (Discord id) to `bot`, `server` or `widget`, for example `GET /v1/topgg/bot?id=432610292342587392`, and the internal `id` to `reviews`: `GET /v1/topgg/reviews?id=4283371123597541376`. Page search and reviews with `skip` and `limit`. Every successful call costs 1 credit; failed calls cost nothing.

Social media JSON REST MCP

### More social media APIs

[Behance](https://perceptlayer.com/apis/behance) [Bilibili](https://perceptlayer.com/apis/bilibili) [Bluesky](https://perceptlayer.com/apis/bluesky) [Dailymotion](https://perceptlayer.com/apis/dailymotion) [DeviantArt](https://perceptlayer.com/apis/deviantart) [DISBOARD](https://perceptlayer.com/apis/disboard) [Dribbble](https://perceptlayer.com/apis/dribbble) [Facebook](https://perceptlayer.com/apis/facebook) [Facebook Ad Library](https://perceptlayer.com/apis/facebook-ad-library) [Flickr](https://perceptlayer.com/apis/flickr) [Hacker News](https://perceptlayer.com/apis/hacker-news) [Imgur](https://perceptlayer.com/apis/imgur)

Use cases

### Rank Discord bots in a tag such as music or anime by votes and members

`Use the Top.gg API to rank Discord bots in a tag such as music or anime by votes and members` 

### Track a bot's or server's votes, member count and rating over time

`Use the Top.gg API to track a bot's or server's votes, member count and rating over time` 

### Collect review texts and scores for a bot

`Use the Top.gg API to collect review texts and scores for a bot` 

### Find the most voted bots this month with \`sort=MONTHLY\_VOTES\`

`` Use the Top.gg API to find the most voted bots this month with `sort=MONTHLY_VOTES` `` 

FAQ

## Questions

**How much does the Top.gg API cost?**

Each successful call costs one credit, whichever endpoint you call, and each page of results or reviews is one call. Failed calls cost nothing.

**Which id goes where?**

\`bot\`, \`server\` and \`widget\` take the Discord id, returned as \`externalId\` (for Mudae, 432610292342587392). \`reviews\` takes Top.gg's internal \`id\` from search or listing results (for Mudae, 4283371123597541376).

**What do reviews return?**

Each review has \`id\`, \`text\`, \`score\` (0 to 100), \`createdAt\` and \`author\`, 20 per page by default. The listing \`rating\` is on the same 0 to 100 scale.

**Do I need a Top.gg account?**

No. You call this Top.gg API with your Perceptlayer key in the \`X-API-Key\` header, with no Top.gg or Discord login.

**Is this the official Top.gg API?**

No. Perceptlayer is an independent service and is not affiliated with Top.gg. It returns Top.gg data as JSON with a Perceptlayer key, so there is no Top.gg developer account, app review or partner approval to get first. It only reads data: if Top.gg has an official API and you need to act on your own Top.gg account, such as posting, managing orders or reading private data, use that one.

**Should I build a Top.gg scraper instead?**

You can, but a Top.gg scraper is code you maintain: page changes break it, requests get blocked, and Top.gg's terms govern how you collect data. The Top.gg API gives you 6 endpoints of named JSON fields for 1 credit per successful call, and failed calls cost nothing. A scraper makes sense only for data these endpoints don't return, so check the response in the playground on this page first.

## Try the Top.gg API with 100 free credits

No credit card. Failed calls are never billed.

[Get a free API key](https://perceptlayer.com/signup) [Read the docs](https://docs.perceptlayer.com)
