---
title: "GET /v1/leaderboards/{leaderboardId}/top/{topN}"
method: GET
path: "/v1/leaderboards/{leaderboardId}/top/{topN}"
tags: ["leaderboards"]
---

# GET /v1/leaderboards/{leaderboardId}/top/{topN}

`GET /v1/leaderboards/{leaderboardId}/top/{topN}`

## Request

- Base URL: `https://api.versusgame.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.versusgame.com/v1/leaderboards/{leaderboardId}/top/{topN}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/versusgame/apis/versusgame-api/docs/v1/leaderboards/:leaderboardId/top/:topN/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `leaderboardId` string, required
- `topN` number, required

## Response `200`

Get Leaderboard Top N Positions, Returns User Data if Logged In

- LeaderboardStatisticsEntity
  - `leaderboardId` string, required
  - `points` number
  - `userId` string, required
  - `username` string, required
  - `rank` number
  - `profileColor` string
  - `avatar` string
  - `topN` RankedUsernamesEntity[]
    - `userId` string, required
    - `points` number, required
    - `rank` number, required
    - `username` string
    - `profileColor` string
    - `avatar` string
  - `neighbors` RankedUsernamesEntity[]
    - `userId` string, required
    - `points` number, required
    - `rank` number, required
    - `username` string
    - `profileColor` string
    - `avatar` string

## Other responses

- `404`

---

[API](https://skmtc.dev/versusgame/apis/versusgame-api.md) - [All operations](https://skmtc.dev/versusgame/apis/versusgame-api/llms.txt) - [OpenAPI document](https://skmtc.dev/versusgame/apis/versusgame-api/revisions/e86f45ae5f7c?raw)
