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

# Get badge leaderboard



## OpenAPI

````yaml https://api.openpage.fun/v1/docs.json get /community/{id}/badge/{badgeId}/leaderboard
openapi: 3.0.0
info:
  title: OpenPage API Reference
  description: ''
  version: '1.0'
  contact: {}
servers:
  - url: https://api.openpage.fun/v1
security: []
tags:
  - name: Launcher
    description: >-
      Launcher endpoints are used to interact with your embedded or external
      experiences.


      **Launcher endpoints require setting up a Community Experience.**


      See: [Community
      Experiences](/api-reference/community-experiences/create-experience)
  - name: Communities
    description: >-
      Community endpoints are used to retrieve information about your
      Communities and associated members.


      **Community API endpoints require an API key obtained from the Community
      dashboard.**


      [Community Dashboard](https://portal.openpage.fun)
  - name: Community Badges
    description: >-
      Community Badge endpoints are used to create and manage badges, their
      associated rewards, and member attributions.


      **Community Badge endpoints require an API key obtained from the Community
      dashboard.**


      [Community Dashboard](https://portal.openpage.fun)
  - name: Community Files
    description: >-
      Community File endpoints are used to create and manage files used for
      Badges and Collections.


      **Community File endpoints require an API key obtained from the Community
      dashboard.**


      [Community Dashboard](https://portal.openpage.fun)
  - name: Community Experiences
    description: >-
      Community Experience endpoints are used to create and manage experiences.


      **Community Experience endpoints require an API key obtained from the
      Community dashboard.**


      [Community Dashboard](https://portal.openpage.fun)
paths:
  /community/{id}/badge/{badgeId}/leaderboard:
    get:
      tags:
        - Community Badges
      summary: Get badge leaderboard
      operationId: CommunityBadgeController_getCommunityMemberBadgeLeaderboard
      parameters:
        - name: id
          required: true
          in: path
          description: Community ID
          schema:
            type: string
        - name: badgeId
          required: true
          in: path
          description: Badge ID
          schema:
            type: string
        - name: metric
          required: false
          in: query
          description: >-
            Determines the leaderboard based on a badge metadata metric. If no
            metrics are available the leaderboard is returned based on ascending
            order the badge was earned.
          schema:
            enum:
              - time
              - score
              - rank
              - position
              - points
            type: string
        - name: metricDirection
          required: false
          in: query
          description: Direction to sort the leaderboard by metric
          schema:
            type: string
            enum:
              - ASC
              - DESC
        - name: perPage
          required: false
          in: query
          schema: {}
        - name: page
          required: false
          in: query
          schema: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/CommunityMemberBadgeLeaderboardResponseDto
      security:
        - apiKey: []
components:
  schemas:
    CommunityMemberBadgeLeaderboardResponseDto:
      type: object
      properties:
        name:
          type: string
        earnedAt:
          format: date-time
          type: string
        claimedAt:
          format: date-time
          type: string
        wallet:
          type: string
        username:
          type: string
        displayName:
          type: string
        avatar:
          type: string
        rewards:
          type: object
        metadata.[key]:
          type: object
      required:
        - name
        - earnedAt
        - claimedAt
        - wallet
        - username
        - displayName
        - avatar
        - rewards
        - metadata.[key]
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-Api-Key
      in: header

````