> ## Documentation Index
> Fetch the complete documentation index at: https://docs.discordbotlist.lol/llms.txt
> Use this file to discover all available pages before exploring further.

# Vote count badge

> An embeddable badge, public and unauthenticated: the point is to be pasted into a README where no credential can be kept, and it exposes only the vote count, which is already on the public bot page.

A hidden or unknown bot still gets a badge reading `unknown` rather than a 404 -- a broken image in somebody's README is the worse outcome. Cached for 5 minutes.



## OpenAPI

````yaml /openapi.json get /api/v1/bots/{id}/widget
openapi: 3.1.0
info:
  title: Discord Bot List API
  version: 1.0.0
  description: >-
    Everything under /api/v1 acts on one listing: the token identifies the bot,
    and the id in the path has to be that same bot. A mismatch answers 404
    rather than 403, so a token cannot be used to discover which other bots
    exist.
  contact:
    name: Support
    url: https://discordbotlist.lol/contact
  license:
    name: Terms of Service
    url: https://discordbotlist.lol/terms
servers:
  - url: https://discordbotlist.lol
    description: Production
security:
  - botToken: []
paths:
  /api/v1/bots/{id}/widget:
    get:
      tags:
        - Public
      summary: Vote count badge
      description: >-
        An embeddable badge, public and unauthenticated: the point is to be
        pasted into a README where no credential can be kept, and it exposes
        only the vote count, which is already on the public bot page.


        A hidden or unknown bot still gets a badge reading `unknown` rather than
        a 404 -- a broken image in somebody's README is the worse outcome.
        Cached for 5 minutes.
      operationId: voteWidget
      parameters:
        - $ref: '#/components/parameters/botId'
      responses:
        '200':
          description: An SVG badge.
          content:
            image/svg+xml:
              schema:
                type: string
      security: []
components:
  parameters:
    botId:
      name: id
      in: path
      required: true
      description: >-
        The bot's Discord application id. It has to be the bot the token belongs
        to.
      schema:
        type: string
        pattern: ^\d{17,19}$
      example: '1092194789458481202'
  securitySchemes:
    botToken:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        The bot's API token, generated on its edit page. Sent bare or as `Bearer
        <token>` -- both are accepted, because the libraries already posting to
        other lists send both. The token is shown once; generating a new one
        invalidates the old.

````