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

# Get the subject leaderboard for a given donation source contract

> Get the leaderboard for top donating subjects for a specific source contract. Requires the `partner` API scope.



## OpenAPI

````yaml https://www.donate.gg/api/v1/openapi get /{chainId}/donationSources/{address}/subjects/leaderboard
openapi: 3.0.0
info:
  title: Donate Developer API
  version: 1.0.0
  description: >-
    API for developers to list charities, create and manage donation configs.
    All endpoints require the `donate-api-key` header. Endpoints are gated by
    API scopes enabled at the organization level: Core API endpoints require the
    `core` scope (enabled by default), Partner API endpoints require the
    `partner` scope (must be explicitly granted).
servers:
  - url: /api/v1
    description: API v1 base path (relative to your dashboard origin)
security: []
paths:
  /{chainId}/donationSources/{address}/subjects/leaderboard:
    get:
      summary: Get the subject leaderboard for a given donation source contract
      description: >-
        Get the leaderboard for top donating subjects for a specific source
        contract. Requires the `partner` API scope.
      parameters:
        - schema:
            type: integer
            description: Chain ID
          required: true
          description: Chain ID
          name: chainId
          in: path
        - schema:
            type: string
            description: Donation source address
          required: true
          description: Donation source address
          name: address
          in: path
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: true
            description: >-
              Whether to include inappropriate entries in the leaderboard
              (default true)
          required: false
          description: >-
            Whether to include inappropriate entries in the leaderboard (default
            true)
          name: includeInappropriate
          in: query
        - schema:
            type: string
            enum:
              - top-donated
              - recent-donation
            default: top-donated
            description: Sort order for leaderboard results (default top-donated)
          required: false
          description: Sort order for leaderboard results (default top-donated)
          name: sortBy
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
            description: Page size (default 25, max 100)
          required: false
          description: Page size (default 25, max 100)
          name: limit
          in: query
        - schema:
            type: string
            description: Cursor for next page (from previous pageKey)
          required: false
          description: Cursor for next page (from previous pageKey)
          name: cursor
          in: query
        - schema:
            type: string
            minLength: 1
            description: Developer API key
          required: true
          description: Developer API key
          name: donate-api-key
          in: header
      responses:
        '200':
          description: >-
            Leaderboard of top donating subjects for the specified donation
            source contract.
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Maximum requests allowed in the current window.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: Requests remaining in the current window.
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Unix epoch seconds when the current window resets.
          content:
            application/json:
              schema:
                type: object
                properties:
                  pageKey:
                    type: string
                    nullable: true
                  response:
                    type: array
                    items:
                      oneOf:
                        - type: object
                          properties:
                            rank:
                              type: integer
                              minimum: 0
                              exclusiveMinimum: true
                            chain:
                              type: object
                              properties:
                                id:
                                  type: number
                                name:
                                  type: string
                                type:
                                  type: string
                                  enum:
                                    - bitcoin
                                    - evm
                                    - solana
                              required:
                                - id
                                - name
                                - type
                              additionalProperties: false
                            creatorAddress:
                              type: string
                            stats:
                              type: object
                              properties:
                                usdDonatedE6:
                                  type: string
                                donationCount:
                                  type: string
                                firstDonationDate:
                                  type: string
                                  nullable: true
                                lastDonationDate:
                                  type: string
                                  nullable: true
                              required:
                                - usdDonatedE6
                                - donationCount
                                - firstDonationDate
                                - lastDonationDate
                              additionalProperties: false
                            type:
                              type: string
                              enum:
                                - token
                            token:
                              type: object
                              properties:
                                address:
                                  type: string
                                name:
                                  type: string
                                symbol:
                                  type: string
                                decimals:
                                  type: number
                              required:
                                - address
                                - name
                                - symbol
                                - decimals
                              additionalProperties: false
                          required:
                            - rank
                            - chain
                            - creatorAddress
                            - stats
                            - type
                            - token
                          additionalProperties: false
                required:
                  - pageKey
                  - response
                additionalProperties: false
        '400':
          description: Invalid query parameters.
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Maximum requests allowed in the current window.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: Requests remaining in the current window.
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Unix epoch seconds when the current window resets.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                      - VALIDATION_ERROR
                  issues:
                    type: array
                    items:
                      nullable: true
                required:
                  - error
                  - code
                  - issues
                additionalProperties: false
        '403':
          description: >-
            Required API scope is not enabled for this organization. Contact
            support to request access.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                      - SCOPE_DENIED
                required:
                  - error
                  - code
                additionalProperties: false
        '404':
          description: Source contract not found.
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Maximum requests allowed in the current window.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: Requests remaining in the current window.
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Unix epoch seconds when the current window resets.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                      - NOT_FOUND
                required:
                  - error
                  - code
                additionalProperties: false
        '429':
          description: >-
            Rate limit exceeded. Retry after the period indicated by the
            Retry-After header.
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Maximum requests allowed in the current window.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: Requests remaining in the current window.
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Unix epoch seconds when the current window resets.
            Retry-After:
              schema:
                type: integer
              description: Seconds until the client should retry.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                required:
                  - error
                  - code
                additionalProperties: false
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: donate-api-key
      description: >-
        Developer API key. Required for all requests. Obtain from the Donate
        dashboard.

````