Stack Overflow Badges API

Operations for retrieving badge information on Stack Overflow.

Operations 1

GET /badges Get All Badges #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/stack-overflow-badges-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

stack-overflow-badges-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Stack Overflow Badges API
  description: The Stack Overflow API v2.3 provides programmatic read and write access to Stack Overflow questions, answers, comments, users, tags, and badges. Authentication is via OAuth 2.0. Register an application at http://stackapps.com/apps/oauth to obtain OAuth credentials. All responses are JSON-encoded and support GZIP compression with field-level filtering.
  version: '2.3'
  contact:
    name: Stack Overflow API Support
    url: http://stackapps.com/
  termsOfService: https://stackexchange.com/legal/api-terms-of-use
servers:
- url: https://api.stackexchange.com/2.3
  description: Stack Exchange API v2.3
security:
- oauth2: []
- {}
tags:
- name: Badges
  description: Operations for retrieving badge information on Stack Overflow.
paths:
  /badges:
    get:
      operationId: getBadges
      summary: Get All Badges
      description: Returns all badges available on Stack Overflow, including bronze, silver, and gold badges for various achievements.
      tags:
      - Badges
      parameters:
      - $ref: '#/components/parameters/site'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/pagesize'
      - $ref: '#/components/parameters/order'
      - $ref: '#/components/parameters/sort'
      - name: inname
        in: query
        schema:
          type: string
        description: Filter badges whose name contains this string
      - $ref: '#/components/parameters/filter'
      responses:
        '200':
          description: A list of badges
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadgesResponse'
components:
  parameters:
    filter:
      name: filter
      in: query
      schema:
        type: string
      description: Filter to control which fields are returned
    order:
      name: order
      in: query
      schema:
        type: string
        enum:
        - asc
        - desc
        default: desc
      description: Sort order
    pagesize:
      name: pagesize
      in: query
      schema:
        type: integer
        minimum: 0
        maximum: 100
        default: 30
      description: Number of results per page (max 100)
    page:
      name: page
      in: query
      schema:
        type: integer
        minimum: 1
        default: 1
      description: Page number (1-indexed)
    site:
      name: site
      in: query
      required: true
      schema:
        type: string
        default: stackoverflow
      description: Stack Exchange site identifier (use stackoverflow for Stack Overflow)
    sort:
      name: sort
      in: query
      schema:
        type: string
      description: Field to sort results by
  schemas:
    Wrapper:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
        has_more:
          type: boolean
        quota_max:
          type: integer
        quota_remaining:
          type: integer
        backoff:
          type: integer
        total:
          type: integer
    BadgesResponse:
      allOf:
      - $ref: '#/components/schemas/Wrapper'
      - type: object
        properties:
          items:
            type: array
            items:
              $ref: '#/components/schemas/Badge'
    Badge:
      type: object
      properties:
        badge_id:
          type: integer
        name:
          type: string
        description:
          type: string
        award_count:
          type: integer
        rank:
          type: string
          enum:
          - bronze
          - silver
          - gold
        badge_type:
          type: string
          enum:
          - named
          - tag_based
  securitySchemes:
    oauth2:
      type: oauth2
      description: OAuth 2.0 authentication. Register an application at http://stackapps.com/apps/oauth to obtain credentials.
      flows:
        authorizationCode:
          authorizationUrl: https://stackoverflow.com/oauth
          tokenUrl: https://stackoverflow.com/oauth/access_token/json
          scopes:
            no_expiry: Issues an access token that does not expire
            write_access: Allows write access to a user's data
            private_info: Access a user's private information
externalDocs:
  description: Stack Exchange API Documentation
  url: https://api.stackexchange.com/docs